diff mbox series

[RFC,12/12] package: disable -ztext for hexagon

Message ID 20241025140714.2395033-13-bcain@quicinc.com
State New
Headers show
Series add hexagon architecture | expand

Commit Message

Brian Cain Oct. 25, 2024, 2:07 p.m. UTC
Without this commit, autotools compiler tests often fail with:

    hexagon-unknown-linux-musl-clang: error: unknown argument: '-ztext'

... but that's probably because we specified clang as LD and not lld.

Signed-off-by: Brian Cain <bcain@quicinc.com>
---
 package/Makefile.in | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/package/Makefile.in b/package/Makefile.in
index b54fe123ba..1f1b429462 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -171,8 +171,10 @@  TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
 # "-z" to be passed and the "text" keyword to be dropped otherwise. Both
 # gcc and ld supports that, so it probably won't cause us problems.
 ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_STATIC_LIBS),y:)
+ifneq ($(BR2_hexagon),y)
 TARGET_LDFLAGS += -ztext
 endif
+endif
 
 # By design, _FORTIFY_SOURCE requires gcc optimization to be enabled.
 # Therefore, we need to pass _FORTIFY_SOURCE and the optimization level