From 42140052765e05c83a3ea797dce3eaad94bc3733 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 20 Apr 2023 21:27:11 +0200 Subject: [PATCH] kern.mk: clang >= 16 already infers ELFv2 for powerpc64 There is no need to pass -mabi=elfv2 explicitly anymore, and with clang 16 in fact results in a "unused argument" warning. MFC after: 3 days --- sys/conf/kern.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 9040fced6cb..06fb48d0f93 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -215,7 +215,8 @@ CFLAGS.gcc+= -mno-spe # Use dot symbols (or, better, the V2 ELF ABI) on powerpc64 to make # DDB happy. ELFv2, if available, has some other efficiency benefits. # -.if ${MACHINE_ARCH:Mpowerpc64*} != "" +.if ${MACHINE_ARCH:Mpowerpc64*} != "" && \ + ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 CFLAGS+= -mabi=elfv2 .endif