comparison sources/sections/gcc.sh @ 1183:61e7e9be8eb4

Add blank_workdir and make setupfor and cleanup use it. This means you can run an entire build.sh with NO_CLEANUP=1 on.
author Rob Landley <rob@landley.net>
date Fri, 30 Jul 2010 13:54:10 -0500
parents 3a959ee85558
children 4021fb1183d7
comparison
equal deleted inserted replaced
1182:c5ebf1e353c7 1183:61e7e9be8eb4
2 2
3 # PROGRAM_PREFIX affects the name of the generated tools, ala "${ARCH}-". 3 # PROGRAM_PREFIX affects the name of the generated tools, ala "${ARCH}-".
4 4
5 # Force gcc to build, largely against its will. 5 # Force gcc to build, largely against its will.
6 6
7 setupfor gcc-core build-gcc 7 setupfor gcc-core
8 [ -z "$NO_CPLUSPLUS" ] && setupfor gcc-g++ build-gcc gcc-core 8 [ -z "$NO_CPLUSPLUS" ] && REUSE_CURSRC=1 setupfor gcc-g++
9
10 blank_workdir build-gcc
9 11
10 # GCC tries to "help out in the kitchen" by screwing up the kernel include 12 # GCC tries to "help out in the kitchen" by screwing up the kernel include
11 # files. Surgery with sed to cut out that horrible idea throw it away. 13 # files. Surgery with sed to cut out that horrible idea throw it away.
12 14
13 sed -i 's@^STMP_FIX.*@@' "${CURSRC}/gcc/Makefile.in" || dienow 15 sed -i 's@^STMP_FIX.*@@' "${CURSRC}/gcc/Makefile.in" || dienow
138 ln -s cc "$STAGE_DIR/tools/bin/gcc" 2>/dev/null 140 ln -s cc "$STAGE_DIR/tools/bin/gcc" 2>/dev/null
139 [ -z "$NO_CPLUSPLUS" ] && ln -s c++ "$STAGE_DIR/tools/bin/g++" 2>/dev/null 141 [ -z "$NO_CPLUSPLUS" ] && ln -s c++ "$STAGE_DIR/tools/bin/g++" 2>/dev/null
140 142
141 rm -rf "${STAGE_DIR}"/{lib/gcc,libexec/gcc/install-tools,bin/${ARCH}-unknown-*} 143 rm -rf "${STAGE_DIR}"/{lib/gcc,libexec/gcc/install-tools,bin/${ARCH}-unknown-*}
142 144
143 # Little dance so binary package tarball would be called "gcc", not "gcc-core". 145 # Call binary package tarball "gcc", not "gcc-core".
144 if [ -z "$NO_CLEANUP" ] 146
145 then 147 PACKAGE=gcc cleanup
146 mv "$WORK"/{*gcc-core,gcc}
147 fi
148 PACKAGE=gcc cleanup build-gcc