Bug in EGCS for the ARM... The

Scott Bambrough scottb@corelcomputer.com
Sat Feb 6 11:41:00 GMT 1999


Richard Earnshaw wrote:
> 
> > >defined it was necessary to patch Makefile.in.  This seems to be a bug in an
> > >earlier patch.  LIBGCC2_CFLAGS is set twice in the makefile and when compiling
> > >no longer includes GTHREAD_FLAGS.
> >
> > This seems wrong.  I suspect you want to be patching config/arm/t-linux (which
> > overrides the definitions in the toplevel makefile) rather than Makefile.in
> > itself.  Ideally we would probably like to lose that override actually.
> >
> > p.
> >
> >
> 
> Correct.  arm/t-linux shouldn't have been overriding LIBGCC2_CFLAGS, but
> defining TARGET_LIBGCC2_CFLAGS.  It just so happens that I commited a fix
> to this on Wednesday for the trunk egcs compiler.
> 
> Richard.


Then the attached patch should be ok.  I still had to fix Makefile.in otherwise
LIBGCC2_DEBUG_CFLAGS would override the -g0 in TARGET_LIBGCC2_CFLAGS.
diff -ur egcs-1.1.1/gcc/Makefile.in egcs-1.1.1.mod/gcc/Makefile.in
--- egcs-1.1.1/gcc/Makefile.in	Fri Feb  5 12:10:56 1999
+++ egcs-1.1.1.mod/gcc/Makefile.in	Fri Feb  5 11:58:20 1999
@@ -328,7 +328,7 @@
 # so that -g1 will be tested.
 #
 LIBGCC2_DEBUG_CFLAGS = -g1
-LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@ 
+LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@ 
 
 # Additional options to use when compiling libgcc2.a.
 # Some targets override this to -Iinclude
diff -ur egcs-1.1.1/gcc/config/arm/t-linux egcs-1.1.1.mod/gcc/config/arm/t-linux
--- egcs-1.1.1/gcc/config/arm/t-linux	Fri Feb  5 12:10:52 1999
+++ egcs-1.1.1.mod/gcc/config/arm/t-linux	Fri Feb  5 11:55:40 1999
@@ -1,6 +1,6 @@
 # Just for these, we omit the frame pointer since it makes such a big
 # difference.  It is then pointless adding debugging.
-LIBGCC2_CFLAGS = -O2 -fomit-frame-pointer $(TARGET_LIBGCC2_CFLAGS) $(CROSS) $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -g0
 
 # Don't build enquire
 ENQUIRE=
diff -ur egcs-1.1.1/gcc/configure egcs-1.1.1.mod/gcc/configure
--- egcs-1.1.1/gcc/configure	Fri Feb  5 12:11:05 1999
+++ egcs-1.1.1.mod/gcc/configure	Thu Feb  4 08:42:39 1999
@@ -2514,6 +2514,14 @@
 		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
 		fixincludes=Makefile.in		# Nothing to fix
 		gnu_ld=yes
+		case x${enable_threads} in
+		x | xyes | xpthread | xposix)
+			thread_file='posix'
+			;;
+		*)
+			thread_file='single'
+			;;
+		esac				
 		;;
 	arm*-*-aout)
 		tm_file=arm/aout.h
diff -ur egcs-1.1.1/gcc/configure.in egcs-1.1.1.mod/gcc/configure.in
--- egcs-1.1.1/gcc/configure.in	Fri Feb  5 12:10:54 1999
+++ egcs-1.1.1.mod/gcc/configure.in	Thu Feb  4 08:42:25 1999
@@ -535,6 +535,14 @@
 		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
 		fixincludes=Makefile.in		# Nothing to fix
 		gnu_ld=yes
+		case x${enable_threads} in
+		x | xyes | xpthread | xposix)
+			thread_file='posix'
+			;;
+		*)
+			thread_file='single'
+			;;
+		esac				
 		;;
 	arm*-*-aout)
 		tm_file=arm/aout.h


More information about the Gcc-patches mailing list