Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,4 +1,4 @@
# $NetBSD: arg-source,v 1.15 2007/09/19 13:08:19 rillig Exp $
# $NetBSD: arg-source,v 1.20 2016/09/16 13:12:29 ryoon Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -50,9 +50,10 @@ while $test $# -gt 0; do
arg="$1"; shift
case $arg in
##############################################################
# Merge "-I /dir" into a single "-I/dir". Same for -L, -R.
# Merge "-I /dir" into a single "-I/dir". Same for -l, -D,
# -L and -R.
##############################################################
-[DILR])
-[lDILR])
nextarg="$1"; shift
case "$nextarg" in
-*) msg_log $wrapperlog "WARNING: [arg-source] An $arg option must not be followed by another option, $nextarg." ;;
@@ -61,6 +62,18 @@ while $test $# -gt 0; do
$debug_log $wrapperlog " (arg-source) push: $arg$nextarg"
;;
##############################################################
# Convert "-isystem /dir" into a single "-isystem,/dir".
# cmd-sync will put it back
##############################################################
-isystem)
nextarg="$1"; shift
case "$nextarg" in
-*) msg_log $wrapperlog "WARNING: [arg-source] An $arg option must not be followed by another option, $nextarg." ;;
esac
append_queue argbuf "$arg,$nextarg"
$debug_log $wrapperlog " (arg-source) push: $arg,$nextarg"
;;
##############################################################
# Split -Wl,option1,option2 into -Wl,option1 -Wl,option2 and
# process them again.
#
@@ -88,6 +101,7 @@ while $test $# -gt 0; do
##############################################################
# Split "-Wl,-R/dir1:/dir2" into "-Wl,-R/dir1 -Wl,-R/dir2".
# Same for -R and -Wl,-rpath and -Wl,-rpath-link.
# (at the same time suppress the double dash in --rpath to -rpath)
##############################################################
-R*:*|-Wl,-R*:*|\
-Wl,-rpath,*:*|-Wl,-rpath-link,*:*|-Wl,--rpath,*:*)
@@ -96,7 +110,7 @@ while $test $# -gt 0; do
-Wl,-R*) R="-Wl,-R" ;;
-Wl,-rpath,*) R="-Wl,-rpath," ;;
-Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
-Wl,--rpath,*) R="-Wl,--rpath," ;;
-Wl,--rpath,*) R="-Wl,-rpath," ;;
esac
list="${arg#$R}"
save_IFS="${IFS}"; IFS=":"
@@ -111,6 +125,7 @@ while $test $# -gt 0; do
# Merge and split "-Wl,-R -Wl,/dir1:/dir2" into
# "-Wl,-R/dir1 -Wl,-R/dir2". Same for -Wl,-rpath and
# -Wl,-rpath-link.
# (at the same time suppress the double dash in --rpath to -rpath)
##############################################################
-Wl,-R|-Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath)
nextarg="$1"; shift
@@ -118,7 +133,7 @@ while $test $# -gt 0; do
-Wl,-R) R="-Wl,-R" ;;
-Wl,-rpath) R="-Wl,-rpath," ;;
-Wl,-rpath-link) R="-Wl,-rpath-link," ;;
-Wl,--rpath) R="-Wl,--rpath," ;;
-Wl,--rpath) R="-Wl,-rpath," ;;
esac
nextarg="${nextarg#-Wl,}"
case $nextarg in
@@ -159,6 +174,22 @@ while $test $# -gt 0; do
##############################################################
-c|-S|-E)
dont_link=yes
dont_link_binary=yes
append_queue argbuf "$arg"
$debug_log $wrapperlog " (arg-source) push: $arg"
;;
-shared)
dont_link_binary=yes
append_queue argbuf "$arg"
$debug_log $wrapperlog " (arg-source) push: $arg"
;;
##############################################################
# Determine if we are compiling anything from source.
##############################################################
*.C|*.CPP|*.c|*.c++|*.cc|*.cp|*.cpp|*.cxx|*.go|\
*.H|*.HPP|*.h|*.h++|*.hh|*.hp|*.hpp|*.hxx|*.i|*.ii|\
*.M|*.m|*.mi|*.mii|*.mm|*.S|*.s|*.sx|*.tcc)
has_source=yes
append_queue argbuf "$arg"
$debug_log $wrapperlog " (arg-source) push: $arg"
;;

