Move XCOFF special handling to Policy.sh.

This commit is contained in:
sbd 2012-11-07 02:46:19 +00:00
parent 71aa763c23
commit 530c0b277a
3 changed files with 10 additions and 20 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.189 2012/11/02 22:24:08 sbd Exp $
# $NetBSD: Makefile,v 1.190 2012/11/07 02:46:19 sbd Exp $
.include "license.mk"
.include "Makefile.common"
@ -58,8 +58,10 @@ SUBST_STAGE.policysh= pre-configure
SUBST_FILES.policysh= Policy.sh
SUBST_VARS.policysh+= MACHINE_ARCH
SUBST_VARS.policysh+= LOWER_OPSYS
SUBST_VARS.policysh+= OBJECT_FMT
SUBST_VARS.policysh+= CC
SUBST_VARS.policysh+= CFLAGS
SUBST_VARS.policysh+= COMPILER_RPATH_FLAG
SUBST_VARS.policysh+= PERL5_PREFIX
SUBST_VARS.policysh+= PERL5_SITEPREFIX
SUBST_VARS.policysh+= PERL5_VENDORPREFIX

View file

@ -1,4 +1,4 @@
# $NetBSD: Policy.sh,v 1.3 2012/11/02 07:36:24 sbd Exp $
# $NetBSD: Policy.sh,v 1.4 2012/11/07 02:46:19 sbd Exp $
#
# Site-wide policy settings for pkgsrc Perl
#
@ -83,10 +83,11 @@ cat > UU/pkgsrc.cbu <<EOCBU
# This script UU/pkgsrc.cbu will get 'called-back' by Configure
# *after* all hints
# Sets the correct LDFLAGS for linking against pkgsrc-installed
# libraries
ldflags="@LOCLIBRPATHFLAGS@ \$ldflags"
lddlflags="@LOCLIBRPATHFLAGS@ \$lddlflags"
# XCOFF targets need the path specified where libperl.a resides.
if $test "@OBJECT_FMT@" = "XCOFF"; then
ldflags="@COMPILER_RPATH_FLAG@\${shrpdir} \$ldflags"
lddlflags="@COMPILER_RPATH_FLAG@\${shrpdir} \$lddlflags"
fi
# Set pkgsrc defaults for library and header search paths:
# nail down the directories in which headers and libraries of

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.1 2012/11/02 21:22:10 sbd Exp $
# $NetBSD: options.mk,v 1.2 2012/11/07 02:46:19 sbd Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.perl
PKG_OPTIONS_REQUIRED_GROUPS= perlbits
@ -68,28 +68,15 @@ CONFIGURE_ARGS+= -Uusemymalloc
.if !empty(PKG_OPTIONS:M64bitint)
CONFIGURE_ARGS+= -Duse64bitint
. if ${OBJECT_FMT} == "XCOFF"
LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int/CORE
. endif
.elif !empty(PKG_OPTIONS:M64bitmore)
CONFIGURE_ARGS+= -Dusemorebits
. if ${OBJECT_FMT} == "XCOFF"
LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int-ld/CORE
. endif
.elif !empty(PKG_OPTIONS:M64bitall)
CONFIGURE_ARGS+= -Duse64bitall
. if ${OBJECT_FMT} == "XCOFF"
LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64all/CORE
. endif
.elif !empty(PKG_OPTIONS:M64bitnone)
CONFIGURE_ARGS+= -Uuse64bitall -Uusemorebits -Uuse64bitint
. if ${OBJECT_FMT} == "XCOFF"
LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi/CORE
. endif
.else
. if ${OBJECT_FMT} == "XCOFF"
BROKEN= XCOFF targets need the path specified where libperl.a resides.\
Please choose on of 64bitint 64bitmore 64bitall or 64bitnone to allow this.
. endif
.endif
SUBST_VARS.policysh+= LOCLIBRPATHFLAGS