Hello Sir,We are using the liaro's aarch64-linux-gnu-gcc compiler, (version = gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu) for cross compiling for armv8, Cortex A53. We use many libraries, one of them is openssl-1.0.1p which supports max till armv7. I tried compiling this library using the command "aarch64-linux-gnu-gcc -march=armv7-a". It gives the error as "error: unknown value ‘armv7-a’ for -march"(But the man page of aarch64-linux-gnu-gcc says these are supported "armv7, armv7-a, armv7-m, armv7-r, armv7e-m, armv7ve")How do I compile this libray ?
I tried compiling the openssl-1.0.1p library with the 32 bit compiler armv8l-linux-gnueabihf-gcc (version = gcc-linaro-6.3.1-2017.02-x86_64_armv8l-linux-gnueabihf) using -march=armv7-a, since it supports it. It compiles. But when linking with the application, I get the linker error as "incompatible library"
How do I solve this issue on armv8
You cannot mix a 64bit application with a 32bit library. You cannot switch from AArch64 to AArch32 like from AArch32 to T32.
So, why not use openssl-1.1.1 (or so) which supports AArch64?!
Thanks sir, accepted the answer.
One Clarification required.
When it is said that there is a 32 bit backward compatibility, I thought I can use the 32 bit library in 64 bit application.
Looks like, it is backward compatible only if both the application and all the libraries are in 32 bit. Am I right.
Thanks in advance,
Santhosh
Right. There are even Armv8-A CPUs w/o AArch32 IIRC.