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

Clemens Koller clemens.koller at anagramm.de
Wed Apr 13 05:23:48 PDT 2005


Hello, Roland!

I built freetype-2.1.9 separate from X.

This is/was fixed in the current freetype2 CVS since 2004-11-16 by Werner Lemberg.
He added the -fno-strict-aliasing there.
So an upcoming 2.1.10 might have these issues fixed.
I am about to test the latest CVS of freetype2.

Currently, I link them dynamically. Are there any issues
(other than performance)?

Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

Roland Mainz wrote:
> 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
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 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



More information about the xorg mailing list