summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-09-19 13:08:19 +0000
committerrillig <rillig@pkgsrc.org>2007-09-19 13:08:19 +0000
commit4334ec644af6b3931d041143e7fbb7957b192202 (patch)
tree99489f10b2fca6c657e5204bb14739297bcaab40 /mk
parente446929efd70529c9e5149547576001be5b5c7d5 (diff)
downloadpkgsrc-4334ec644af6b3931d041143e7fbb7957b192202.tar.gz
Fixed incorrect quoting of arguments. This behavior had been unnoticed
for several years now, since the directories in the -I... and -L... options usually don't need quoting. But when the -D... option was processed using the same code, the bug had become visible.
Diffstat (limited to 'mk')
-rw-r--r--mk/wrapper/arg-pp-main6
-rw-r--r--mk/wrapper/arg-source7
2 files changed, 4 insertions, 9 deletions
diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main
index ddfc66d725c..5cedf29f1aa 100644
--- a/mk/wrapper/arg-pp-main
+++ b/mk/wrapper/arg-pp-main
@@ -1,4 +1,4 @@
-# $NetBSD: arg-pp-main,v 1.6 2007/04/09 22:33:26 tron Exp $
+# $NetBSD: arg-pp-main,v 1.7 2007/09/19 13:08:19 rillig Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -97,7 +97,7 @@ case $arg in
-Wl,-[LR])
pop_queue argbuf nextarg
$debug_log $wrapperlog " (arg-pp-main) pop: $nextarg"
- shquote "${nextarg#-Wl,}"; nextarg="$shquoted"
+ nextarg="${nextarg#-Wl,}"
$debug_log $wrapperlog " (arg-pp-main) pre: $arg$nextarg"
prepend_queue argbuf "$arg$nextarg"
argmatch=yes
@@ -105,7 +105,7 @@ case $arg in
-Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath)
pop_queue argbuf nextarg
$debug_log $wrapperlog " (arg-pp-main) pop: $nextarg"
- shquote "${nextarg#-Wl,}"; nextarg="$shquoted"
+ nextarg="${nextarg#-Wl,}"
$debug_log $wrapperlog " (arg-pp-main) pre: $arg,$nextarg"
prepend_queue argbuf "$arg,$nextarg"
argmatch=yes
diff --git a/mk/wrapper/arg-source b/mk/wrapper/arg-source
index bdf254e0f9b..111bb4d63f1 100644
--- a/mk/wrapper/arg-source
+++ b/mk/wrapper/arg-source
@@ -1,4 +1,4 @@
-# $NetBSD: arg-source,v 1.14 2007/09/11 08:33:11 rillig Exp $
+# $NetBSD: arg-source,v 1.15 2007/09/19 13:08:19 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -57,7 +57,6 @@ while $test $# -gt 0; do
case "$nextarg" in
-*) msg_log $wrapperlog "WARNING: [arg-source] An $arg option must not be followed by another option, $nextarg." ;;
esac
- shquote "$nextarg"; nextarg="$shquoted"
append_queue argbuf "$arg$nextarg"
$debug_log $wrapperlog " (arg-source) push: $arg$nextarg"
;;
@@ -103,7 +102,6 @@ while $test $# -gt 0; do
save_IFS="${IFS}"; IFS=":"
for dir in $list; do
IFS="${save_IFS}"
- shquote "$dir"; dir="$shquoted"
append_queue argbuf "$R$dir"
$debug_log $wrapperlog " (arg-source) push: $R$dir"
done
@@ -128,14 +126,12 @@ while $test $# -gt 0; do
save_IFS="${IFS}"; IFS=":"
for dir in $nextarg; do
IFS="${save_IFS}"
- shquote "$dir"; dir="$shquoted"
append_queue argbuf "$R$dir"
$debug_log $wrapperlog " (arg-source) push: $R$dir"
done
IFS="${save_IFS}"
;;
*)
- shquote "$nextarg"; nextarg="$shquoted"
append_queue argbuf "$R$nextarg"
$debug_log $wrapperlog " (arg-source) push: $R$nextarg"
;;
@@ -153,7 +149,6 @@ while $test $# -gt 0; do
$debug_log $wrapperlog " (arg-source) push: $nextarg"
;;
*)
- shquote "$nextarg"; nextarg="$shquoted"
append_queue argbuf "-Wl,$nextarg"
$debug_log $wrapperlog " (arg-source) push: -Wl,$nextarg"
;;