Hi Micael and Happy New Year ;)
This is more an cross-compiling issue. The arm v6 and 7 obsoleted the
swp/swpb instructions - this is what the warning are saying. The problem
is that your compiler is generating asm code with those instruction; and
the warnings are reported by assembler (which knows that those
instructions are not valid).
I'm not a cross-compiling export (not even closer :P), but I guess you
are passing some wrong compiling flags, leading to this conflict here.
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
https://opensips.org/training/OpenSIPS_eBootcamp_2021/
On 1/1/22 11:48 AM, Micael wrote:
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
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users