r663 - x86/trunk/packages/binutils

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Sat Sep 17 19:43:06 PDT 2005


Author: jhuntwork
Date: 2005-09-17 20:43:05 -0600 (Sat, 17 Sep 2005)
New Revision: 663

Modified:
   x86/trunk/packages/binutils/Makefile
Log:
Fixed adjusting toolchain commands

Modified: x86/trunk/packages/binutils/Makefile
===================================================================
--- x86/trunk/packages/binutils/Makefile	2005-09-18 02:25:47 UTC (rev 662)
+++ x86/trunk/packages/binutils/Makefile	2005-09-18 02:43:05 UTC (rev 663)
@@ -59,11 +59,15 @@
 	@echo 'main(){}' > dummy.c && cc dummy.c && \
 	 readelf -l a.out > .specstest
 	@if ! cat .specstest | grep -q $(WD) ; then cd $(NM)-build && \
-	 make -C ld install && SPECFILE=`gcc --print-file specs` && \
+	 make -C ld install && SPECFILE=`dirname $$(gcc -print-libgcc-file-name`/specs && \
+	 gcc -dumpspecs > $$SPECFILE && \
          sed 's@ /lib/$(LINKER)@ $(WD)/lib/$(LINKER)@g' \
 	 $$SPECFILE > tempspecfile && \
          mv -f tempspecfile $$SPECFILE && unset SPECFILE && \
-         rm -f $(WD)/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h} && \
+         GCC_INCLUDEDIR=`dirname $$(gcc -print-libgcc-file-name)`/include && \
+	 find $${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rf '{}' \; && \
+	 rm -f `grep -l "DO NOT EDIT THIS FILE" $${GCC_INCLUDEDIR}/*` && \
+	 unset GCC_INCLUDEDIR && \
 	 cd .. && make clean ; fi
 	@touch $@
 
@@ -113,9 +117,10 @@
 	 readelf -l a.out > .specstest
 	@if cat .specstest | grep -q $(WD) ; then cd $(NM)-build && \
 	 make -C ld INSTALL=$(WD)/bin/install install && \
-         perl -pi -e 's@ $(WD)/lib/$(LINKER)@ /lib/$(LINKER)@g;' \
-	 -e 's@\*startfile_prefix_spec:\n@$$_/usr/lib/@g;' \
-	 `gcc --print-file specs` ; fi
+	 SPECFILE=`dirname $$(gcc -print-libgcc-file-name)`/specs && \
+	 gcc -dumpspecs > $$SPECFILE && \
+	 sed -i 's@^$(WD)/lib/$(LINKER)@/lib/$(LINKER)@g' $$SPECFILE &&
+	 unset SPECFILE ; fi
 	@make clean
 	@touch $@
 




More information about the livecd mailing list