Mercurial > hg > aboriginal
annotate sources/sections/uClibc.build @ 979:88b354c0eee1
Tweak mercurial repo entry and add link to current snapshot.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 16 Feb 2010 06:57:14 -0600 |
parents | edf9264f2d26 |
children | 1d776e44b908 |
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 |
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
|
3 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
|
4 { |
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
|
5 make -j $CPUS $VERBOSITY CROSS="${ARCH}-" \ |
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
|
6 UCLIBC_LDSO_NAME=ld-uClibc KERNEL_HEADERS="$STAGE_DIR/include" \ |
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
|
7 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
|
8 } |
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
|
9 |
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
|
10 # 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
|
11 |
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
|
12 if unstable uClibc && [ -e "$CONFIG_DIR/$ARCH/miniconfig-alt-uClibc" ] |
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
|
13 then |
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
|
14 cp "$CONFIG_DIR/$ARCH/miniconfig-alt-uClibc" "$WORK/mini.conf" || dienow |
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
|
15 echo using miniconfig-alt-uClibc |
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
|
16 else |
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
|
17 cp "$SOURCES/baseconfig-uClibc" "$WORK/mini.conf" && |
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
|
18 echo "$UCLIBC_CONFIG" >> "$WORK/mini.conf" || dienow |
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
|
19 echo Creating miniconfig for uClibc |
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
|
20 fi |
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
|
21 |
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 # 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
|
23 |
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
|
24 make KCONFIG_ALLCONFIG="$WORK/mini.conf" allnoconfig && |
964
edf9264f2d26
Make root filesystem's usr/src has config-linux and config-uClibc as well as config-busybox.
Rob Landley <rob@landley.net>
parents:
938
diff
changeset
|
25 cp .config "$STAGE_DIR/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 |
872
a5d7e6ad7aa4
Mike Frysinger decided that the readelf Erik Anderson wrote was too hard for him to understand, so he removed it from uClibc-git. So we allow the utils rename to fail if components aren't there, and perhaps I'll fork my own copy of readelf and maintain it myself.
Rob Landley <rob@landley.net>
parents:
871
diff
changeset
|
28 # Do we need host or target versions of ldd and such? |
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
|
29 |
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
|
30 if [ ! -z "$HOST_UTILS" ] |
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
|
31 then |
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
|
32 make_uClibc hostutils || 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
|
33 |
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
|
34 for i in $(cd utils; ls *.host | sed 's/\.host//') |
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 do |
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
|
36 cp utils/"$i".host "$STAGE_DIR/bin/$ARCH-$i" || dienow |
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 done |
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
|
38 else |
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
|
39 make_uClibc install_utils || 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
|
40 |
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
|
41 # There's no way to specify a prefix for the uClibc utils; rename by hand. |
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
|
42 |
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
|
43 if [ ! -z "$PROGRAM_PREFIX" ] |
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
|
44 then |
821
126be4c2f1d0
Move ldconfig from sbin to bin for the static cross compiler, so we only have to add one directory to the $PATH. (And fix the build break trying to rename it with the $ARCH- prefix and not finding it in bin.)
Rob Landley <rob@landley.net>
parents:
820
diff
changeset
|
45 mv "${STAGE_DIR}"/{sbin,bin}/ldconfig || 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 for i in ldd readelf ldconfig |
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
|
47 do |
872
a5d7e6ad7aa4
Mike Frysinger decided that the readelf Erik Anderson wrote was too hard for him to understand, so he removed it from uClibc-git. So we allow the utils rename to fail if components aren't there, and perhaps I'll fork my own copy of readelf and maintain it myself.
Rob Landley <rob@landley.net>
parents:
871
diff
changeset
|
48 mv "$STAGE_DIR/bin/"{"$i","${PROGRAM_PREFIX}$i"} |
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
|
49 done |
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
|
50 fi |
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
|
51 fi |