summaryrefslogtreecommitdiff
path: root/share/mk/bsd.own.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.own.mk')
-rw-r--r--share/mk/bsd.own.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 6d7310ddba4..79c9e7f1b33 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.own.mk,v 1.191 2018/10/22 19:31:30 naddy Exp $
+# $OpenBSD: bsd.own.mk,v 1.192 2018/11/08 14:13:51 visa Exp $
# $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $
# Host-specific overrides
@@ -60,6 +60,12 @@ LINKER_VERSION?=bfd
STATICPIE?=-pie
.endif
+# Executables are always PIC on mips64.
+# Do not pass -fno-pie to the compiler because clang does not accept it.
+.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+NOPIE_FLAGS?=
+.endif
+
.if !empty(PIE_ARCH:M${_arch})
NOPIE_FLAGS?=-fno-pie
NOPIE_LDFLAGS?=-nopie