diff options
author | Mark Hatle <mark.hatle@amd.com> | 2023-04-12 15:30:04 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2023-04-13 09:47:49 -0500 |
commit | 8c32e90f438b92b4f52b3e942fb60eacd5bec842 (patch) | |
tree | e7985b0b428d792393aa7ff2ea9dc47f53142f41 /meta-xilinx-standalone/conf/distro | |
parent | 1b71f4b7059c98a172d1e814cb78afaeb86ed0e2 (diff) | |
download | meta-xilinx-8c32e90f438b92b4f52b3e942fb60eacd5bec842.tar.gz |
xilinx-standalone.inc: Remove security_flags.inc
Inclusion of security_flags.inc lead to a number of problems with the
baremetal distributions:
*ARM v8*
aarch64-xilinx-elf-ld: testA53.elf: error: PHDR segment not covered by LOAD segment
aarch64-xilinx-elf-ld: warning: testA53.elf has a LOAD segment with RWX permissions
*ARM v7*
arm-xilinx-eabi-ld: .../aarch32-xilinx-eabi/usr/lib/thumb/v7-a+fp/hard/crtbegin.o:
relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
The configuration that works:
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now"
export CPPFLAGS=""
Configuration that provides the warnings/errors:
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed "
export CPPFLAGS=""
The LDFLAGS was introdued by the security_flags.inc, the
SECURITY_CFLGAS:class-target ?= "" and
SECURITY_LDFLAGS:class-target ?= "" was supposed to prevent this, however
the cross compiler is built in the cross or canadian-cross or other
context and NOT target. Additionally the SDK environment is configured
in the nativesdk environment, so the default values may not match the
configured (target) compiler and CFLAGS. Removing security_flags.inc
resolves both of these issues, as the security flags don't really do
anything on a baremetal configuration, by default, anyway.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-standalone/conf/distro')
-rw-r--r-- | meta-xilinx-standalone/conf/distro/xilinx-standalone.inc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc index 4b51dd1b..f86a5971 100644 --- a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc +++ b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc | |||
@@ -39,12 +39,8 @@ TOOLCHAIN_HOST_TASK:append:sdkmingw32 = " nativesdk-mingw-w64-winpthreads" | |||
39 | # do so. | 39 | # do so. |
40 | DISABLE_STATIC:class-target ?= "" | 40 | DISABLE_STATIC:class-target ?= "" |
41 | 41 | ||
42 | SECURITY_CFLAGS:class-target ?= "" | ||
43 | SECURITY_LDFLAGS:class-target ?= "" | ||
44 | |||
45 | require conf/distro/include/no-static-libs.inc | 42 | require conf/distro/include/no-static-libs.inc |
46 | require conf/distro/include/yocto-uninative.inc | 43 | require conf/distro/include/yocto-uninative.inc |
47 | require conf/distro/include/security_flags.inc | ||
48 | INHERIT += "uninative" | 44 | INHERIT += "uninative" |
49 | 45 | ||
50 | BB_SIGNATURE_HANDLER ?= "OEEquivHash" | 46 | BB_SIGNATURE_HANDLER ?= "OEEquivHash" |