annotate sources/sections/ccwrap.sh @ 1458:60f1087591ac

Add ability to specify a package to rebuild to build.sh with REBUILD= (and then dependencies take it from there to the system image).
author Rob Landley <rob@landley.net>
date Thu, 20 Oct 2011 02:02:10 -0500
parents a36e985f6198
children c5b158bdaa3f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1210
a36e985f6198 Untangle static vs cross for ccwrap section.
Rob Landley <rob@landley.net>
parents: 1207
diff changeset
1 # build and install gcc wrapper
905
023b577fb865 Break up sources/sections/binutils-gcc.sh into binutils, gcc, and ccwrap, plus more gcc->cc cleanup.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1085
2e03f846b21e Build ccwrap static unless BUILD_STATIC=none or we're doing the simple cross compiler.
Rob Landley <rob@landley.net>
parents: 981
diff changeset
3 # Which compiler do we build the wrapper with, and should it be static?
905
023b577fb865 Break up sources/sections/binutils-gcc.sh into binutils, gcc, and ccwrap, plus more gcc->cc cleanup.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
1210
a36e985f6198 Untangle static vs cross for ccwrap section.
Rob Landley <rob@landley.net>
parents: 1207
diff changeset
5 [ "$BUILD_STATIC" == none ] && STATIC_FLAGS= || STATIC_FLAGS=--static
a36e985f6198 Untangle static vs cross for ccwrap section.
Rob Landley <rob@landley.net>
parents: 1207
diff changeset
6 [ -z "$HOST_ARCH" ] && TEMP="$CC" || TEMP="${HOST_ARCH}-cc"
905
023b577fb865 Break up sources/sections/binutils-gcc.sh into binutils, gcc, and ccwrap, plus more gcc->cc cleanup.
Rob Landley <rob@landley.net>
parents:
diff changeset
7
023b577fb865 Break up sources/sections/binutils-gcc.sh into binutils, gcc, and ccwrap, plus more gcc->cc cleanup.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 # Build wrapper binary
023b577fb865 Break up sources/sections/binutils-gcc.sh into binutils, gcc, and ccwrap, plus more gcc->cc cleanup.
Rob Landley <rob@landley.net>
parents:
diff changeset
9
920
a69213462fbe If "$CCWRAP" is quoted it gets passed in as a blank argument when empty, confusing the compiler.
Rob Landley <rob@landley.net>
parents: 918
diff changeset
10 "$TEMP" "$SOURCES/toys/ccwrap.c" -Os $CFLAGS \
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: 1090
diff changeset
11 -o "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}cc" $STATIC_FLAGS || dienow