[PATCH] Re: crosstool-0.35 w/ NPTL patch running demo-i686-nptl.sh fails building libc

Greg Schafer gschafer@zip.com.au
Thu Jun 30 01:13:00 GMT 2005


On Wed, Jun 29, 2005 at 05:41:15PM -0700, Daniel Kegel wrote:

> Patches gratefully accepted any time.

Try this on for size. Of course it's completely untested...

NOTE, I've only ever studied Crosstool.. never actually run it :-)

You'd also want to drop the Glibc `make-install-lib-all.patch'.

Regards
Greg
-------------- next part --------------
diff -Naur crosstool-0.35.orig/crosstool.sh crosstool-0.35/crosstool.sh
--- crosstool-0.35.orig/crosstool.sh	2005-05-20 16:43:47.000000000 +1000
+++ crosstool-0.35/crosstool.sh	2005-06-30 11:07:56.000000000 +1000
@@ -386,6 +386,10 @@
 
 test -x $CORE_PREFIX/bin/${TARGET}-gcc${EXEEXT} || abort Build failed during gcc-core 
 
+# A libgcc_eh.a symlink is needed to satisfy the upcoming Glibc build. Please
+# see http://sources.redhat.com/ml/crossgcc/2005-06/msg00070.html
+ln -s libgcc.a `$TARGET-gcc -print-search-dirs | head -n 1 | awk '{ print $2 }'`libgcc_eh.a
+
 #---------------------------------------------------------
 echo Build glibc and linuxthreads
 
@@ -420,29 +424,14 @@
         --enable-add-ons${GLIBC_ADDON_OPTIONS} --with-headers=$HEADERDIR
 fi
 
-if grep -l '^install-lib-all:' ${GLIBC_DIR}/Makerules > /dev/null; then
-    # nptl-era glibc.
-    # If the install-lib-all target (which is added by our make-install-lib-all.patch) is present,
-    # it means we're building glibc-2.3.3 or later, and we can't build programs yet,
-    # as they require libeh, which won't be installed until full build of gcc
-    GLIBC_INITIAL_BUILD_RULE=lib
-    GLIBC_INITIAL_INSTALL_RULE="install-lib-all install-headers"
-    GLIBC_INSTALL_APPS_LATER=yes
-else
-    # classic glibc.  
-    # We can build and install everything with the bootstrap compiler.
-    GLIBC_INITIAL_BUILD_RULE=all
-    GLIBC_INITIAL_INSTALL_RULE=install
-    GLIBC_INSTALL_APPS_LATER=no
-fi
 # If this fails with an error like this:
 # ...  linux/autoconf.h: No such file or directory 
 # then you need to set the KERNELCONFIG variable to point to a .config file for this arch.
 # The following architectures are known to need kernel .config: alpha, arm, ia64, s390, sh, sparc
 # Note: LD and RANLIB needed by glibc-2.1.3's c_stub directory, at least on macosx
 # No need for PARALLELMFLAGS here, Makefile already reads this environment variable
-make LD=${TARGET}-ld RANLIB=${TARGET}-ranlib $GLIBC_INITIAL_BUILD_RULE
-make install_root=${SYSROOT} $GLIBC_SYSROOT_ARG $GLIBC_INITIAL_INSTALL_RULE
+make LD=${TARGET}-ld RANLIB=${TARGET}-ranlib
+make install_root=${SYSROOT} $GLIBC_SYSROOT_ARG
 
 # This doesn't seem to work when building a crosscompiler,
 # as it tries to execute localedef using the just-built ld.so!?
@@ -550,18 +539,6 @@
 
 test -x ${PREFIX}/bin/${TARGET}-gcc${EXEEXT} || Build failed during final gcc 
 
-# Finally, build and install glibc programs, now that libeh (if any) is installed
-# Don't do this unless needed, 'cause it causes glibc-2.{1.3,2.2} to fail here with
-# .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__deregister_frame_info'
-# .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__register_frame_info'
-if test x$GLIBC_INSTALL_APPS_LATER = xyes;
-then
-  cd build-glibc
-  make LD=${TARGET}-ld RANLIB=${TARGET}-ranlib
-  # note: should do full install and then fix linker scripts, but this is faster
-  make install_root=${SYSROOT} $GLIBC_SYSROOT_ARG install-bin install-rootsbin install-sbin install-data install-others
-fi
-
 # Create masquerade directory $PREFIX/distributed/bin for distcc
 # Relies on $EXEEXT being set to .exe if the compilers run on cygwin
 export EXEEXT

-------------- next part --------------
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


More information about the crossgcc mailing list