<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Wed, 2010-02-24 at 11:58 -0800, Jeremy Huddleston wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Feb 24, 2010, at 05:45, Gaetan Nadon wrote:
> On Wed, 2010-02-24 at 09:34 +0100, Michel Dänzer wrote:
>
>> On Tue, 2010-02-23 at 11:11 -0800, Jeremy Huddleston wrote:
>>> On Feb 23, 2010, at 11:07, Keith Packard wrote:
>>>
>>>> On Tue, 23 Feb 2010 13:37:18 -0500, Gaetan Nadon
>>>> <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>> wrote:
>>>>
>>>>> This patch will ensure the xserver continues to suppress the
>>>>> optimization, based on strict aliasing rules, after the option
>>>>> is removed from $CWARNFLAGS. There is no change in the object
>>>>> code produced.
>>>>
>>>> I don't think we need to allow any of the code in the X server to be
>>>> 'optimized' in this fashion, so I don't see a need to allow for
>>>> per-directory selection.
>>>
>>> It would be helpful if I had the option to remove this flag from
>>> XQuartz.
>>
>> Out of curiosity, what significant benefit have you measured from using
>> -fstrict-aliasing?
>>
>>
>
> Excellent question which I carefully want to avoid :-)
>
> The problem I want to solve is the following: someone added
> -fnostrict-aliasing a long time ago and I don't know why. Then it got
> copied to a number of libraries, then got included in a macro
> (XORG_CWARNFLAGS), which then got included by over a hundred modules,
> still not knowing why.
>
> There are over 50 modules that are compiling with no warning flags at
> all. I don't want to contribute to the spread of this option. The patch
> is about *transferring* the option out of the macro back to the modules
> (where the skills are) and let them decide if they want that option or
> not.
Additionally, before being copied into XORG_CWARNFLAGS fairly recently, this was only in a handful of modules:
libICE
libSM
libX11
libXau
libXfont
libXft
libXpm
libXres
xorg-server
(I didn't check xf86-drivers)
So adding it across the board is rather far-reaching, IMO. I believe it should only be added back to the modules listed above.
</PRE>
</BLOCKQUOTE>
For the sole purpose of providing information:<BR>
<BR>
Modules which had CWARNFLAGS added a year ago *and* did not have -fno-strict-aliasing option prior to that:<BR>
<BR>
<BLOCKQUOTE>
<PRE>
font=        "util"
app=        "appres bdftopcf beforelight bitmap editres fonttosfnt fslsfonts fstobdf iceauth \
        ico listres luit mkcomposecache mkfontscale oclock rendercheck rgb rstart sessreg setxkbmap \
        showfont smproxy viewres x11perf xauth xbacklight xbiff xcalc xclipboard xclock xcmsdb xconsole \
        xcursorgen xdbedizzy xdm xdpyinfo xdriinfo xedit xev xeyes xf86dga xfd xfontsel xfs xfsinfo \
        xgamma xgc xhost xinit xkbcomp xkbevd xkbprint xkbutils xkill xload xlogo xlsatoms xlsclients \
        xlsfonts xmag xman xmessage xmh xmodmap xmore xprop xrandr xrdb xrefresh xscope xset xsetmode \
        xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo xwd xwininfo xwud"
lib="        libAppleWM         libdmx                 libfontenc         libFS                 libpciaccess         libWindowsWM \
        libXaw                 libXcomposite         libXcursor         libXdamage         libXdmcp         libXext \
        libXfixes         libXi                 libXinerama         libxkbfile         libXmu                 libXrandr \
        libXrender         libXScrnSaver         libXt                 libXtst         libXv                 libXvMC \
        libXxf86dga"
driver="xf86-input-acecad         xf86-input-aiptek         xf86-input-evdev \
        xf86-input-joystick         xf86-input-keyboard         xf86-input-mouse \
        xf86-input-wacom         xf86-video-cirrus         xf86-video-mach64 \
        xf86-video-qxl                 xf86-video-siliconmotion"
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
Modules which never had -fno-strict-aliasing nor any warning flags of any kind and still don't today:<BR>
<BR>
<BLOCKQUOTE>
<PRE>
app="mkfontdir scripts twm xditview xinput"
lib="libXxf86vm"
driver="xf86-input-synaptics        xf86-input-vmmouse \
        xf86-input-void                xf86-video-apm                xf86-video-ark \
        xf86-video-ast                xf86-video-ati                xf86-video-chips \
        xf86-video-dummy        xf86-video-fbdev\
        xf86-video-glint         xf86-video-i128         xf86-video-i740        \
        xf86-video-mga                xf86-video-neomagic        xf86-video-newport \
        xf86-video-nv                xf86-video-r128 \
        xf86-video-rendition        xf86-video-s3                xf86-video-s3virge \
        xf86-video-savage        xf86-video-sis                xf86-video-sisusb \
        xf86-video-suncg14        xf86-video-suncg3        xf86-video-suncg6 \
        xf86-video-sunffb         xf86-video-sunleo        xf86-video-suntcx \
        xf86-video-tdfx         xf86-video-tga                xf86-video-trident \
        xf86-video-tseng        xf86-video-v4l                xf86-video-vesa \
        xf86-video-vmware        xf86-video-voodoo        xf86-video-wsfb \
        xf86-video-xgi                xf86-video-xgixp "
</PRE>
</BLOCKQUOTE>
<BR>
Modules which had -fno-strict-aliasing for a long time (prior to CWARNFLAGS era)<BR>
<BR>
<BLOCKQUOTE>
<PRE>
lib="libICE libSM libX11 libXau libXfont libXft libXpm libXres"
driver="xf86-video-intel xf86-video-geode xf86-video-radeonhd"
xserver
</PRE>
</BLOCKQUOTE>
<BR>
My next task is to add warning flags to those modules who don't. If we wish to preserve status quo (for aliasing), I can define a new variable, leaving CWARNFLAGS intact so older versions of modules configured against newer versions of macros aren't affected. <BR>
<BR>
<BR>
</BODY>
</HTML>