On Thu, Jan 10, 2019 at 08:10:43AM +0100, Christophe Leroy wrote:
> Le 10/01/2019 à 02:42, Joel Stanley a écrit :
> >From: Daniel Axtens <d...@axtens.net>
> >
> >All 64-bit objects need to specify the flag to be compiled correctly, we
> >just don't need it for 32-bit objects. GCC just ignored it, but clang
> >doesn't.

> >+# clang refuses to accept -mabi=elfv1 for when using the
> >+# 64-bit target in 32-bit mode
> >+ifdef CONFIG_CC_IS_CLANG
> 
> If -mabi=elfv1 is unneeded even for GCC, why depend on CLANG ?

It is nonsensical to specify this flag when compiling -m32.  Apparently
clang uses -mabi= to set the current ABI, which isn't quite correct
(although of course the name suggests that's what it does ;-) )

'-mabi=ABI-TYPE'
     Extend the current ABI with a particular extension, or remove such
     extension.  Valid values are 'altivec', 'no-altivec',
     'ibmlongdouble', 'ieeelongdouble', 'elfv1', 'elfv2'.

(It is harmless to use it with -m32 on GCC, because the option just sets a
flag, internally).

> >+ifdef CONFIG_PPC64
> >+AFLAGS_REMOVE_getcpu.o += -mabi=elfv1
> >+endif

Don't remove it, just never set it where not needed?


Segher

Reply via email to