View File

@@ -1,4 +1,4 @@
# $NetBSD: bsd.wrapper.mk,v 1.93 2015/04/27 19:59:07 jperkin Exp $
# $NetBSD: bsd.wrapper.mk,v 1.97 2016/03/11 23:03:31 khorben Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -311,6 +311,9 @@ _WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
.if !empty(PKGSRC_COMPILER:Mgcc)
_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-gcc
_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
. if ${_PKGSRC_MKPIE} != "no"
_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-mkpie-gcc
. endif
.endif
_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-ld
@@ -514,6 +517,7 @@ generate-wrappers: ${_target_}
cmd-sink-irix-ld \
cmd-sink-interix-gcc \
cmd-sink-ld \
cmd-sink-mkpie-gcc \
cmd-sink-osf1-cc \
cmd-sink-osf1-ld \
cmd-sink-hpux-cc \
@@ -688,7 +692,7 @@ SUBST_MESSAGE.unwrap= Unwrapping files-to-be-installed.
SUBST_FILES.unwrap= ${_UNWRAP_FILES}
SUBST_SED.unwrap= ${_UNWRAP_SED}
.if defined(_WRAPPER_DEBUG) && !empty(_WRAPPER_DEBUG:M[yY][eE][sS])
SUBST_POSTCMD.unwrap= ${DO_NADA}
_SUBST_KEEP.unwrap= ${CP} -f "$$file" "$$file.before-unwrap"
.endif
.endif

View File

@@ -1,4 +1,4 @@
# $NetBSD: cmd-sink,v 1.1 2004/09/21 15:01:41 jlam Exp $
# $NetBSD: cmd-sink,v 1.2 2016/03/14 20:11:56 markd Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -38,5 +38,13 @@
while ! queue_is_empty cmdbuf; do
pop_queue cmdbuf arg
$debug_log $wrapperlog " (cmd-sink) pop: $arg"
case $arg in
-isystem,*)
dir="${arg#-isystem,}"
arg="-isystem"
. $buildcmd
arg="$dir"
;;
esac
. $buildcmd
done

View File

@@ -0,0 +1,49 @@
# $NetBSD: cmd-sink-mkpie-gcc,v 1.2 2016/03/13 15:32:06 khorben Exp $
#
# Copyright (c) 2016 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Pierre Pronchery.
#
# 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.
#
# 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.
while ! queue_is_empty cmdbuf; do
pop_queue cmdbuf arg
$debug_log $wrapperlog " (cmd-sink-mkpie-gcc) pop: $arg"
case $arg in
*)
. $buildcmd
;;
esac
done
# Append any optional flags required when linking binaries.
if $test "$dont_link_binary" != "yes"; then
# XXX obtain these flags from _MKPIE_LDFLAGS.gcc and _MKPIE_CFLAGS.gcc
MKPIE_FLAGS="-pie"
$test "$has_source" = "yes" && MKPIE_FLAGS="-fPIC $MKPIE_FLAGS"
for arg in $MKPIE_FLAGS; do
$debug_log $wrapperlog " (cmd-sink-mkpie-gcc) pop: $arg"
. $buildcmd
done
fi

View File

