Module Name: src
Committed By: riastradh
Date: Mon Jul 22 02:34:59 UTC 2024
Modified Files:
src/tests/libexec/ld.elf_so: Makefile
Log Message:
tests/libexec/ld.elf_so/t_ifunc: Handle MKRELRO=no harder.
Don't even pass -Wl,-z,norelro if MKRELRO=no, because the toolchain's
ld(1) might not support relro _or_ norelro.
Should resolve, e.g.:
/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407182350Z-tools/bin/armv7--netbsdelf-eabihf-ld:
warning: -z norelro ignored
armv7--netbsdelf-eabihf-clang: error: linker command failed with exit code 1
(use -v to see invocation)
--- t_ifunc_norelro ---
*** Failed target: t_ifunc_norelro
*** In directory: /home/source/ab/HEAD-llvm/src/tests/libexec/ld.elf_so
*** Failed commands:
${_MKTARGET_LINK}
...
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/libexec/ld.elf_so/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/libexec/ld.elf_so/Makefile
diff -u src/tests/libexec/ld.elf_so/Makefile:1.23 src/tests/libexec/ld.elf_so/Makefile:1.24
--- src/tests/libexec/ld.elf_so/Makefile:1.23 Tue Jul 16 17:15:44 2024
+++ src/tests/libexec/ld.elf_so/Makefile Mon Jul 22 02:34:58 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2024/07/16 17:15:44 riastradh Exp $
+# $NetBSD: Makefile,v 1.24 2024/07/22 02:34:58 riastradh Exp $
#
NOMAN= # defined
@@ -41,8 +41,8 @@ SRCS.t_ifunc_norelro_now= t_ifunc.c
LDADD.t_ifunc+= ${${MKRELRO} != "no":?-Wl,-z,relro:}
LDADD.t_ifunc_now+= ${${MKRELRO} != "no":?-Wl,-z,relro:} -Wl,-z,now
-LDADD.t_ifunc_norelro+= -Wl,-z,norelro
-LDADD.t_ifunc_norelro_now+= -Wl,-z,norelro -Wl,-z,now
+LDADD.t_ifunc_norelro+= ${${MKRELRO} != "no":?-Wl,-z,norelro:}
+LDADD.t_ifunc_norelro_now+= ${${MKRELRO} != "no":?-Wl,-z,norelro:} -Wl,-z,now
.PATH: ${NETBSDSRCDIR}/libexec/ld.elf_so
SRCS.t_hash+= t_hash.c