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

Bug 436676

Summary: sys-devel/gcc-4.7.1 build fails in x86_avx.cc if AVX disabled but supported by as
Product: Gentoo Linux Reporter: Alessandro Di Federico <ale>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ale
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Correctly detect AVX

Description Alessandro Di Federico 2012-09-30 16:16:10 UTC
Created attachment 325392 [details, diff]
Correctly detect AVX

I've tried to build sys-devel/gcc-4.7.1 using these global CFLAGS:

CFLAGS="-O2 -pipe -march=native -mno-avx"

My CPU is i7-2820QM, so it supports avx, however due to some problems I had in the past I don't use it.

When trying to compile gcc I receive the same error as in the linked bug [1]. 

I've tried also:

CFLAGS="-O2 -pipe -march=native" emerge binutils =sys-devel/gcc-4.7.1

but I received the same error. However the attached patch, taken from the same bug report, fixed the problem.

I don't know if this a proper way to fix the bug but for me just worked fine.

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2012-09-30 19:31:35 UTC

*** This bug has been marked as a duplicate of bug 417271 ***