patches/gcc/4.0.4/120-libstdc++-pic.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jul 31 09:08:33 2008 +0000 (2008-07-31)
changeset 752 b037a5643e04
parent 1 eeea35fbf182
permissions -rw-r--r--
Have the glibc build use the cross-objdump, rather than the host one.
On some distros (eg. Fedora), the native objdump can not interpret objects not for the native system, and thus fail.
This commit adds a new patch against glibc-2.7 that introduces OBJDUMP_FOR_HOST, wich, if set, overides the detected objdump.

Note: bizarely enough, glibc already has code to detect the cross-objdump, but that does not work for an unknown reason... :-(

/trunk/patches/glibc/2.7/220-objdump_for_host.patch | 13 13 0 0 +++++++++
/trunk/scripts/build/libc_glibc.sh | 37 21 16 0 +++++++++++++++------------
2 files changed, 34 insertions(+), 16 deletions(-)
     1 --- gcc-4.0.0/libstdc++-v3/src/Makefile.am
     2 +++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
     3 @@ -214,6 +214,10 @@
     4  	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
     5  
     6  
     7 +install-exec-local:
     8 +	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
     9 +	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
    10 +
    11  # Added bits to build debug library.
    12  if GLIBCXX_BUILD_DEBUG
    13  all-local: build_debug
    14 --- gcc-4.0.0/libstdc++-v3/src/Makefile.in
    15 +++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
    16 @@ -625,7 +625,7 @@
    17  
    18  install-data-am: install-data-local
    19  
    20 -install-exec-am: install-toolexeclibLTLIBRARIES
    21 +install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
    22  
    23  install-info: install-info-am
    24  
    25 @@ -664,7 +664,7 @@
    26  	maintainer-clean-generic mostlyclean mostlyclean-compile \
    27  	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
    28  	tags uninstall uninstall-am uninstall-info-am \
    29 -	uninstall-toolexeclibLTLIBRARIES
    30 +	uninstall-toolexeclibLTLIBRARIES install-exec-local
    31  
    32  @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver:  ${glibcxx_srcdir}/$(SYMVER_MAP)
    33  @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@	cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
    34 @@ -743,6 +743,11 @@
    35  install_debug:
    36  	(cd ${debugdir} && $(MAKE) \
    37  	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
    38 +
    39 +install-exec-local:
    40 +	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
    41 +	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
    42 +
    43  # Tell versions [3.59,3.63) of GNU make to not export all variables.
    44  # Otherwise a system limit (for SysV at least) may be exceeded.
    45  .NOEXPORT: