[cfe-dev] Clang compiling needs help

Michelle Gu (micgu) via cfe-dev cfe-dev at lists.llvm.org
Thu Feb 9 17:51:12 PST 2017


Hi John,

Thank you for feedback!

I emailed with the other objects’ vendor, they confirmed they are using ‘PRES8’ within their objects.

Do you have other suggestion?

BR,
Michelle

From: John Brawn [mailto:John.Brawn at arm.com]
Sent: 2017年2月7日 20:35
To: Michelle Gu (micgu) <mgu at nds.com>
Cc: Alon Shaltiel (ashaltie) <ashaltie at cisco.com>; cfe-dev at lists.llvm.org; nd <nd at arm.com>
Subject: RE: Clang compiling needs help

That error looks like an armlink error, and there’s some documentation for it here:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0807g/dom1365073159742.html

Clang always emits objects with the PRES8 (preserves 8-byte stack alignment) and REQ8 (requires
8-byte stack alignment) attributes, so it looks like the error is coming from objects that haven’t
been built with clang (I’m guessing that’s the “other source code in ARM” you mention).

Probably you need to look these other objects and how they’re built  in order to resolve this.

John

From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Michelle Gu (micgu) via cfe-dev
Sent: 07 February 2017 08:25
To: cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
Cc: Alon Shaltiel (ashaltie)
Subject: [cfe-dev] Clang compiling needs help

Dear Clang Experts,

I’m a Clang user. I met some problem during using Clang. Would you please help to give any suggestion?

I’m using Clang to compile a lib. The generated lib file will be linked to other source code in other compile environment.
One target of the final image is ARM and the other is MIPS.

When compile the lib for ARM, we use the options as below:

ARCH_OPTS=-target arm-none-eabi -mcpu=arm926ej-s
LLC_ARCH_OPTS="-mtriple armv5-none-none-eabi -mattr=+v5te"
AR=/usr/bin/ar
ARFLAGS=-rv

We got the lib successfully. But when linked to other source code in ARM, we got the error as below:

[cid:image001.png at 01D28383.3342DCA0]

Do you have any idea of the error “invalid call from ‘~PRE8’”? Should I make some change when compile the lib with CLANG?


When compile the lib for MIPS, we use the options as below:

ARCH_OPTS=-target mipsel
CFLAGS=-c -fno-pic -mabicalls -integrated-as

We got the lib successfully. But when linked to other source code in MIPS, we got the error as below:

mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_clzsi2.o): warning: linking abicalls files with non-abicalls files
mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_fixunsdfsi.o): warning: linking abicalls files with non-abicalls files
mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_pack_df.o): warning: linking abicalls files with non-abicalls files
mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_unpack_df.o): warning: linking abicalls files with non-abicalls files
mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_fpcmp_parts_df.o): warning: linking abicalls files with non-abicalls file
s
mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_ge_df.o): warning: linking abicalls files with non-abicalls files
mips-elf-ld: /cygdrive/d/RDA/Projects/QW300/soft/env/lib/gcc/mips-elf/4.4.2//lib
gcc.a(_df_to_si.o): warning: linking abicalls files with non-abicalls files
make[2]: *** [/cygdrive/d/RDA/Projects/QW300/soft/build/8851m_dbs_rdamodem_qj/_d
efault_/8809/8851m_dbs_rdamodem_qj_debug.elf] Error 1
make[1]: *** [/cygdrive/d/RDA/Projects/QW300/soft/build/8851m_dbs_rdamodem_qj/_d
efault_/8809/8851m_dbs_rdamodem_qj_debug.srec] Error 2
make: *** [lod] Error 2

Do you have any idea about the warnings? How about the errors?

I’m not familiar with Clang, but if not use Clang, the linking is successful. So we hope we can get some help from you, the experts of CLANG.
Thank you in advance!

BR,
Michelle

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170210/debca724/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 14625 bytes
Desc: image001.png
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170210/debca724/attachment.png>


More information about the cfe-dev mailing list