changeset 293:cdd26f8acc35

Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error building m68k.
author Rob Landley <rob@landley.net>
date Sat, 02 Feb 2008 00:28:36 -0600
parents 6f1e69d7e7f5
children 87df194d555d
files cross-compiler.sh download.sh mini-native.sh sources/configs/m68k
diffstat 4 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/cross-compiler.sh	Sat Feb 02 00:27:58 2008 -0600
+++ b/cross-compiler.sh	Sat Feb 02 00:28:36 2008 -0600
@@ -20,9 +20,9 @@
 	--target=${CROSS_TARGET} --with-lib-path=lib --disable-nls \
 	--disable-shared --disable-multilib --program-prefix="${ARCH}-" \
 	$BINUTILS_FLAGS &&
-make configure-host &&
+make -j $CPUS configure-host &&
 make -j $CPUS &&
-make install &&
+make -j $CPUS install &&
 cd .. &&
 mkdir -p "${CROSS}/include" &&
 cp binutils/include/libiberty.h "${CROSS}/include" &&
@@ -38,7 +38,7 @@
 	--enable-languages=c --disable-threads --disable-multilib \
 	--disable-nls --disable-shared --program-prefix="${ARCH}-" &&
 make -j $CPUS all-gcc &&
-make install-gcc &&
+make -j $CPUS install-gcc &&
 cd .. &&
 
 echo Fixup toolchain... &&
@@ -94,6 +94,7 @@
 make CROSS= allnoconfig KCONFIG_ALLCONFIG="${WORK}"/miniconfig-uClibc &&
 # Can't use -j here, build is unstable.
 make CROSS="${ARCH}-" KERNEL_HEADERS="${CROSS}/include" PREFIX="${CROSS}/" \
+	UCLIBC_EXTRA_CFLAGS=-fgnu89-inline \
 	RUNTIME_PREFIX=/ DEVEL_PREFIX=/ all install_runtime install_dev &&
 # "make utils" in uClibc is broken for cross compiling.  Either it creates a
 # target binary (which you can't run on the host), or it tries to link the
--- a/download.sh	Sat Feb 02 00:27:58 2008 -0600
+++ b/download.sh	Sat Feb 02 00:28:36 2008 -0600
@@ -37,12 +37,12 @@
 SHA1=a557686eef68362ea31a3aa41ce274e3eeae1ef0 \
 download &&
 
-URL=ftp://ftp.gnu.org/gnu/gcc/gcc-4.1.2/gcc-core-4.1.2.tar.bz2 \
-SHA1=d6875295f6df1bec4a6f4ab8f0da54bfb8d97306 \
+URL=ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.2/gcc-core-4.2.2.tar.bz2 \
+SHA1=0bafb7e60432da2e5a0aad4424dde01c2a5c58bd \
 download &&
 
-URL=http://ftp.gnu.org/gnu/gcc/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2 \
-SHA1=e29c6e151050f8b5ac5d680b99483df522606143 \
+URL=http://ftp.gnu.org/gnu/gcc/gcc-4.2.2/gcc-g++-4.2.2.tar.bz2 \
+SHA1=7a314c8b37e96365913d362d11c15996e573c31d \
 download &&
 
 URL=http://landley.net/code/toybox/downloads/toybox-0.0.4.tar.bz2 \
--- a/mini-native.sh	Sat Feb 02 00:27:58 2008 -0600
+++ b/mini-native.sh	Sat Feb 02 00:28:36 2008 -0600
@@ -38,6 +38,7 @@
 # Can't use -j here, build is unstable.
 make CROSS="${ARCH}-" KERNEL_HEADERS="${TOOLS}/include" PREFIX="${TOOLS}/" \
         RUNTIME_PREFIX=/ DEVEL_PREFIX=/ UCLIBC_LDSO_NAME=ld-uClibc \
+        UCLIBC_EXTRA_CFLAGS=-fgnu89-inline \
         all install_runtime install_dev utils &&
 # utils_install wants to put stuff in usr/bin instead of bin.
 install -m 755 utils/{readelf,ldd,ldconfig} "${TOOLS}/bin" &&
@@ -74,9 +75,9 @@
   --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --target="${CROSS_TARGET}" \
   --disable-nls --disable-shared --disable-multilib --program-prefix= \
   $BINUTILS_FLAGS &&
-make configure-host &&
+make -j $CPUS configure-host &&
 make -j $CPUS &&
-make install &&
+make -j $CPUS install &&
 cd .. &&
 mkdir -p "${TOOLS}/include" &&
 cp binutils/include/libiberty.h "${TOOLS}/include" &&
@@ -93,17 +94,16 @@
 sed -i 's@\./fixinc\.sh@-c true@' "${CURSRC}/gcc/Makefile.in" &&
 # GCC has some deep assumptions about the name of the cross-compiler it should
 # be using.  These assumptions are wrong, and lots of redundant corrections
-# are required to make it stop.
-CC="${ARCH}-gcc" GCC_FOR_TARGET="${ARCH}-gcc" CC_FOR_TARGET="${ARCH}-gcc" \
-  AR="${ARCH}-ar" AR_FOR_TARGET="${ARCH}-ar" AS="${ARCH}-as" LD="${ARCH}-ld" \
-  NM="${ARCH}-nm" NM_FOR_TARGET="${ARCH}-nm" \
-  "${CURSRC}/configure" --prefix="${TOOLS}" --disable-multilib $GCC_FLAGS \
+# are required to make it stop.  Or we can just bonk it on the head with "sed".
+CC="${ARCH}-gcc" "${CURSRC}/configure" --prefix="${TOOLS}" --disable-multilib \
   --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --target="${CROSS_TARGET}" \
   --enable-long-long --enable-c99 --enable-shared --enable-threads=posix \
   --enable-__cxa_atexit --disable-nls --enable-languages=c,c++ \
-  --disable-libstdcxx-pch --program-prefix="" &&
+  --disable-libstdcxx-pch --program-prefix="" $GCC_FLAGS &&
+make -j $CPUS configure-host &&
+find . -name "Makefile*" | xargs sed -ri "s/$CROSS_TARGET-(ar|as|nm|ranlib|gcc|cc|c++)/$ARCH-\1/p" &&
 make -j $CPUS all-gcc &&
-make install-gcc &&
+make -j $CPUS install-gcc &&
 ln -s gcc "${TOOLS}/bin/cc" &&
 cd .. &&
 $CLEANUP gcc-core build-gcc
@@ -130,7 +130,7 @@
 CC="${ARCH}-gcc" ./configure --prefix="${TOOLS}" --build="${CROSS_HOST}" \
   --host="${CROSS_TARGET}" &&
 make -j $CPUS &&
-make install &&
+make -j $CPUS install &&
 cd .. &&
 $CLEANUP make
 
@@ -162,8 +162,8 @@
 
 setupfor distcc
 ./configure --host="${ARCH}" --prefix="${TOOLS}" --with-included-popt &&
-make -j "$CPUS" &&
-make install &&
+make -j $CPUS &&
+make -j $CPUS install &&
 cd .. &&
 $CLEANUP distcc &&
 mkdir -p "${TOOLS}/distcc" &&
--- a/sources/configs/m68k	Sat Feb 02 00:27:58 2008 -0600
+++ b/sources/configs/m68k	Sat Feb 02 00:28:36 2008 -0600
@@ -18,8 +18,6 @@
 
 cat > "${WORK}"/miniconfig-uClibc << 'EOF'
 TARGET_m68k=y
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
 UCLIBC_HAS_FLOATS=y
 UCLIBC_HAS_FPU=y
 DOPIC=y