package/pcsc-lite: compile with -fPIC when BR2_PIC_PIE is set
PATCH 1/1 package/pcsc-lite: compile with -fPIC when BR2_PIC_PIE is set
Otherwise build fails with following error:Toolchain wrapper executing: '/tools/arm-unknown-linux-gnueabi/bin//arm-unknown-linux-gnueabi-gcc' '--sysroot' '/home/user/work/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot' '-mabi=aapcs-linux' '-msoft-float' '-marm' '-fstack-protector-strong' '-march=armv5te' '-msoft-float' '-mfpu=vfp' '-mfloat-abi=soft' '-mcpu=arm926ej-s' '-fPIE' '-pie' '-Wl,-z,now' '-Wl,-z,relro' '-Wall' '-fno-common' '-D_LARGEFILE_SOURCE' '-D_LARGEFILE64_SOURCE' '-D_FILE_OFFSET_BITS=64' '-Os' '-g2' '-D_FORTIFY_SOURCE=1' '-o' 'pcsc-wirecheck-gen' 'pcsc-wirecheck-gen.o' '-ldl' '-lrt' /tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/7.3.0/../../../../arm-unknown-linux-gnueabi/bin/ld: .libs/libpcsclite_la-error.o(.text+0x3bc): R_ARM_TLS_LE32 relocation not permitted in shared object.libs/libpcsclite_la-error.o: In function `pcsc_stringify_error':
/home/user/work/buildroot/output/build/pcsc-lite-1.9.1/src/error.c:98:(.text+0x3bc): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
Makefile:703: recipe for target 'libpcsclite.la' failed
make[4]: *** [libpcsclite.la] Error 1
--- package/pcsc-lite/pcsc-lite.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/pcsc-lite/pcsc-lite.mk +5 -0
@@ -44,4 +44,9 @@ ifeq ($(PACKAGE_PCSC_LITE_EMBEDDED),y) PCSC_LITE_CONF_OPTS += --enable-embedded endif +ifeq ($(BR2_PIC_PIE),y) +PCSC_LITE_CFLAGS += -fPIC +PCSC_LITE_CONF_OPTS += CFLAGS="$(PCSC_LITE_CFLAGS)" +endif + $(eval $(autotools-package))
Signature · 15 lines
2.25.1 ########################################################################### This email is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this email and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this email may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot