comparison root-filesystem.sh @ 1828:297a5d07c73b draft

There are some uses of ${ARCH}-cc and ${ARCH}-strip remaining in root-filesystem.sh. Below is a patch to replace them with ${CC_PREFIX}. Also I'll first sneak in a small patch to change PS1 in init.sh to expand the HOST and CPUS vars.
author Geoff Salmon <geoff@se-instruments.com>
date Thu, 10 Dec 2015 01:43:42 -0600
parents fb05f99ffcce
children
comparison
equal deleted inserted replaced
1827:c7b90f8d1b80 1828:297a5d07c73b
52 build_section toybox 52 build_section toybox
53 53
54 # Put statically and dynamically linked hello world programs on there for 54 # Put statically and dynamically linked hello world programs on there for
55 # test purposes. 55 # test purposes.
56 56
57 "${ARCH}-cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS \ 57 "${CC_PREFIX}cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS \
58 -o "$STAGE_USR/bin/hello-dynamic" || dienow 58 -o "$STAGE_USR/bin/hello-dynamic" || dienow
59 59
60 if [ "$BUILD_STATIC" != none ] 60 if [ "$BUILD_STATIC" != none ]
61 then 61 then
62 "${ARCH}-cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS -static \ 62 "${CC_PREFIX}cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS -static \
63 -o "$STAGE_USR/bin/hello-static" || dienow 63 -o "$STAGE_USR/bin/hello-static" || dienow
64 STATIC=--static 64 STATIC=--static
65 else 65 else
66 STATIC= 66 STATIC=
67 fi 67 fi
68 68
69 # Debug wrapper for use with /usr/src/record-commands.sh 69 # Debug wrapper for use with /usr/src/record-commands.sh
70 70
71 "${ARCH}-cc" "$SOURCES/toys/wrappy.c" -Os $CFLAGS $STATIC \ 71 "${CC_PREFIX}cc" "$SOURCES/toys/wrappy.c" -Os $CFLAGS $STATIC \
72 -o "$STAGE_USR/bin/record-commands-wrapper" || dienow 72 -o "$STAGE_USR/bin/record-commands-wrapper" || dienow
73 73
74 # Do we need shared libraries? 74 # Do we need shared libraries?
75 75
76 if ! is_in_list toybox $BUILD_STATIC || ! is_in_list busybox $BUILD_STATIC 76 if ! is_in_list toybox $BUILD_STATIC || ! is_in_list busybox $BUILD_STATIC
77 then 77 then
78 echo Copying compiler libraries... 78 echo Copying compiler libraries...
79 mkdir -p "$STAGE_USR/lib" || dienow 79 mkdir -p "$STAGE_USR/lib" || dienow
80 (path_search \ 80 (path_search \
81 "$("$ARCH-cc" --print-search-dirs | sed -n 's/^libraries: =*//p')" \ 81 "$("${CC_PREFIX}cc" --print-search-dirs | sed -n 's/^libraries: =*//p')" \
82 "*.so*" 'cp -H "$DIR/$FILE" "$STAGE_USR/lib/$FILE"' \ 82 "*.so*" 'cp -H "$DIR/$FILE" "$STAGE_USR/lib/$FILE"' \
83 || dienow) | dotprogress 83 || dienow) | dotprogress
84 84
85 [ -z "$SKIP_STRIP" ] && 85 [ -z "$SKIP_STRIP" ] &&
86 "${ARCH}-strip" --strip-unneeded "$STAGE_USR"/lib/*.so 86 "${CC_PREFIX}strip" --strip-unneeded "$STAGE_USR"/lib/*.so
87 fi 87 fi
88 88
89 # Clean up and package the result 89 # Clean up and package the result
90 90
91 [ -z "$SKIP_STRIP" ] && 91 [ -z "$SKIP_STRIP" ] &&
92 "${ARCH}-strip" "$STAGE_USR"/{bin/*,sbin/*} 92 "${CC_PREFIX}strip" "$STAGE_USR"/{bin/*,sbin/*}
93 93
94 create_stage_tarball 94 create_stage_tarball
95 95
96 # Color back to normal 96 # Color back to normal
97 echo -e "\e[0mBuild complete" 97 echo -e "\e[0mBuild complete"