krb5: Add -fPIC to compile flags
PATCH 1/2 krb5: Add -fPIC to compile flags
Fixes errors on x86_64 e.g.
errors.so: relocation R_X86_64_PC32 against symbol `k5_vset_error' can not be used when making a shared object; recompile with -fPIC
--- meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb +2 -2
@@ -51,8 +51,8 @@ CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regc ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \ ac_cv_file__etc_TIMEZONE=no" -CFLAGS_append = " -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" -LDFLAGS_append = " -lpthread" +CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" +LDFLAGS_append = " -pthread" FILES_${PN} += "${datadir}/gnats" FILES_${PN}-doc += "${datadir}/examples"
Signature · 1 line
2.10.2
PATCH 2/2 Disable PIE for libvdpau
--- meta-oe/conf/distro/include/meta_oe_security_flags.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta-oe/conf/distro/include/meta_oe_security_flags.inc +5 -0
@@ -12,3 +12,8 @@ SECURITY_CFLAGS_pn-cpufrequtils = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-libcec = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-libmodplug = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-libcdio = "${SECURITY_NO_PIE_CFLAGS}" + +#| /mnt/b/build/tmp-glibc/sysroots/intel-corei7-64/usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init': +#| /usr/src/debug/glibc/2.24-r0/git/csu/elf-init.c:86: undefined reference to `__init_array_start' + +SECURITY_CFLAGS_pn-libvdpau = "${SECURITY_NO_PIE_CFLAGS}"
Signature · 1 line
2.10.2
Quoted 20 lines · Khem Raj
Fixes errors on
x86_64e.g.
errors.so: relocationR_X86_64_PC32against symbol `k5_vset_error' can not be used when making a shared object; recompile with -fPICSigned-off-by Khem Raj <[email protected]>---
meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb | 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)meta- renamed from meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb +0
-0oe/recipes-connectivity/krb5/krb5_1.13.6.bb
index e2d0594..06f7f90 100644meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb +0
-0@@ -51,8 +51,8 @@ CACHED_CONFIGUREVARS +="krb5_cv_attr_constructor_destructor=yes
ac_cv_func_regcac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \
ac_cv_file__etc_TIMEZONE=no"
meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regc · line 55
Quoted 4 lines
meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb +2
-2-CFLAGS_append = " -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" -LDFLAGS_append = " -lpthread" +CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" +LDFLAGS_append = " -pthread"
Hm, it would be useful to add -pthread to CFLAGS as well in this case. That flag is doing more than just adding the library to the linker command line, see gcc -dumpspecs
Cheers,
Andre'
Quoted 6 lines
FILES_${PN} += "${datadir}/gnats"
FILES_${PN}-doc += "${datadir}/examples"
--
2.10.2