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"
;;