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

Bug 360503

Summary: dev-libs/libgcrypt-1.4.6 fails with the new -Ofast optimization level in gcc 4.6
Product: Gentoo Linux Reporter: Xiangyan Sun <wishstudio>
Component: [OLD] GCC PortingAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: wishstudio
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 346809    
Attachments: Fix compilation.

Description Xiangyan Sun 2011-03-26 06:13:00 UTC
emerging dev-libs/libgcrypt-1.4.6 failed when using the new -Ofast optimization level.

/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../src -I../src    -Ofast -pipe -march=native -mtune=native -fvisibility=hidden -Wall -c -o sha256.lo sha256.c
/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../src -I../src    -Ofast -pipe -march=native -mtune=native -fvisibility=hidden -Wall -c -o sha512.lo sha512.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -Ofast -pipe -march=native -mtune=native -fvisibility=hidden -Wall -c sha256.c  -fPIC -DPIC -o .libs/sha256.o
`echo /bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../src -I../src    -Ofast -pipe -march=native -mtune=native -fvisibility=hidden -Wall -c ./tiger.c | sed -e 's/-O[2-9s]*/-O1/g' `
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -Ofast -pipe -march=native -mtune=native -fvisibility=hidden -Wall -c sha512.c  -fPIC -DPIC -o .libs/sha512.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -O1fast -pipe -march=native -mtune=native -fvisibility=hidden -Wall -c ./tiger.c  -fPIC -DPIC -o .libs/tiger.o
cc1: error: argument to '-O' should be a non-negative integer


Reproducible: Always
Comment 1 Xiangyan Sun 2011-03-26 06:15:19 UTC
Created attachment 267227 [details, diff]
Fix compilation.
Comment 2 SpanKY gentoo-dev 2011-03-27 14:29:50 UTC
libgcrypt ebuild shouldnt be allowing flag munging in the first place
Comment 3 Dane Smith (RETIRED) gentoo-dev 2011-04-06 18:39:42 UTC
The problem isn't necessarily Ofast, it's the fact that flag munging is making it into -O1fast.

That is not a valid identifier.

I've revbumped this to 1.4.6-r1 in CVS and removed the stupid flag munging. Please try that and confirm / reject -Ofast before I go and filter that as well.

Closing as test requested. Please append whether or not this fixes the issue.
Comment 4 Xiangyan Sun 2011-04-07 06:47:20 UTC
The compilation problem resolved with dev-libs/libgcrypt-1.4.6-r1 and dev-libs/libgcrypt-1.5.0_beta1-r1.