On Wed, 5 Dec 2001 [EMAIL PROTECTED] wrote: >The archives indicate that this problem is because the >-fno-merge-constants flag is required to build the modules, but I was >unable to configure the source tarball to include that flag. At the >advice of some nice people on irc.openprojects.net, I downloaded the >bleeding edge SRPM to attempt a build based on the instructions in the >spec file. However, the spec file claims that -fno-merge-constants is >required only by gcc 2.9.6 and above. I have a 2.9.5 flavor of gcc which >i just noticed does not support the -fno-merge-constants flag.
gcc 2.95 does not have the merge-constants optimization, nor do earlier versions of gcc 2.96 (less than 2.96-93) and as such, you do not have to pass -fno-merge-constants to it at all. The -fno-merge-constants is _only_ required when building with newer versions of gcc 2.96 that do have this new optimization, because the X module loader cannot handle the new ELF sections that this optimization produces. If you build the XFree86 src.rpm, by default it assumes that you are using gcc2.96 with the merge-constants optimization, and it disables that by default for modules. If you are using an older gcc 2.96, or any compiler that does not have the merge-constants optimization, then you do _not_ want to pass the compiler any options. You need to edit the XFree86 spec file and change the option at the top as per the comment at the top: # *** IMPORTANT NOTICE: READ THIS BEFORE BUILDING *** # gcc 2.96-93 and newer have a new optimization called "merge-constants", # which is enabled by default. This optimization adds new ELF sections # to the binaries produced, however XFree86's module loader does not # yet understand what to do with these ELF sections. As a workaround, # until the XFree86 module loader is taught how to handle these new ELF # sections, the XFree86 modules must be built with "-fno-merge-constants" # which disables the new compiler optimization for module building. # This specfile defaults to the new gcc behaviour. If you are using any # other gcc flavour, including gcc 2.96 release -92 or earlier, you will # want to change the first DisableModuleStringMerging below from 1 to 0. # # Failure to do this, will result in a non working XFree86 that spits out # errors like: # "Not loading .rodata.str1.1" and "lib/modules/fonts/libbitmap.a is unresolved!" # # Mike A. Harris <[EMAIL PROTECTED]> %ifnarch s390 s390x %define DisableModuleStringMerging 1 %else %define DisableModuleStringMerging 0 %endif I will update the specfile to special case this for ppc building for now also. Should appear in my 4.1.0-10 release. I plan sometime soon on adding other ppc patches etc. to the specfile to ease problems people have building on PPC. The XFree86 CVS trunk code autodetects wether or not this flag needs to be used, and sets it if it is needed. I might backport those Imake changes to future 4.1.0 releases as well, once I have had a chance to adequately test them on systems with and without the new gcc. Hope this helps. Take care, TTYL -- ---------------------------------------------------------------------- Mike A. Harris Shipping/mailing address: OS Systems Engineer 190 Pittsburgh Ave., Sault Ste. Marie, XFree86 maintainer Ontario, Canada, P6C 5B3 Red Hat Inc. Phone: (705)949-2136 http://www.redhat.com ftp://people.redhat.com/mharris Red Hat XFree86 mailing list: [EMAIL PROTECTED] General open IRC discussion: #xfree86 on irc.openprojects.net ---------------------------------------------------------------------- _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
