This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-3.4-20050401 BUG? generates illegal instruction inX11R6.4.2/mkfontscale/freetypemacro (worksforme)


Clemens Koller wrote:
> In the freetype-devel list, I got some suggestions:
> This bug/problem seems to concentrate on ppc32/64 and s390 architectures.
> Basically all Type1 fonts shipped with X11 are suspect to this
> problem. I made tests agains UTBI____.pfa
> 
> The possible (temporary)fix:
> If I re-compile freetype with -fno-strict-aliasing I can get
> mkfontscale to work!
> It's still not clear whether this is a problem in freetype
> (2.1.7 to 2.1.9 at least), the macros there, or in gcc.

1. Could you please file a bug at https://bugs.freedesktop.org/ and post
the bugid back here ?
2. Can you test the attached patch
(xorg_gcc_strict_aliasing_crasher_fix001.gudiff.txt) and check whether
this fixes the problem (please make sure to use the libfreetype library
build in the xc/ tree or link FreeType2 statically) ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
Index: xc/config/cf/xorg.cf
===================================================================
RCS file: /cvs/xorg/xc/config/cf/xorg.cf,v
retrieving revision 1.45
diff -u -2 -0 -r1.45 xorg.cf
--- xc/config/cf/xorg.cf	1 Feb 2005 02:02:31 -0000	1.45
+++ xc/config/cf/xorg.cf	12 Apr 2005 02:03:39 -0000
@@ -1524,41 +1524,46 @@
 #  else
 #   define DefaultCCOptions -ansi -pedantic GccWarningOptions
 #  endif
 # endif
 # if defined(UseInstalled)
 #  ifndef UseGccMakeDepend
 #   define UseGccMakeDepend YES
 #  endif
 # endif
 #endif
 
 /* Make imake noisier.  Note that this is ineffective for 3.0 <= GCC <= 3.2 */
 #ifndef ImakeWarningFlags
 # ifdef Gcc28Warnings
 #  define ImakeWarningFlags Gcc28Warnings
 # else
 #  define ImakeWarningFlags /* */
 # endif
 #endif
 
-#if  ((GccMajorVersion == 3) &&  (GccMinorVersion >= 1)) || (GccMajorVersion > 3)
+/* PPC and S390(x) always need -fno-strict-aliasing to avoid crash in in
+ * Freetype code and some other locations */
+#if  (((GccMajorVersion == 3) &&  (GccMinorVersion >= 1)) || (GccMajorVersion > 3)) \
+  || defined (PpcArchitecture) \
+  || defined (s390Architecture) \
+  || defined (s390xArchitecture) 
 # define GccAliasingArgs      -fno-strict-aliasing
 #else
 # define GccAliasingArgs      /* */
 #endif
 
 #if HasGcc2 && defined(i386Architecture)
 # ifndef DefaultGcc2i386Opt
 #  define DefaultGcc2i386Opt -O2 -fno-strength-reduce GccAliasingArgs
 # endif
 #endif
 
 #if HasGcc2 && defined(AMD64Architecture)
 # ifndef DefaultGcc2AMD64Opt
 #  define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce GccAliasingArgs
 # endif
 #endif
 
 #if HasGcc2 && defined(AlphaArchitecture)
 # ifndef DefaultGcc2AxpOpt
 #  define DefaultGcc2AxpOpt -O2 GccAliasingArgs

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]