[cfe-dev] Clang compiling needs help

Simon Dardis via cfe-dev cfe-dev at lists.llvm.org
Fri Feb 10 05:45:14 PST 2017


Hi,

You need to use 'fno-pic -mno-abicalls -fno-integrated-as' to get the output you're
looking for I believe. It does require the use of the GNU assembler, which may require
specifying the sysroot of your gcc installation so clang finds the assembler and/or
making a symlink 'mipsel-as' to your mips-elf-as.

Hopefully that should work around the warning. I don't have any other suggestions with
the output you've posted.

-mno-abicalls with -fintegrated-as should be properly supported in the next release after 4.0.

Thanks,
Simon
________________________________________
From: Michelle Gu (micgu) [mgu at nds.com]
Sent: 10 February 2017 02:07
To: Simon Dardis; cfe-dev at lists.llvm.org
Cc: Alon Shaltiel (ashaltie)
Subject: RE: Clang compiling needs help

Hi Simon,

Thank you for your feedback!

First, I delete '-fno-pic -mabicalls' options and rerun the compiling, the error result is same as before. I doubt if these options work or not.
Second, when I tried to link my lib with other projects, I can see compile option ' WITHOUT_WERROR=1' during compiling. I think that means it's not the problem of warnings became errors.

Do you have any other suggestion?

BR,
Michelle

-----Original Message-----
From: Simon Dardis [mailto:Simon.Dardis at imgtec.com]
Sent: 2017年2月7日 22:04
To: Michelle Gu (micgu) <mgu at nds.com>; cfe-dev at lists.llvm.org
Cc: Alon Shaltiel (ashaltie) <ashaltie at cisco.com>
Subject: RE: Clang compiling needs help

The "warning: linking abicalls files with non-abicalls files" warning is almost certainly arising from a long standing LLVM bug where all files produced from the integrated assembler for MIPS were marked as being abicalls files. It's fixed on ToT.

In theory the produced binary should be fine, as the error is occurring from incorrect ELF header flags. The error from 'make' may be due to treating warnings as errors.

The CFLAGS you've specified appear to be inconsistent with your mips-elf target. "-fno-pic -mabicalls"
produces position dependant code that can call position independent code. This would be for environments such as Linux/BSDs/etc. mips-elf I expect is a bare-metal environment, so -mabicalls would not be used for that target.

Thanks,
Simon











More information about the cfe-dev mailing list