From 3ae86ee97e1084b59afb6ff82889b12e9602b9ea Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Thu, 8 Nov 2018 14:13:52 +0000 Subject: 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@ --- share/mk/bsd.own.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'share') 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 -- cgit v1.2.3