Mercurial > hg > aboriginal
annotate root-filesystem.sh @ 944:fc134a13357e
Largeish refactoring and cleanup of compiler build:
Break out native-compiler.sh from root-filesystem.sh
NATIVE_TOOLCHAIN=* went away
now NO_NATIVE_COMPILER=1 affecting build.sh
root-filesystem.sh:
Much simplified
No more ROOT_TOPDIR, adjust STAGE_DIR=$STAGE_DIR/usr instead.
Doesn't build native-compiler, instead copies existing native-compiler
else installs library binaries out of cross compiler.
Only build make/bash/distcc when we have a native compiler.
native-compiler.sh:
No more BUILD_STATIC_NATIVE_COMPILER, now built/packaged separately by
default (NO_NATIVE_COMPILER=1 to skip), then incorporated into
root-filesystem.
now static by default, use BUILD_STATIC=none to override
This script also makes the (optional) full cross-compiler
renamed STATIC_CROSS_COMPILER_HOST to STATIC_CC_HOST
Rename cross-compiler stage to simple-cross-compiler
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 03 Jan 2010 17:04:39 -0600 |
parents | 7dd3fb4dd333 |
children | edf9264f2d26 |
rev | line source |
---|---|
177 | 1 #!/bin/bash |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
888 | 3 # Build a root filesystem for a given target. |
4 | |
669 | 5 source sources/include.sh || exit 1 |
744
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
737
diff
changeset
|
6 read_arch_dir "$1" |
783
db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Rob Landley <rob@landley.net>
parents:
782
diff
changeset
|
7 check_for_base_arch || exit 0 |
941
7dd3fb4dd333
Minor cleanups and comments, introduce check_prerequisite function.
Rob Landley <rob@landley.net>
parents:
937
diff
changeset
|
8 check_prerequisite "${ARCH}-cc" |
685
90ab1a1f4db5
Teach build not to rebuild base architecture toolchains. Factor out some common code while there.
Rob Landley <rob@landley.net>
parents:
675
diff
changeset
|
9 |
907
890aa372ee30
Remove old USE_COLOR code, superceded by set_titlebar.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
10 # Announce start of stage. |
890aa372ee30
Remove old USE_COLOR code, superceded by set_titlebar.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
11 |
890aa372ee30
Remove old USE_COLOR code, superceded by set_titlebar.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
12 echo "=== Building $STAGE_NAME" |
890aa372ee30
Remove old USE_COLOR code, superceded by set_titlebar.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
13 |
658
dc5512d734f0
Actually put MANIFEST into mini-native.
Rob Landley <rob@landley.net>
parents:
633
diff
changeset
|
14 # Determine which directory layout we're using |
dc5512d734f0
Actually put MANIFEST into mini-native.
Rob Landley <rob@landley.net>
parents:
633
diff
changeset
|
15 |
783
db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Rob Landley <rob@landley.net>
parents:
782
diff
changeset
|
16 if [ -z "$ROOT_NODIRS" ] |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
17 then |
882
d81382a8bb66
More stuff to make running a guest user potentially useful.
Rob Landley <rob@landley.net>
parents:
876
diff
changeset
|
18 mkdir -p "$STAGE_DIR"/{tmp,proc,sys,dev,home,mnt} && |
d81382a8bb66
More stuff to make running a guest user potentially useful.
Rob Landley <rob@landley.net>
parents:
876
diff
changeset
|
19 chmod a+rwxt "$STAGE_DIR/tmp" || dienow |
735
feec13d32dde
Squashfs needs an /etc/resolv.conf, not just /usr/etc/resolv.conf
Rob Landley <rob@landley.net>
parents:
726
diff
changeset
|
20 for i in bin sbin lib etc |
423
8029eb9a4a8c
Split out BUILD_NOTOOLS from BUILD_SHORT.
Rob Landley <rob@landley.net>
parents:
417
diff
changeset
|
21 do |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
22 mkdir -p "$STAGE_DIR/usr/$i" && |
783
db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Rob Landley <rob@landley.net>
parents:
782
diff
changeset
|
23 ln -s "usr/$i" "$STAGE_DIR/$i" || dienow |
423
8029eb9a4a8c
Split out BUILD_NOTOOLS from BUILD_SHORT.
Rob Landley <rob@landley.net>
parents:
417
diff
changeset
|
24 done |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
25 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
26 STAGE_DIR="$STAGE_DIR/usr" |
783
db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Rob Landley <rob@landley.net>
parents:
782
diff
changeset
|
27 else |
db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Rob Landley <rob@landley.net>
parents:
782
diff
changeset
|
28 mkdir -p "$STAGE_DIR/bin" || dienow |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
29 fi |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
30 |
713
9282f84b31a1
Add NATIVE_TOOLCHAIN=only, to build _just_ the native toolchain (sae set of packages as the cross compiler, only --enable-shared and with uClibc++).
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
31 # Copy qemu setup script and so on. |
9282f84b31a1
Add NATIVE_TOOLCHAIN=only, to build _just_ the native toolchain (sae set of packages as the cross compiler, only --enable-shared and with uClibc++).
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
32 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
33 cp -r "${SOURCES}/native/." "$STAGE_DIR/" && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
34 cp "$SRCDIR"/MANIFEST "$STAGE_DIR/src" || dienow |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
35 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
36 # Build busybox and toybox |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
37 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
38 STAGE_DIR="$STAGE_DIR"/bin build_section busybox |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
39 cp "$WORK"/config-busybox "$STAGE_DIR"/src || dienow |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
40 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
41 STAGE_DIR="$STAGE_DIR"/bin build_section toybox |
280
00ee362817e1
Cross-compile a native distcc for target.
Rob Landley <rob@landley.net>
parents:
278
diff
changeset
|
42 |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
43 # Put statically and dynamically linked hello world programs on there for |
315
7fe514d773b9
Install setup script even for BUILD_SHORT.
Rob Landley <rob@landley.net>
parents:
311
diff
changeset
|
44 # test purposes. |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
45 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
46 "${ARCH}-cc" "${SOURCES}/toys/hello.c" -Os $CFLAGS -o "$STAGE_DIR/bin/hello-dynamic" && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
47 "${ARCH}-cc" "${SOURCES}/toys/hello.c" -Os $CFLAGS -static -o "$STAGE_DIR/bin/hello-static" || dienow |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
48 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
49 # If no native compiler exists for this target... |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
50 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
51 if [ ! -d "$BUILD/native-compiler-$ARCH" ] |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
52 then |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
53 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
54 # Do we need shared libraries? |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
55 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
56 if [ ! -z "$BUILD_STATIC" ] |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
57 then |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
58 echo Copying compiler libraries... |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
59 mkdir -p "$STAGE_DIR/lib" || dienow |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
60 (path_search \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
61 "$("$ARCH-cc" --print-search-dirs | sed -n 's/^libraries: =*//p')" \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
62 "*.so*" 'cp -H "$DIR/$FILE" "$STAGE_DIR/lib/$FILE"' \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
63 || dienow) | dotprogress |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
64 fi |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
65 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
66 # Since we're not installing a compiler, delete the example source code. |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
67 rm -rf "$STAGE_DIR/src/*.c*" || dienow |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
68 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
69 # If a native compiler exists for this target, use it and add supplementary |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
70 # development tools |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
71 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
72 else |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
73 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
74 # Copy native compiler |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
75 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
76 cp -a "$BUILD/native-compiler-$ARCH/." "$STAGE_DIR/" || dienow |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
77 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
78 # Build and install make |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
79 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
80 setupfor make |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
81 LDFLAGS="$STATIC_FLAGS $LDFLAGS" CC="${ARCH}-cc" ./configure \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
82 --prefix="$STAGE_DIR" --build="${CROSS_HOST}" --host="${CROSS_TARGET}" && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
83 make -j $CPUS && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
84 make -j $CPUS install |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
85 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
86 cleanup |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
87 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
88 # Build and install bash. (Yes, this is an old version. It's intentional.) |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
89 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
90 setupfor bash |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
91 # wire around some tests ./configure can't run when cross-compiling. |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
92 echo -e "ac_cv_func_setvbuf_reversed=no\nbash_cv_sys_named_pipes=yes\nbash_cv_have_mbstate_t=yes\nbash_cv_getenv_redef=no" > config.cache && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
93 LDFLAGS="$STATIC_FLAGS $LDFLAGS" CC="${ARCH}-cc" RANLIB="${ARCH}-ranlib" \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
94 ./configure --prefix="$STAGE_DIR" \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
95 --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --cache-file=config.cache \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
96 --without-bash-malloc --disable-readline && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
97 # note: doesn't work with -j |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
98 make && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
99 make install && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
100 # Make bash the default shell. |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
101 ln -sf bash "$STAGE_DIR/bin/sh" |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
102 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
103 cleanup |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
104 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
105 # Build and install distcc |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
106 |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
107 setupfor distcc |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
108 rsync_cv_HAVE_C99_VSNPRINTF=yes \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
109 LDFLAGS="$STATIC_FLAGS $LDFLAGS" CC="${ARCH}-cc" ./configure \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
110 --host="${CROSS_TARGET}" --prefix="$STAGE_DIR" \ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
111 --with-included-popt --disable-Werror && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
112 make -j $CPUS && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
113 make -j $CPUS install && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
114 mkdir -p "$STAGE_DIR/distcc" || dienow |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
115 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
116 for i in gcc cc g++ c++ |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
117 do |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
118 ln -s ../bin/distcc "$STAGE_DIR/distcc/$i" || dienow |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
119 done |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
120 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
121 cleanup |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
122 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
123 # Delete some unneeded files |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
124 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
125 [ -z "$SKIP_STRIP" ] && |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
126 rm -rf "$STAGE_DIR"/{info,man,libexec/gcc/*/*/install-tools} |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
127 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
128 fi # native compiler |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
129 |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
130 # Clean up and package the result |
713
9282f84b31a1
Add NATIVE_TOOLCHAIN=only, to build _just_ the native toolchain (sae set of packages as the cross compiler, only --enable-shared and with uClibc++).
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
131 |
854
3794d9a0be4c
Add SKIP_STRIP configuration option to do what it says on the tin, and stop blanking CFLAGS and CFLAGSXX so "export CFLAGS=-g" can pass through to package builds.
Rob Landley <rob@landley.net>
parents:
849
diff
changeset
|
132 if [ -z "$SKIP_STRIP" ] |
3794d9a0be4c
Add SKIP_STRIP configuration option to do what it says on the tin, and stop blanking CFLAGS and CFLAGSXX so "export CFLAGS=-g" can pass through to package builds.
Rob Landley <rob@landley.net>
parents:
849
diff
changeset
|
133 then |
944
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
134 "${ARCH}-strip" "$STAGE_DIR"/{bin/*,sbin/*,libexec/gcc/*/*/*} |
fc134a13357e
Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents:
941
diff
changeset
|
135 "${ARCH}-strip" --strip-unneeded "$STAGE_DIR"/lib/*.so |
854
3794d9a0be4c
Add SKIP_STRIP configuration option to do what it says on the tin, and stop blanking CFLAGS and CFLAGSXX so "export CFLAGS=-g" can pass through to package builds.
Rob Landley <rob@landley.net>
parents:
849
diff
changeset
|
136 fi |
53
3fd961e31444
Build a gcc wrapper for _target_, and add a "strip" command to halve the
Rob Landley <rob@landley.net>
parents:
52
diff
changeset
|
137 |
783
db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Rob Landley <rob@landley.net>
parents:
782
diff
changeset
|
138 create_stage_tarball |
576
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
572
diff
changeset
|
139 |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
140 # Color back to normal |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
141 echo -e "\e[0mBuild complete" |