r1832 - in trunk/toolchain

stsp at dslinux.in-berlin.de stsp at dslinux.in-berlin.de
Mon Jul 23 13:30:02 CEST 2007


Author: stsp
Date: 2007-07-23 13:29:56 +0200 (Mon, 23 Jul 2007)
New Revision: 1832

Log:
Update gcc from 4.0.2 to 4.0.4.

Merge upstream changes in 8bit/arm.md for gcc 4.0.4.

Also, add diffs for future gcc versions. Currently gcc versions
higher than 4.0.x seem to break userland binaries completely,
i.e. the kernel boots but init just data aborts. But I am committing
patches for higher gcc versions anyway so we don't need to start from
scratch should we ever update gcc again. The patches add 8bit write
support and contain all necessary compile fixes.

Also change elf2flt to preserve .gdb files.

And, most importantly, fix estimated distfile download size in README.


Modified: trunk/toolchain/8bit/arm.md
===================================================================
--- trunk/toolchain/8bit/arm.md	2007-07-22 22:41:15 UTC (rev 1831)
+++ trunk/toolchain/8bit/arm.md	2007-07-23 11:29:56 UTC (rev 1832)
@@ -5209,11 +5209,12 @@
   "
 )
 
+;; Transform a floating-point move of a constant into a core register into
+;; an SImode operation.
 (define_split
-  [(set (match_operand:SF 0 "nonimmediate_operand" "")
+  [(set (match_operand:SF 0 "arm_general_register_operand" "")
 	(match_operand:SF 1 "immediate_operand" ""))]
   "TARGET_ARM
-   && !(TARGET_HARD_FLOAT && TARGET_FPA)
    && reload_completed
    && GET_CODE (operands[1]) == CONST_DOUBLE"
   [(set (match_dup 2) (match_dup 3))]

Added: trunk/toolchain/8bit/gcc-4.1.2-8bit.diff

Added: trunk/toolchain/8bit/gcc-4.2.0-8bit.diff

Modified: trunk/toolchain/Makefile
===================================================================
--- trunk/toolchain/Makefile	2007-07-22 22:41:15 UTC (rev 1831)
+++ trunk/toolchain/Makefile	2007-07-23 11:29:56 UTC (rev 1832)
@@ -25,7 +25,7 @@
 EIGHTBIT_DIR	:= $(CWD)/8bit
 
 BINUTILS_VER	= 2.17
-GCC_VER		= 4.0.2
+GCC_VER		= 4.0.4
 ELF2FLT_VER	= 20051225
 GENROMFS_VER	= 0.5.1
 LIBELF_VER	= 0.8.8
@@ -40,8 +40,8 @@
 # We do basic MD5 checking to prevent hassle with broken downloads.
 BINUTILS_DIST_MD5	= e26e2e06b6e4bf3acf1dc8688a94c0d1
 ELF2FLT_DIST_MD5	= 704ee32b30c58307bb5187d5ea9c7e2b
-GCC_DIST_MD5		= f7781398ada62ba255486673e6274b26
-GPP_DIST_MD5		= 97da403f4756d9e0b896368fd25c84df
+GCC_DIST_MD5		= 193e0a7a471cca70e374974bc5a60137
+GPP_DIST_MD5		= 5c79e6af5b49dd9cfd22001f3856f447
 GENROMFS_DIST_MD5	= fee69ecbf8f990fdb0ca0c7267c13e7e
 LIBELF_DIST_MD5		= be84e553686dd50c8b6d520f86f46521
 
@@ -374,9 +374,12 @@
 
 # fetch distfile for gcc
 $(DISTDIR)/$(GCC_DIST):
-	cd $(DISTDIR) && $(FETCH_CMD) $(GCC_URL) \
-		&& $(FETCH_CMD) $(GPP_URL)
+	cd $(DISTDIR) && $(FETCH_CMD) $(GCC_URL)
 
+# fetch distfile for g++
+$(DISTDIR)/$(GPP_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(GPP_URL)
+
 # unpack gcc (stage 1)
 $(GCC_SRCDIR)/.stage1-unpacked: $(DISTDIR)/$(GCC_DIST)
 	test "`md5sum $(DISTDIR)/$(GCC_DIST) | cut -d' ' -f 1`" \
@@ -407,7 +410,8 @@
 		--with-gnu-as \
 		--disable-shared \
 		--disable-threads \
-		--disable-nls
+		--disable-nls \
+		--disable-libssp
 	touch $@
 
 # compile gcc (stage 1)
@@ -421,7 +425,7 @@
 	touch $@
 
 # unpack gcc (stage 2)
-$(GCC_SRCDIR)/.stage2-unpacked: $(DISTDIR)/$(GCC_DIST)
+$(GCC_SRCDIR)/.stage2-unpacked: $(DISTDIR)/$(GCC_DIST) $(DISTDIR)/$(GPP_DIST)
 	test "`md5sum $(DISTDIR)/$(GCC_DIST) | cut -d' ' -f 1`" \
 		= "$(GCC_DIST_MD5)"
 	test "`md5sum $(DISTDIR)/$(GPP_DIST) | cut -d' ' -f 1`" \
@@ -432,7 +436,7 @@
 
 # patch gcc (stage 2)
 $(GCC_SRCDIR)/.stage2-patched: $(GCC_SRCDIR)/.stage2-unpacked
-	patch -d $(GCC_SRCDIR) -p1 < $(PATCHDIR)/gcc-$(GCC_VER).diff
+	patch -d $(GCC_SRCDIR) -p1 < $(PATCHDIR)/g++-$(GCC_VER).diff
 	# Use Amadeus' ARM code generator that fixes the 8bit write problem
 	$(foreach f,arm.h arm.md predicates.md t-arm-elf, \
 		cp $(EIGHTBIT_DIR)/$(f) $(GCC_SRCDIR)/gcc/config/arm/;)
@@ -455,7 +459,8 @@
 		--with-gnu-as \
 		--disable-shared \
 		--disable-threads \
-		--disable-nls
+		--disable-nls \
+		--disable-libssp
 	touch $@
 
 # compile gcc (stage 2)
@@ -596,7 +601,6 @@
 	rm -f $(CWD)/.stripped
 
 # Strip the size of the toolchain down as much as possible.
-# Note: Running this target twice will produce an error :(
 $(CWD)/.stripped:
 	# remove large pre-compiled C++ headers
 	rm -rf $(PREFIX)/include/c++/$(GCC_VER)/$(TARGET)/bits/stdc++.h.gch
@@ -610,18 +614,9 @@
 	-strip $(PREFIX)/libexec/gcc/$(TARGET)/$(GCC_VER)/*
 	-strip $(PREFIX)/libexec/gcc/$(TARGET)/$(GCC_VER)/install-tools/*
 	# strip debug symbols from libraries
-	strip --strip-debug $(PREFIX)/lib/*.a
-	$(TARGET)-strip --strip-debug $(PREFIX)/$(TARGET)/lib/*.o
-	$(TARGET)-strip --strip-debug $(PREFIX)/$(TARGET)/lib/*.a
-	$(TARGET)-strip --strip-debug $(PREFIX)/$(TARGET)/lib/thumb/*.a
-	$(TARGET)-strip --strip-debug $(PREFIX)/lib/gcc/$(TARGET)/$(GCC_VER)/*.o
-	$(TARGET)-strip --strip-debug $(PREFIX)/lib/gcc/$(TARGET)/$(GCC_VER)/*.a
-	$(TARGET)-strip --strip-debug $(PREFIX)/lib/gcc/$(TARGET)/$(GCC_VER)/thumb/*.o
-	$(TARGET)-strip --strip-debug $(PREFIX)/lib/gcc/$(TARGET)/$(GCC_VER)/thumb/*.a
-	$(foreach d, multibase nopic pic singlebase strb swpb, \
-		$(TARGET)-strip --strip-debug $(PREFIX)/$(TARGET)/lib/$d/*.a; \
-		$(TARGET)-strip --strip-debug $(PREFIX)/$(TARGET)/lib/$d/*/*.a; \
-		$(TARGET)-strip --strip-debug $(PREFIX)/$(TARGET)/lib/$d/*/*/*.a;)
+	find $(PREFIX)/$(TARGET)/lib -name *.[oa] -exec $(TARGET)-strip -g {} \;
+	find $(PREFIX)/lib/gcc/$(TARGET)/$(GCC_VER)/ -name *.[ao] \
+		-exec $(TARGET)-strip -g {} \;
 	touch $@
 
 #######################################################################

Modified: trunk/toolchain/README
===================================================================
--- trunk/toolchain/README	2007-07-22 22:41:15 UTC (rev 1831)
+++ trunk/toolchain/README	2007-07-23 11:29:56 UTC (rev 1832)
@@ -38,7 +38,7 @@
 All this software should be packaged with any general purpose Linux
 distribution.
 
-The build will want to download a couple of files (about 30MB total).
+The build will want to download a couple of files (about 40MB total).
 If you want to get the files now and build the toolchain later, run:
 
         make fetch

Modified: trunk/toolchain/patches/elf2flt-20051225.diff
===================================================================
--- trunk/toolchain/patches/elf2flt-20051225.diff	2007-07-22 22:41:15 UTC (rev 1831)
+++ trunk/toolchain/patches/elf2flt-20051225.diff	2007-07-23 11:29:56 UTC (rev 1832)
@@ -1,6 +1,6 @@
-diff -urN elf2flt-20051225-orig/elf2flt.c elf2flt-20051225/elf2flt.c
---- elf2flt-20051225-orig/elf2flt.c	2005-09-28 07:26:02.000000000 +0200
-+++ elf2flt-20051225/elf2flt.c	2007-07-22 21:21:50.000000000 +0200
+diff -urN elf2flt-20051225.orig/elf2flt.c elf2flt-20051225/elf2flt.c
+--- elf2flt-20051225.orig/elf2flt.c	Wed Sep 28 07:26:02 2005
++++ elf2flt-20051225/elf2flt.c	Mon Jul 23 00:17:42 2007
 @@ -687,7 +687,7 @@
  			/* Adjust the address to account for the GOT table which wasn't
  			 * present in the relative file link.
@@ -19,9 +19,9 @@
  			fprintf(stderr, "Can't run cmd %s\n", cmd); \
  			exit(4); \
  		} \
-diff -urN elf2flt-20051225-orig/elf2flt.ld elf2flt-20051225/elf2flt.ld
---- elf2flt-20051225-orig/elf2flt.ld	2005-08-25 04:19:42.000000000 +0200
-+++ elf2flt-20051225/elf2flt.ld	2007-07-22 21:19:13.000000000 +0200
+diff -urN elf2flt-20051225.orig/elf2flt.ld elf2flt-20051225/elf2flt.ld
+--- elf2flt-20051225.orig/elf2flt.ld	Thu Aug 25 04:19:42 2005
++++ elf2flt-20051225/elf2flt.ld	Mon Jul 23 00:17:42 2007
 @@ -24,7 +24,6 @@
  
  W_RODAT		*(.rodata)
@@ -52,9 +52,9 @@
  		/* Microblaze has .sdata and .sbss (small bss).  They must
  		   be contiguous, so please don't move any of this. JW */
  		_ssrw = . ;			
-diff -urN elf2flt-20051225-orig/flthdr.c elf2flt-20051225/flthdr.c
---- elf2flt-20051225-orig/flthdr.c	2005-09-28 07:26:02.000000000 +0200
-+++ elf2flt-20051225/flthdr.c	2007-07-22 21:19:13.000000000 +0200
+diff -urN elf2flt-20051225.orig/flthdr.c elf2flt-20051225/flthdr.c
+--- elf2flt-20051225.orig/flthdr.c	Wed Sep 28 07:26:02 2005
++++ elf2flt-20051225/flthdr.c	Mon Jul 23 00:17:42 2007
 @@ -242,7 +242,7 @@
  		}
  
@@ -82,10 +82,10 @@
  		ofp_is_pipe = 1;
  	}
  
-diff -urN elf2flt-20051225-orig/ld-elf2flt.in elf2flt-20051225/ld-elf2flt.in
---- elf2flt-20051225-orig/ld-elf2flt.in	2005-04-19 00:00:48.000000000 +0200
-+++ elf2flt-20051225/ld-elf2flt.in	2007-07-22 21:26:37.000000000 +0200
-@@ -145,21 +145,19 @@
+diff -urN elf2flt-20051225.orig/ld-elf2flt.in elf2flt-20051225/ld-elf2flt.in
+--- elf2flt-20051225.orig/ld-elf2flt.in	Tue Apr 19 00:00:48 2005
++++ elf2flt-20051225/ld-elf2flt.in	Mon Jul 23 00:20:05 2007
+@@ -145,21 +145,18 @@
  
  		if [ "@got_check@" = "no" ]
  		then
@@ -108,7 +108,6 @@
 +			$ELF2FLT $FLTFLAGS -o "$OFILE" -r "$OFILE.gdb" 			||exit $?
  		fi
 -		rm -f "$OFILE.elf"  # not needed for any reason
-+		rm -f "$OFILE.gdb"  # not needed for any reason
  		rm -f "$NEWLDSCRIPT"
  		exit 0
  	fi

Added: trunk/toolchain/patches/g++-4.0.4.diff

Added: trunk/toolchain/patches/g++-4.1.2.diff

Added: trunk/toolchain/patches/g++-4.2.0.diff

Deleted: trunk/toolchain/patches/gcc-4.0.2.diff




More information about the dslinux-commit mailing list