When tweaking the protection flags for each architecture, we want
to check for the CPU architecture (think "powerpc") and not the
system architecture (think "macppc").

ok?

Index: Makefile.inc
===================================================================
RCS file: /cvs/src/gnu/usr.bin/clang/Makefile.inc,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.inc
--- Makefile.inc        11 Jan 2019 23:25:22 -0000      1.10
+++ Makefile.inc        12 Jan 2019 22:32:56 -0000
@@ -24,10 +24,11 @@ CPPFLAGS+=  -I${LLVM_SRCS}/include -I${.C
 CPPFLAGS+=     -DNDEBUG
 
 # Disable some protections in the compiler to regain performance.
-.if (${MACHINE} == "amd64" || ${MACHINE} == "i386" || ${MACHINE} == "arm64")
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
+    ${MACHINE_ARCH} == "aarch64"
 CPPFLAGS+=     -fno-ret-protector
 .endif
-.if (${MACHINE} == "amd64" || ${MACHINE} == "i386")
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
 CPPFLAGS+=     -mno-retpoline
 .endif
 
-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to