Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360503 - dev-libs/libgcrypt-1.4.6 fails with the new -Ofast optimization level in gcc 4.6
Summary: dev-libs/libgcrypt-1.4.6 fails with the new -Ofast optimization level in gcc 4.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.6
  Show dependency tree
 
Reported: 2011-03-26 06:13 UTC by Xiangyan Sun
Modified: 2011-04-07 06:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix compilation. (libgcrypt-1.4.6-ofast.patch,457 bytes, patch)
2011-03-26 06:15 UTC, Xiangyan Sun
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.