pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ghc92 lang/ghc92: Use ${_PKGSRC_MKPIE} instead of...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/942d7e6b2b75
branches:  trunk
changeset: 374682:942d7e6b2b75
user:      pho <pho%pkgsrc.org@localhost>
date:      Thu Feb 24 09:17:59 2022 +0000

description:
lang/ghc92: Use ${_PKGSRC_MKPIE} instead of ${_OPSYS_SUPPORTS_MKPIE}

It's the variable that indicates if MKPIE is requested and feasible on the
platform. In fact I originally wrote a condition mentioning
${_PKGSRC_MKPIE}, but it somehow got lost while I was refactoring the code.

diffstat:

 lang/ghc92/Makefile |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r decd0ffb4631 -r 942d7e6b2b75 lang/ghc92/Makefile
--- a/lang/ghc92/Makefile       Thu Feb 24 02:47:00 2022 +0000
+++ b/lang/ghc92/Makefile       Thu Feb 24 09:17:59 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2022/02/23 16:01:20 jperkin Exp $
+# $NetBSD: Makefile,v 1.6 2022/02/24 09:17:59 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
@@ -93,17 +93,21 @@
 # the buildlink.
 .endfor
 
-# The use of internal variable in mk/bsd.prefs.mk is not very satisfying,
-# but the current infrastructure does not export a public variable
-# indicating whether a PIE build is requested or not. Note that we can't
-# build stage-1 compiler as PIE, because our bootkit libraries aren't
+# The use of internal variable ${_PKGSRC_MKPIE} in mk/bsd.prefs.mk is not
+# very satisfying, but the current infrastructure does not export a public
+# variable indicating whether a PIE build is requested or not. Note that we
+# can't build stage-1 compiler as PIE, because our bootkit libraries aren't
 # necessarily built as PIC.
 .for stage in 0 1 2
 .  if ${stage} == 0
 CONFIGURE_ENV+=        CONF_CC_OPTS_STAGE${stage}=${CFLAGS:M*:Q}
 .  else
-CONFIGURE_ENV+=        CONF_HC_OPTS_STAGE${stage}=-fPIC\ ${_OPSYS_SUPPORTS_MKPIE:D-pie}
+.    if ${_PKGSRC_MKPIE} == "yes"
+CONFIGURE_ENV+=        CONF_HC_OPTS_STAGE${stage}=-fPIC\ -pie
 CONFIGURE_ENV+=        CONF_CC_OPTS_STAGE${stage}=${CFLAGS:M*:Q}\ -fPIC
+.    else
+CONFIGURE_ENV+=        CONF_CC_OPTS_STAGE${stage}=${CFLAGS:M*:Q}
+.    endif
 .  endif
 .endfor
 



Home | Main Index | Thread Index | Old Index