diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2018-11-08 14:13:52 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2018-11-08 14:13:52 +0000 |
commit | 3ae86ee97e1084b59afb6ff82889b12e9602b9ea (patch) | |
tree | 9606e16ccd19d7c8c1f8b2f89550085e4fced0a8 /share | |
parent | 62bd4347d9fd9d7f78e4b811c459b4eb73b77785 (diff) |
Do not pass -fno-pie to the compiler on mips64. It has no effect
with base gcc, whereas with clang it causes an error.
Suggested by and OK kettenis@
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.own.mk | 8 |
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 |