Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 48406

Summary: ghostscript-7.07.1-r1 fails with GCC 3.4 if anything greater than -O2 in CFLAGS
Product: Gentoo Linux Reporter: George L. Emigh <ab4bd>
Component: Current packagesAssignee: Please assign to toolchain <gcc-porting>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 48528    
Attachments: ghostscript ebuild with the fix already added.

Description George L. Emigh 2004-04-19 14:17:55 UTC
ghostscript will cause GCC 3.4 to implode, if greater than -O2 is used.

Reproducible: Always
Steps to Reproduce:
1. try and build ghostscript with gcc 3.4 and -O3 or additional optimizing.
2.
3.

Actual Results:  
GCC implodes. 

Expected Results:  
success. 

Add this to ebuild: 
 
    # We need to strip all flags and set to -O2 for gcc 3.4 
    if [ "`gcc-major-version`" -eq "3" ] && [ "`gcc-minor-version`" -eq "4" ] 
        then 
           strip-flags 
           export CFLAGS="${CFLAGS//-O?} -O2" 
           export CXXFLAGS="${CFLAGS}" 
    fi
Comment 1 George L. Emigh 2004-04-19 14:20:16 UTC
Created attachment 29657 [details]
ghostscript ebuild with the fix already added.

Tested with GCC 3.3.3 and GCC 3.4, builds ghostscript fine.
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-04-28 15:42:43 UTC
i didnt use your patch, but edited the ebuild in a similar way. the fix is in CVS, give it a bit to reach rsync.