summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2019-01-08 22:02:30 +0000
committerbluhm <bluhm@openbsd.org>2019-01-08 22:02:30 +0000
commit933e97dfc6e92bdb653ea82524047ca816b784c5 (patch)
tree26bc69bc5aadca1bcd734e2dcdcf6ba119bd1025
parentAdd BBA:Balmaceda, Aysen, Chile (diff)
downloadwireguard-openbsd-933e97dfc6e92bdb653ea82524047ca816b784c5.tar.xz
wireguard-openbsd-933e97dfc6e92bdb653ea82524047ca816b784c5.zip
Disable ret-protector and retpoline protections in the clang compiler
to regain build performance. OK deraadt@ guenther@ kettenis@
-rw-r--r--gnu/usr.bin/clang/Makefile.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/usr.bin/clang/Makefile.inc b/gnu/usr.bin/clang/Makefile.inc
index 1dde224fb60..a1a22948cdb 100644
--- a/gnu/usr.bin/clang/Makefile.inc
+++ b/gnu/usr.bin/clang/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.8 2018/10/04 11:43:29 patrick Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2019/01/08 22:02:30 bluhm Exp $
LLVM_SRCS?= ${.CURDIR}/../../../llvm
@@ -22,9 +22,12 @@ LLDB_INCLUDES= -I${LLVM_SRCS}/tools/lldb/include \
CPPFLAGS+= -I${LLVM_SRCS}/include -I${.CURDIR}/../include -I${.OBJDIR} \
-I${.OBJDIR}/../include
CPPFLAGS+= -DNDEBUG
+
+# Disable some protections in the compiler to regain performance.
.if (${MACHINE} == "amd64" || ${MACHINE} == "arm64")
-CPPFLAGS+= -fno-ret-protector
+CPPFLAGS+= -fno-ret-protector -mno-retpoline
.endif
+
CPPFLAGS+= -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS