pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/tv-derecurse]: pkgsrc/mk Merge from HEAD.
details: https://anonhg.NetBSD.org/pkgsrc/rev/85d1726a4f05
branches: tv-derecurse
changeset: 483975:85d1726a4f05
user: tv <tv%pkgsrc.org@localhost>
date: Thu Dec 09 17:15:01 2004 +0000
description:
Merge from HEAD.
diffstat:
mk/bsd.options.mk | 20 +++++++++++--
mk/bsd.sites.mk | 4 +-
mk/pthread.builtin.mk | 5 ++-
mk/wrapper/bsd.wrapper.mk | 10 ++++++-
mk/wrapper/cmd-sink-darwin-xlc | 59 ++++++++++++++++++++++++++++++++++++++++++
mk/wrapper/logic | 36 +++++++++++++++++--------
mk/wrapper/transform-xlc-cc | 24 +++++++++++++---
7 files changed, 133 insertions(+), 25 deletions(-)
diffs (292 lines):
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/bsd.options.mk
--- a/mk/bsd.options.mk Sun Dec 05 03:42:35 2004 +0000
+++ b/mk/bsd.options.mk Thu Dec 09 17:15:01 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.options.mk,v 1.9.4.2 2004/11/28 20:11:32 tv Exp $
+# $NetBSD: bsd.options.mk,v 1.9.4.3 2004/12/09 17:15:01 tv Exp $
#
# This Makefile fragment provides boilerplate code for standard naming
# conventions for handling per-package build options.
@@ -176,9 +176,21 @@
END { if (length(line) > 0) print " "line } \
'
-# Store the result in the +BUILD_INFO file so we can query for the build
-# options using "pkg_info -Q PKG_OPTIONS <pkg>".
-BUILD_DEFS_FIXED+= PKG_OPTIONS
+.if !defined(_PKG_OPTIONS_AVAILABLE) && defined(PKG_SUPPORTED_OPTIONS) && !empty(PKG_SUPPORTED_OPTIONS)
+_PKG_OPTIONS_AVAILABLE!= ${ECHO} ${PKG_SUPPORTED_OPTIONS} | ${XARGS} -n 1 | ${SORT}
+.endif
+.if !defined(_PKG_OPTIONS_DEFAULT) && defined(PKG_DEFAULT_OPTIONS) && !empty(PKG_DEFAULT_OPTIONS)
+_PKG_OPTIONS_DEFAULT!= ${ECHO} ${PKG_DEFAULT_OPTIONS} | ${XARGS} -n 1 | ${SORT}
+.endif
+.if !defined(_PKG_OPTIONS_ENABLED) && defined(PKG_OPTIONS) && !empty(PKG_OPTIONS)
+_PKG_OPTIONS_ENABLED!= ${ECHO} ${PKG_OPTIONS} | ${XARGS} -n 1 | ${SORT}
+.endif
+
+.PHONY: show-options
+show-options:
+ @${ECHO} "available: ${_PKG_OPTIONS_AVAILABLE}"
+ @${ECHO} "default: ${_PKG_OPTIONS_DEFAULT}"
+ @${ECHO} "enabled: ${_PKG_OPTIONS_ENABLED}"
.if defined(PKG_SUPPORTED_OPTIONS)
.PHONY: supported-options-message
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/bsd.sites.mk
--- a/mk/bsd.sites.mk Sun Dec 05 03:42:35 2004 +0000
+++ b/mk/bsd.sites.mk Thu Dec 09 17:15:01 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sites.mk,v 1.20.2.3 2004/12/03 19:15:00 tv Exp $
+# $NetBSD: bsd.sites.mk,v 1.20.2.4 2004/12/09 17:15:01 tv Exp $
#
# Default MASTER_SITES
@@ -127,7 +127,7 @@
http://umn.dl.sourceforge.net/sourceforge/ \
http://unc.dl.sourceforge.net/sourceforge/ \
http://voxel.dl.sourceforge.net/sourceforge/ \
- ftp://ftp3.sourceforge.net/pub/sourceforge/
+ ftp://ftp2.sourceforge.net/pub/sourceforge/
# ftp://ftp.tuwien.ac.at/linux/sourceforge/
# http://sf.gds.tuwien.ac.at/
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/pthread.builtin.mk
--- a/mk/pthread.builtin.mk Sun Dec 05 03:42:35 2004 +0000
+++ b/mk/pthread.builtin.mk Thu Dec 09 17:15:01 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.builtin.mk,v 1.2.2.1 2004/11/28 20:11:32 tv Exp $
+# $NetBSD: pthread.builtin.mk,v 1.2.2.2 2004/12/09 17:15:01 tv Exp $
.for _lib_ in pthread c_r rt
. if !defined(_BLNK_LIB_FOUND.${_lib_})
@@ -53,6 +53,9 @@
. else
BUILDLINK_CPPFLAGS.pthread+= -D_REENTRANT
. endif
+. if ${OPSYS} == "FreeBSD"
+BUILDLINK_CPPFLAGS.pthread+= -D_THREAD_SAFE
+. endif
# Handle systems which have pthreads functions in libc_r such as
# FreeBSD 5.x, or fall back to libc if we don't find libc_r.
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/wrapper/bsd.wrapper.mk
--- a/mk/wrapper/bsd.wrapper.mk Sun Dec 05 03:42:35 2004 +0000
+++ b/mk/wrapper/bsd.wrapper.mk Thu Dec 09 17:15:01 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.12.2.4 2004/11/30 15:10:47 tv Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.12.2.5 2004/12/09 17:15:01 tv Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -252,6 +252,8 @@
.endif
.if !empty(PKGSRC_COMPILER:Mxlc)
+_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-darwin-xlc
+_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-xlc-cc
_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-xlc-cc
_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
@@ -415,6 +417,12 @@
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+${WRAPPER_TMPDIR}/cmd-sink-darwin-xlc: \
+ ${WRAPPER_SRCDIR}/cmd-sink-darwin-xlc
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
+ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+
${WRAPPER_TMPDIR}/cmd-sink-interix-gcc: \
${WRAPPER_SRCDIR}/cmd-sink-interix-gcc
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/wrapper/cmd-sink-darwin-xlc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/wrapper/cmd-sink-darwin-xlc Thu Dec 09 17:15:01 2004 +0000
@@ -0,0 +1,59 @@
+# $NetBSD: cmd-sink-darwin-xlc,v 1.1.2.2 2004/12/09 17:15:01 tv Exp $
+#
+# Copyright (c) 2004 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Johnny C. Lam.
+#
+# 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. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by the NetBSD
+# Foundation, Inc. and its contributors.
+# 4. 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.
+
+# Empty out the command buffer and build up the command line in $cmd.
+while ! queue_is_empty cmdbuf; do
+ pop_queue cmdbuf arg
+ $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pop: $arg"
+ case $arg in
+ ##############################################################
+ # xlc doesn't support -install_name, -compatibility_version,
+ # -current_version, so explicitly pass them to the linker with
+ # the next argument.
+ ##############################################################
+ -install_name|-compatibility_version|-current_version)
+ pop_queue cmdbuf arg2
+ $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pop: $arg2"
+ $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pre: -Wl,$arg2"
+ prepend_queue cmdbuf "-Wl,$arg2"
+ $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pre: -Wl,$arg"
+ prepend_queue cmdbuf "-Wl,$arg"
+ ;;
+ *)
+ . $buildcmd
+ ;;
+ esac
+done
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/wrapper/logic
--- a/mk/wrapper/logic Sun Dec 05 03:42:35 2004 +0000
+++ b/mk/wrapper/logic Thu Dec 09 17:15:01 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: logic,v 1.6 2004/10/08 21:53:53 jlam Exp $
+# $NetBSD: logic,v 1.6.2.1 2004/12/09 17:15:01 tv Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -207,6 +207,7 @@
*)
# Apply transformations to $arg.
addtocache=no
+ split_arg=no
case $skip_transform in
yes)
$debug_log $wrapperlog " (logic) to: $arg [untransformed]"
@@ -231,12 +232,22 @@
;;
esac
+ ##############################################
+ # Split all -l options along whitespace. This
+ # disallows library names with whitespace, but it
+ # allows us to handle transformations that look
+ # like, e.g. "-lreadline" -> "-ledit -ltermcap".
+ ##############################################
+ case $arg in
+ -l*) split_arg=yes ;;
+ esac
+
# Re-create the cache file if we're adding to it.
case $updatecache,$addtocache in
yes,yes)
shquote "$arg"; cachedarg="$shquoted"
$cat >> $cache_body << EOF
-$cachearg) arg=$cachedarg; cachehit=yes ;;
+$cachearg) arg=$cachedarg; split_arg=$split_arg; cachehit=yes ;;
EOF
$cat $cache_header \
$cache_body \
@@ -245,23 +256,24 @@
esac
;;
esac
- case $arg in
+
+ case $split_arg in
######################################################
- # Split -l options along whitespace. This disallows
- # library names with whitespace, but it allows us to
- # handle transformations that look like, e.g.
- # "-lreadline" -> "-ledit -ltermcap".
+ # Split some options along whitespace. This disallows
+ # options that contain whitespace, but it allows us to
+ # handle transformations that transform one arg into
+ # several.
######################################################
- -l*)
- for lib in $arg; do
- append_queue cmdbuf "$lib"
- $debug_log $wrapperlog " (logic) push: $lib"
+ yes)
+ for i in $arg; do
+ append_queue cmdbuf "$i"
+ $debug_log $wrapperlog " (logic) push: $i"
done
;;
######################################################
# Everything else goes into the command buffer unchanged.
######################################################
- *)
+ no)
append_queue cmdbuf "$arg"
$debug_log $wrapperlog " (logic) push: $arg"
;;
diff -r 9f85ae4c8a09 -r 85d1726a4f05 mk/wrapper/transform-xlc-cc
--- a/mk/wrapper/transform-xlc-cc Sun Dec 05 03:42:35 2004 +0000
+++ b/mk/wrapper/transform-xlc-cc Thu Dec 09 17:15:01 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: transform-xlc-cc,v 1.1 2004/10/06 09:49:53 grant Exp $
+# $NetBSD: transform-xlc-cc,v 1.1.2.1 2004/12/09 17:15:01 tv Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -36,12 +36,12 @@
case $arg in
######################################################################
-# Leave -Wl,-R unchanged.
+# Leave -Wl, unchanged.
######################################################################
--Wl,-R*)
+-Wl,*)
;;
######################################################################
-# XL C doens't understand many -W* arguments, so just silently ignore
+# XL C doesn't understand many -W* arguments, so just silently ignore
# them all.
######################################################################
-W*)
@@ -49,10 +49,24 @@
msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
addtocache=yes
;;
+# xlc uses -qmkshrobj to create shared objects, and we also need to
+# tell the linker to use a flat namespace and allow undefined symbols.
+-dynamiclib)
+ arg="-qmkshrobj -Wl,-flat_namespace -Wl,-undefined -Wl,suppress"
+ msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
+ addtocache=yes
+ split_arg=yes
+ ;;
+# -qnocommon is the xlc argument to allocate uninitialized globals in
+# the data section.
+-fno-common)
+ arg=-qnocommon
+ addtocache=yes
+ ;;
######################################################################
# Ignore some flags that are unnecessary for XL C.
######################################################################
--pipe|-ansi|-fno-common|-fno-gnu-keywords|-fstrict-prototypes|-no-cpp-precomp|-pedantic)
+-pipe|-ansi|-fno-gnu-keywords|-fstrict-prototypes|-no-cpp-precomp|-pedantic)
arg=
msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
addtocache=yes
Home |
Main Index |
Thread Index |
Old Index