pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkgsrc-2005Q2]: pkgsrc/mk/wrapper Pullup ticket 708 - requested by Gr...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c26b03ef9b12
branches: pkgsrc-2005Q2
changeset: 496024:c26b03ef9b12
user: salo <salo%pkgsrc.org@localhost>
date: Wed Aug 24 09:01:19 2005 +0000
description:
Pullup ticket 708 - requested by Grant Beattie
portability fix for compiler wrapper
Revisions pulled up:
- pkgsrc/mk/wrapper/bsd.wrapper.mk 1.35
- pkgsrc/mk/wrapper/cmd-sink-solaris-imake 1.1
- pkgsrc/mk/wrapper/transform-solaris-gcc 1.1
Module Name: pkgsrc
Committed By: grant
Date: Sat Jul 23 04:45:30 UTC 2005
Modified Files:
pkgsrc/mk/wrapper: bsd.wrapper.mk
Added Files:
pkgsrc/mk/wrapper: cmd-sink-solaris-imake transform-solaris-gcc
Log Message:
ensure gcc options are always passed to imake when using gcc on
Solaris.
fixes PR pkg/29608.
diffstat:
mk/wrapper/bsd.wrapper.mk | 23 ++++++++++++++++++-
mk/wrapper/cmd-sink-solaris-imake | 46 +++++++++++++++++++++++++++++++++++++++
mk/wrapper/transform-solaris-gcc | 42 +++++++++++++++++++++++++++++++++++
3 files changed, 110 insertions(+), 1 deletions(-)
diffs (140 lines):
diff -r 3ee74a4398bb -r c26b03ef9b12 mk/wrapper/bsd.wrapper.mk
--- a/mk/wrapper/bsd.wrapper.mk Mon Aug 22 13:17:49 2005 +0000
+++ b/mk/wrapper/bsd.wrapper.mk Wed Aug 24 09:01:19 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.32.2.1 2005/07/29 07:38:30 snj Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.32.2.2 2005/08/24 09:01:19 salo Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -314,6 +314,15 @@
_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
.endif
+.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc)
+_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-solaris-gcc
+_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-solaris-gcc
+_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
+_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
+_WRAP_CMD_SINK.IMAKE= ${WRAPPER_TMPDIR}/cmd-sink-solaris-imake
+_WRAP_CACHE_BODY.IMAKE= ${WRAPPER_TMPDIR}/cache-body-solaris-imake
+.endif
+
# Filter to scrunch shell scripts by removing comments and empty lines.
_WRAP_SH_CRUNCH_FILTER= \
${GREP} -v "^\#[^!]" | ${GREP} -v "^[ ][ ]*\#" | \
@@ -434,6 +443,18 @@
do-wrapper: ${_target_}
.endfor
+${WRAPPER_TMPDIR}/transform-solaris-gcc: \
+ ${WRAPPER_SRCDIR}/transform-solaris-gcc
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
+ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+
+${WRAPPER_TMPDIR}/cmd-sink-solaris-imake: \
+ ${WRAPPER_SRCDIR}/cmd-sink-solaris-imake
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
+ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+
${WRAPPER_TMPDIR}/arg-pp-darwin-gcc: \
${WRAPPER_SRCDIR}/arg-pp-darwin-gcc
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
diff -r 3ee74a4398bb -r c26b03ef9b12 mk/wrapper/cmd-sink-solaris-imake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/wrapper/cmd-sink-solaris-imake Wed Aug 24 09:01:19 2005 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: cmd-sink-solaris-imake,v 1.1.2.2 2005/08/24 09:01:19 salo Exp $
+#
+# Copyright (c) 2005 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Grant Beattie.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The NetBSD Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+# ensure gcc options are always passed to imake.
+arg=-DHasGcc2=YES
+$debug_log $wrapperlog " (cmd-sink-solaris-imake) pop: $arg"
+. $buildcmd
+
+arg=-DHasGcc2ForCplusplus=YES
+$debug_log $wrapperlog " (cmd-sink-solaris-imake) pop: $arg"
+. $buildcmd
+
+while ! queue_is_empty cmdbuf; do
+ pop_queue cmdbuf arg
+ $debug_log $wrapperlog " (cmd-sink-solaris-imake) pop: $arg"
+ . $buildcmd
+done
diff -r 3ee74a4398bb -r c26b03ef9b12 mk/wrapper/transform-solaris-gcc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/wrapper/transform-solaris-gcc Wed Aug 24 09:01:19 2005 +0000
@@ -0,0 +1,42 @@
+# $NetBSD: transform-solaris-gcc,v 1.1.2.2 2005/08/24 09:01:19 salo Exp $
+#
+# Copyright (c) 2005 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Grant Beattie.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The NetBSD Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+case $arg in
+# the imake config templates on Solaris 8 pass -Kpic to build PIC, even
+# when -DHasGcc2=YES -DHasGcc2ForCplusplus=YES is passed, so transform
+# -Kpic to -fPIC.
+-Kpic|-KPIC)
+ arg=-fPIC
+ msg_log $wrapperlog " (transform-solaris-gcc) to: $arg"
+ addtocache=yes
+ ;;
+esac
Home |
Main Index |
Thread Index |
Old Index