=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/share/mk/bsd.own.mk,v retrieving revision 1.191 retrieving revision 1.192 diff -u -r1.191 -r1.192 --- src/share/mk/bsd.own.mk 2018/10/22 19:31:30 1.191 +++ src/share/mk/bsd.own.mk 2018/11/08 14:13:51 1.192 @@ -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 @@ -58,6 +58,12 @@ .if !empty(STATICPIE_ARCH:M${_arch}) 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})