Date: Fri, 21 Jun 2002 14:33:51 +0200 From: Stefan Esser <se@freebsd.org> To: Kris Kennaway <kris@obsecurity.org> Cc: Yamada Ken Takeshi <ken@tydfam.jp>, freebsd-current@FreeBSD.org Subject: Re: GCC3.1 internal compiler error when compiling XFree86-4-libraries Message-ID: <20020621123351.GA68390@StefanEsser.FreeBSD.org> In-Reply-To: <20020616023918.C12427@xor.obsecurity.org> References: <20020608.171312.730576735.ken@tydfam.jp> <20020608013938.B5755@xor.obsecurity.org> <20020608092926.GA2635@StefanEsser.FreeBSD.org> <20020616023918.C12427@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2002-06-16 02:39 -0700, Kris Kennaway <kris@obsecurity.org> wrote: > On Sat, Jun 08, 2002 at 11:29:26AM +0200, Stefan Esser wrote: > > > I got around this problem by (indirectly) fixing the ".c.o" rule > > in the Imakefile. This patch was part of my previous mail to you > > regarding the XFree86 library build process (new version of patch-z32). > > Thanks for looking into this; I'd appreciate it if someone could > commit a fix, but the patch below is suboptimal because it affects all > versions of FreeBSD. Can you modify it so it only disables > optimization on (recent) 5.0? > > > File: /usr/ports/x11/XFree86-4-libraries/files/patch-z32 > > > > --- lib/GL/mesa/src/OSmesa/Imakefile.orig Tue Apr 3 11:29:33 2001 > > +++ lib/GL/mesa/src/OSmesa/Imakefile Wed Jun 5 12:28:26 2002 Ok, here is an improved patch: 1) I've made the redefinition of the compiler command dependent on __GCC__ >= 3. 2) The actual rule that is generated for GCC-3.x is now of the form cc -O ... || cc -O0 ... That way, only those files that could not be compiled with optimization enabled are tried again without optimization: #if defined(__GNUC__) && __GNUC__ >= 3 #define ObjectCompile(options) RemoveFile($@) @@\ ClearmakeOSName \ $(CC) -c $(CFLAGS) options $*.c -o $@ || \ $(CC) -c $(CFLAGS) options -O0 $*.c -o $@ #endif The GCC bug is triggered building XFree86-4-libraries and XFree86-4-Server. I include uni-diffs for patch "patch-z32" to fix the former, and a new "patch-OSmesa-Imake" for the latter (both to be applied from /usr/ports/). I'm currently rebuilding both the libraries and server ports with those patches, but it will take some time on my ancient system at home (still a Celeron 300A ...). Regards, STefan --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="XFree86-4-libraries.PATCH" RCS file: /usr/cvs/ports/x11/XFree86-4-libraries/files/patch-z32,v retrieving revision 1.3 diff -u -3 -r1.3 patch-z32 --- x11/XFree86-4-libraries/files/patch-z32 12 Jun 2001 14:59:51 -0000 1.3 +++ x11/XFree86-4-libraries/files/patch-z32 21 Jun 2002 12:04:17 -0000 @@ -1,5 +1,24 @@ --- lib/GL/mesa/src/OSmesa/Imakefile.orig Tue Apr 3 11:29:33 2001 -+++ lib/GL/mesa/src/OSmesa/Imakefile Thu Jun 7 02:58:09 2001 ++++ lib/GL/mesa/src/OSmesa/Imakefile Fri Jun 21 13:55:44 2002 +@@ -8,6 +8,18 @@ + #define DoDebugLib DebugLibGlx + #define DoProfileLib ProfileLibGlx + ++#define LibObjCompile(dir,options) RemoveFiles($@ $(@:C!([^/]+)$!dir/\1!)) @@\ ++ ClearmakeOSName \ ++ $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \ ++ options $*.c -o $(@:C!([^/]+)$!dir/\1!) ++ ++#if defined(__GNUC__) && __GNUC__ >= 3 ++#define ObjectCompile(options) RemoveFile($@) @@\ ++ ClearmakeOSName \ ++ $(CC) -c $(CFLAGS) options $*.c -o $@ || \ ++ $(CC) -c $(CFLAGS) options -O0 $*.c -o $@ ++#endif ++ + #include "../Imakefile.inc" + #ifdef i386Architecture + #include "../X86/Imakefile.inc" @@ -58,7 +58,7 @@ LIBNAME = OSMesa SOREV = 3.3 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="XFree86-4-Server.PATCH" --- /dev/null Fri Jun 21 14:14:52 2002 +++ x11-servers/XFree86-4-Server/files/patch-OSmesa-Imakefile Fri Jun 21 13:59:36 2002 @@ -0,0 +1,16 @@ +--- lib/GL/mesa/src/OSmesa/Imakefile.orig Fri Jun 21 11:23:42 2002 ++++ lib/GL/mesa/src/OSmesa/Imakefile Fri Jun 21 13:55:44 2002 +@@ -8,6 +8,13 @@ + #define DoDebugLib DebugLibGlx + #define DoProfileLib ProfileLibGlx + ++#if defined(__GNUC__) && __GNUC__ >= 3 ++#define ObjectCompile(options) RemoveFile($@) @@\ ++ ClearmakeOSName \ ++ $(CC) -c $(CFLAGS) options $*.c -o $@ || \ ++ $(CC) -c $(CFLAGS) options -O0 $*.c -o $@ ++#endif ++ + #include "../Imakefile.inc" + #ifdef i386Architecture + #include "../X86/Imakefile.inc" --cNdxnHkX5QqsyA0e-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020621123351.GA68390>