On Mon, 13 May 2002, Marc Aurele La France wrote:

>> New versions of the gcc compiler have an optimization called
>> "string merging" which is enabled by default.  The XFree86 module
>> loader chokes on the ELF sections that this optimization adds to
>> the ELF objects.
>
>> To work around this XFree86 module loader limitation, you need
>> to pass -fno-merge-constants to the linker when modules are
>> being built. This can be done from host.def with:
>
>> ModuleLdFlags -fno-merge-constants
>
>That should have a "#define " in front of it.

Right, I assumed one would be familiar with host.def et al. when 
adding it.


>> This was automatically detected in later 4.1.0 CVS, and also in
>> 4.2.0 CVS however it looks like someone removed the automatic
>> checks in head CVS.
>
>No, it wasn't removed.  But, it's possible that
>
>       gcc -fmerge-constants -xc /dev/null -S -o /dev/null
>
>... no longer generates a zero return (i.e. is no longer a valid test to
>determine whether or not the compiler has merge-constants support).

Hmm, never thought of that.  Could be failing I suppose.

Just tested locally with:

bash-2.05a$ gcc -fno-merge-constants -xc /dev/null -S -o /dev/null && echo yes
yes
bash-2.05a$ gcc3 -fno-merge-constants -xc /dev/null -S -o /dev/null && echo yes
yes
bash-2.05a$ gcc3 -fno-merge-constantsXXX -xc /dev/null -S -o /dev/null && echo yes
cc1: Unrecognized option `-fno-merge-constantsXXX'
bash-2.05a$ gcc -fno-merge-constantsXXX -xc /dev/null -S -o /dev/null && echo yes
cc1: Unrecognized option `-fno-merge-constantsXXX'

Can someone who is having this failure, run the same test and 
report what they get?



-- 
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
XFree86 maintainer              Ontario, Canada, P6C 5B3
Red Hat Inc.
http://www.redhat.com           ftp://people.redhat.com/mharris

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to