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:
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