@@ -1,6 +1,6 @@
#! @WRAPPER_SHELL@
#
# $NetBSD: gen-transform.sh,v 1.10 2014/12/30 15:13:20 wiz Exp $
# $NetBSD: gen-transform.sh,v 1.11 2016/03/14 20:11:56 markd Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -81,12 +81,16 @@ gen()
transform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt:-I$1:-I$2"
gen $_action "opt:-isystem,$1:-isystem,$2"
gen $_action "opt-sub:-I$1:-I$2"
gen $_action "opt-sub:-isystem,$1:-isystem,$2"
;;
untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt:-I$2:-I$1"
gen $_action "opt:-isystem,$2:-isystem,$1"
gen $_action "opt-sub:-I$2:-I$1"
gen $_action "opt-sub:-isystem,$2:-isystem,$1"
;;
esac
;;
@@ -161,6 +165,7 @@ gen()
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
#gen $_action "opt:$1:$2"
gen $_action "opt:-I$1:-I$2"
gen $_action "opt:-isystem,$1:-isystem,$2"
gen $_action "opt:-L$1:-L$2"
gen $_action "rpath-exact:$1:$2"
gen $_action "sub-mangle:$1:$2"
@@ -172,6 +177,7 @@ gen()
no-abspath)
$debug_log $wrapperlog " (gen-transform) $_cmd"
gen $_action "rm-optarg:-I/"
gen $_action "rm-optarg:-isystem,/"
gen $_action "rm-optarg:-L/"
for _R in $rpath_options; do
gen $_action "rm-optarg:$_R/"
@@ -303,7 +309,9 @@ gen()
rmdir)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt:-I$1:"
gen $_action "opt:-isystem,$1:"
gen $_action "rm-optarg:-I$1/"
gen $_action "rm-optarg:-isystem,$1/"
gen $_action "opt:-L$1:"
gen $_action "rm-optarg:-L$1/"
for _R in $rpath_options; do
@@ -340,6 +348,7 @@ gen()
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt-sub-trailer:$1:/\.:$1:"
gen $_action "opt-sub-trailer:-I$1:/\.:-I$1:"
gen $_action "opt-sub-trailer:-isystem,$1:/\.:-isystem,$1:"
gen $_action "opt-sub-trailer:-L$1:/\.:-L$1:"
for _R in $rpath_options; do
gen $_action "opt-sub-trailer:$_R$1:/\.:$_R$1:"
@@ -355,6 +364,7 @@ gen()
#gen $_action "opt-sub:$1:$2"
gen $_action "libpath:$1:$2"
gen $_action "opt-sub:-I$1:-I$2"
gen $_action "opt-sub:-isystem,$1:-isystem,$2"
gen $_action "opt-sub:-L$1:-L$2"
gen $_action "sub-rpath:$1:$2"
;;

View File

@@ -1,4 +1,4 @@
# $NetBSD: transform-gcc,v 1.29 2013/12/31 13:56:35 tron Exp $
# $NetBSD: transform-gcc,v 1.32 2016/03/14 20:11:56 markd Exp $
#
# This file handles the transformations needed for gcc that can be done
# looking at only one argument at a time.
@@ -43,15 +43,20 @@ case $arg in
-fomit-frame-pointer |\
-fPIC |\
-fpic |\
-fPIE |\
-fpie |\
-fpcc-struct-return |\
-freg-struct-return |\
-frename-registers |\
-fsigned-char |\
-fstack-protector |\
-fstack-protector-all |\
-funroll-loops |\
-funsigned-char |\
-fweb |\
-fwrapv |\
-ggdb |\
-isystem,* |\
-M |\
-M[DFMPT] |\
-MMD |\
@@ -68,12 +73,15 @@ case $arg in
-O[23s] |\
-pedantic |\
-pedantic-errors |\
-pie |\
-pipe |\
-pthread |\
-print-prog-name=* |\
-print-search-dirs |\
-S |\
-shared |\
-shared-gcc |\
-shared-libgcc |\
-static |\
-std=c99 |\
-std=gnu89 |\
@@ -90,6 +98,7 @@ case $arg in
-Werror |\
-Werror-implicit-function-declaration |\
-Wformat* |\
-Winline |\
-Wmissing-declarations |\
-Wmissing-format-attribute |\
-Wmissing-prototypes |\
@@ -110,12 +119,14 @@ case $arg in
-Wno-write-strings |\
-Wparentheses |\
-Wpointer-arith |\
-Wredundant-decls |\
-Wreturn-type |\
-Wshadow |\
-Wsign-compare |\
-Wstrict-aliasing |\
-Wstrict-prototypes |\
-Wswitch |\
-Wtrigraphs |\
-Wunused |\
-Wundef |\
-Wwrite-strings ) transform_pass ;;