[OpenSIPS-Users] Compiling for arm v7
Micael
m8847 at abc.se
Sat Jan 1 09:48:28 UTC 2022
Hi all,
(Happy New Year!)
I am trying to cross compile 3.2.4 for armv7. Now, I'm new to opensips,
so I have no previous experience to fall back on..
In short: I have issues, getting this warning when compiling
"swp{b} use is deprecated for ARMv6 and ARMv7"
What I have done is:
export
CC_EXTRA_OPTS="--sysroot=/opt/toolchains/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc
-I /volt001/tmp/sysroots-components/cortexa8hf-neon/openssl/usr/include"
export LD_EXTRA_OPTS="-L
/volt001/tmp/sysroots-components/cortexa8hf-neon/openssl/usr/lib"
export
CC="/opt/toolchains/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc
-marm -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon"
export CPU=armv7a
I then had to remove the following section in Makefile.defs, otherwise
it would add strongarm1100 as cpu.
---8<---------8<------
ifeq ($(CC_CLASS), 4.x)
CFLAGS+=-mcpu=strongarm1100 -ftree-vectorize
else
#if gcc 3.0+
ifeq ($(CC_CLASS), 3.x)
CFLAGS+= -mcpu=strongarm1100
else
ifeq ($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
for better results)
CFLAGS+=
else
#really old version
$(warning You are using an old and unsupported gcc \
version ($(CC_SHORTVER)), compile at your own risk!)
endif # CC_CLASS, 2.9x
endif # CC_CLASS, 3.x
---8<---------8<------
Once I have done that, everything compiles, but with one and the same
warning (lots, and lots of them);
e.g.:
Compiling ip_addr.c
/tmp/ccj7cheW.s: Assembler messages:
/tmp/ccj7cheW.s:1857: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccj7cheW.s:1892: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccj7cheW.s:1928: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccj7cheW.s:2171: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccj7cheW.s:2206: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccj7cheW.s:2242: swp{b} use is deprecated for ARMv6 and ARMv7
Compiling ipc.c
Compiling main.c
Compiling map.c
/tmp/cc6q8n3v.s: Assembler messages:
/tmp/cc6q8n3v.s:6001: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc6q8n3v.s:6036: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc6q8n3v.s:6072: swp{b} use is deprecated for ARMv6 and ARMv7
Compiling md5.c
Compiling md5utils.c
I guess I must not be the only one compiling for arm, so I hope someone
can point me closer to whats wrong.
Any help appreciated,
Micael
More information about the Users
mailing list