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

Bug 426246

Summary: LDFLAGS_${ABI} uses '-m <emul>' rather than '-Wl,-m,<emul>'
Product: Gentoo Linux Reporter: devsk <funtoos>
Component: ProfilesAssignee: AMD64 Project <amd64>
Status: UNCONFIRMED ---    
Severity: normal CC: tommy
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description devsk 2012-07-12 03:43:49 UTC
The following trivial change needs to be applied. Because LDFLAGS are meant for consumption by ld, they must be passed using -Wl. gcc does not know -m elf32_x86_64.
---------------------
# diff -u arch/amd64/make.defaults.orig  arch/amd64/make.defaults     
--- arch/amd64/make.defaults.orig       2012-07-12 03:42:03.375516664 +0000
+++ arch/amd64/make.defaults    2012-07-12 03:40:28.802698986 +0000
@@ -30,7 +30,7 @@
 
 # 64-32bit specific settings.
 CFLAGS_x32="-mx32"
-LDFLAGS_x32="-m elf32_x86_64"
+LDFLAGS_x32="-Wl,-melf32_x86_64"
 CHOST_x32="x86_64-pc-linux-gnu"
 
 # 2006/10/24 - Simon Stelling <blubb@gentoo.org>

Reproducible: Always
Comment 1 devsk 2012-07-12 03:44:42 UTC
lirc package on x32 ABI croaks because of this.
Comment 2 SpanKY gentoo-dev 2012-09-06 04:43:33 UTC
has nothing to do with x32.  all ABIs do it this way.