summaryrefslogtreecommitdiff
path: root/lib/csu
diff options
context:
space:
mode:
authormortimer <mortimer@cvs.openbsd.org>2020-05-19 11:23:55 +0000
committermortimer <mortimer@cvs.openbsd.org>2020-05-19 11:23:55 +0000
commit3f1b09ea81bdbc9eb71ab90b95f287e186be2a73 (patch)
tree817b9ecb1b5edf4e7de8f1e02c344f4c7092f21c /lib/csu
parentcfc0d63ef2bed2ff1c2677bac127d177ca81a937 (diff)
Disable builtins on ppc in order to prevent the compiler from optimizing in
calls to libc in the process boot code that might not work before things like the GOT are set up. Suggested by deraadt@ ok visa@
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/csu/Makefile b/lib/csu/Makefile
index c005dec9a90..4f8b3712dc5 100644
--- a/lib/csu/Makefile
+++ b/lib/csu/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.32 2019/07/01 15:55:50 kettenis Exp $
+# $OpenBSD: Makefile,v 1.33 2020/05/19 11:23:54 mortimer Exp $
OBJS= crt0.o gcrt0.o
OBJS+= crtbegin.o crtend.o
@@ -33,7 +33,7 @@ RCFLAGS+=-fno-stack-protector
.endif
# Prevent use of builtins in _dl_boot_bind().
-.if ${MACHINE_CPU} == "mips64"
+.if ${MACHINE_CPU} == "mips64" || ${MACHINE_CPU} == "powerpc"
RCFLAGS+=-fno-builtin
.endif