Mercurial > hg > aboriginal
annotate sources/sections/uClibc.build @ 1439:d2b121fc1567
Use the ext4 driver for ext3 and ext2 filesystems.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 10 Sep 2011 08:03:10 -0500 |
parents | 5e22b534839a |
children | 923dbb2a8f19 |
rev | line source |
---|---|
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 # Build and install uClibc |
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
1340
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
3 # Work around a uClibc bug: it tries to use assembly directives on binutils |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
4 # versions that don't have them. |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
5 |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
6 find . -name uClibc_arch_features.h | xargs sed -i 's/\#define \(__UCLIBC_HAVE_ASM_CFI_DIRECTIVES__\)/#undef \1/' |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
7 |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
8 [ ! -z "$BUILD_VERBOSE" ] && VERBOSITY=V=2 |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
9 |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 make_uClibc() |
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 { |
1090
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
12 make -j $CPUS $VERBOSITY CROSS="${ARCH}-" \ |
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
13 UCLIBC_LDSO_NAME=ld-uClibc KERNEL_HEADERS="$STAGE_DIR/include" \ |
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
14 PREFIX="$STAGE_DIR/" RUNTIME_PREFIX=/ DEVEL_PREFIX=/ $1 |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 } |
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 |
938
609bc05b0d6a
Teach build_section to run "*.build" sections (with setupfor/cleanup called for them) as well as "*.sh" sections which do their own setup/cleanup.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
17 # Configure |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 |
1152
2f39d1bfb2fd
Add baseconfig-linux, the infrastructure to use it, and move over the arm targets. (You can override with a miniconfig-linux or miniconfig-uClibc in the appropriate target directory.)
Rob Landley <rob@landley.net>
parents:
1136
diff
changeset
|
19 getconfig uClibc > "$WORK/mini.conf" || dienow |
938
609bc05b0d6a
Teach build_section to run "*.build" sections (with setupfor/cleanup called for them) as well as "*.sh" sections which do their own setup/cleanup.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
20 |
609bc05b0d6a
Teach build_section to run "*.build" sections (with setupfor/cleanup called for them) as well as "*.sh" sections which do their own setup/cleanup.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
21 # Build and install |
609bc05b0d6a
Teach build_section to run "*.build" sections (with setupfor/cleanup called for them) as well as "*.sh" sections which do their own setup/cleanup.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
22 |
871
b274eb556b50
Merge common uclibc miniconfig stuff into baseconfig-uClibc, and add the few lines that vary per target to each target's settings file.
Rob Landley <rob@landley.net>
parents:
821
diff
changeset
|
23 make KCONFIG_ALLCONFIG="$WORK/mini.conf" allnoconfig && |
1065
1d776e44b908
Save the uClibc and linux .config files in the native toolchain, and install them with the rest of the native toolchain. Don't bother extracting and configuring the kernel if we don't need to.
Rob Landley <rob@landley.net>
parents:
964
diff
changeset
|
24 mkdir -p "$STAGE_DIR/src" && |
1d776e44b908
Save the uClibc and linux .config files in the native toolchain, and install them with the rest of the native toolchain. Don't bother extracting and configuring the kernel if we don't need to.
Rob Landley <rob@landley.net>
parents:
964
diff
changeset
|
25 cp .config "$STAGE_DIR/src/config-uClibc" && |
938
609bc05b0d6a
Teach build_section to run "*.build" sections (with setupfor/cleanup called for them) as well as "*.sh" sections which do their own setup/cleanup.
Rob Landley <rob@landley.net>
parents:
906
diff
changeset
|
26 make_uClibc install || dienow |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
27 |
1340
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
28 # Old versions of uClibc (0.9.30-ish) couldn't be told not to hardwire absolute |
5e22b534839a
Switch to from pthreads.old to NPTL.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
29 # paths into their linker scripts. This isn't needed for current versions, and |
1136
fb05d8a5fd77
Oops, a debug bit leaked. Keep it in but make it not fail when HAVE_SHARED=n.
Rob Landley <rob@landley.net>
parents:
1130
diff
changeset
|
30 # is allowed to fail if HAVE_SHARED=n |
fb05d8a5fd77
Oops, a debug bit leaked. Keep it in but make it not fail when HAVE_SHARED=n.
Rob Landley <rob@landley.net>
parents:
1130
diff
changeset
|
31 |
fb05d8a5fd77
Oops, a debug bit leaked. Keep it in but make it not fail when HAVE_SHARED=n.
Rob Landley <rob@landley.net>
parents:
1130
diff
changeset
|
32 sed -i 's@/lib/@@g' "$STAGE_DIR/lib/libc.so" 2>/dev/null |
1130
c222ae88733a
Add NO_CPLUSPLUS config option, to skip c++ support entirely.
Rob Landley <rob@landley.net>
parents:
1090
diff
changeset
|
33 |
1090
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
34 # Build ldd and friends |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 |
1090
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
36 if [ ! -z "$HOST_ARCH" ] |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 then |
1090
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
38 # The uClibc utils/Makefile.in is crazy. There's no way to specify a prefix, |
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
39 # or to pass in --static via CFLAGS. Just build 'em by hand. |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 |
1207
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
41 "$ARCH-cc" utils/ldd.c -o "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}ldd" --static \ |
1090
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
42 -I ldso/include -DBUILDING_LINKAGE && |
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
43 "$ARCH-cc" utils/ldconfig.c utils/chroot_realpath.c \ |
1207
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
44 -o "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}ldconfig" --static -I ldso/include \ |
1090
affef1edbdba
Cleanup "FROM_ARCH" mess. Rename FROM_ARCH->HOST_ARCH, make stage script responsible for setting HOST_ARCH (not includes.sh). Also, remove HOST_UTILS variable, only build uClibc utils for non-simple compilers and bypass uClibc's (weird) makefile for the utils directory.
Rob Landley <rob@landley.net>
parents:
1082
diff
changeset
|
45 -DUCLIBC_RUNTIME_PREFIX='"/"' -DBUILDING_LINKAGE || dienow |
819
da1ebb2e22d3
Part one of the great refactoring, breaking out the uClibc build so it isn't repeated in two places.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 fi |