summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2012-03-07 12:55:53 +0000
committerhe <he@pkgsrc.org>2012-03-07 12:55:53 +0000
commit850117f5329f65211ef40a1fb5434ae85cdfe125 (patch)
tree990eb575862f037879b4d8e030ec145a337a0916 /mk/wrapper
parentf343095408d55ba1e86fbd9314486e14b58b0ccc (diff)
downloadpkgsrc-850117f5329f65211ef40a1fb5434ae85cdfe125.tar.gz
Rewrite any -R<dir> into -Wl,-R<dir>. -R is the old form of -Wl,-R,
but our gcc re-orders them so that all -R args come at the front of the "ld" invocation. This messes up the relative search order, and is at least partly responsible for "the pixman problem" experienced on (at least) NetBSD 5.1. This is as close as a general fix as I can think of, and should fix PR#46130, although it possibly doesn't fix every instance of this more general problem.
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/transform-gcc8
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/wrapper/transform-gcc b/mk/wrapper/transform-gcc
index edd81510fc6..5e68d09ebed 100644
--- a/mk/wrapper/transform-gcc
+++ b/mk/wrapper/transform-gcc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-gcc,v 1.25 2012/02/06 13:03:55 bsiegert Exp $
+# $NetBSD: transform-gcc,v 1.26 2012/03/07 12:55:53 he Exp $
#
# This file handles the transformations needed for gcc that can be done
# looking at only one argument at a time.
@@ -132,6 +132,12 @@ case $arg in
-fgnu-runtime |\
-fconstant-string-class=* ) transform_pass ;;
+# Old-style rpath specifier, may come from autoconf's AC_PATH_XTRA.
+# Our gcc re-orders -R args relative to -Wl,-R specifiers (puts -R
+# args at the front of the "ld" invocation), which messes up the relative
+# search order. Fix this by rewriting -R to -Wl,-R.
+-R* ) transform_to "-Wl,$arg" ;;
+
# Other compiler's options that have corresponding GCC options.
-Kpic |\
-kpic |\