pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/wrapper Converted to use the new transform_* functi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/61c2e74c975f
branches:  trunk
changeset: 522007:61c2e74c975f
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 30 11:51:39 2006 +0000

description:
Converted to use the new transform_* functions from wrapper-subr.sh.

diffstat:

 mk/wrapper/transform-aix-cc |  32 +++++++++++++++++-----------
 mk/wrapper/transform-ccc-cc |  49 +++++++++++++++++++++-----------------------
 2 files changed, 42 insertions(+), 39 deletions(-)

diffs (106 lines):

diff -r bd47d57b6607 -r 61c2e74c975f mk/wrapper/transform-aix-cc
--- a/mk/wrapper/transform-aix-cc       Thu Nov 30 11:48:25 2006 +0000
+++ b/mk/wrapper/transform-aix-cc       Thu Nov 30 11:51:39 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: transform-aix-cc,v 1.3 2006/09/17 18:46:00 rillig Exp $
+# $NetBSD: transform-aix-cc,v 1.4 2006/11/30 11:51:39 rillig Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -34,19 +34,25 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-# prepend -Wl, to linker arguments commonly passed to the compiler.
+transform_setname "transform-aix-cc"
+
 case $arg in
--H[0-9]*|-T[0-9]*|-b*)
-       arg=-Wl,$arg
-       $debug_log $wrapperlog "   (transform-aix-cc) to: $arg"
-       addtocache=yes
-       ;;
+
+# Standard options.
+-[cEgOo]       |\
+-[DILlU]?*     |\
+-O[01]         ) transform_pass ;;
+
+# prepend -Wl, to linker arguments commonly passed to the compiler.
+-b*            |\
+-H[0-9]*       |\
+-T[0-9]*       ) transform_to "-Wl,$arg" ;;
+
 # AIX ld(1) uses -G to create shared libraries, and we must make sure
 # the runtime linker is used.
--shared)
-        arg="-Wl,-G -Wl,-brtl"
-        $debug_log $wrapperlog "   (transform-aix-cc) to: $arg"
-        addtocache=yes
-        split_arg=yes
-        ;;
+-shared                ) transform_to_and_split "-Wl,-G -Wl,-brtl" ;;
+
+# Unknown options.
+-*             ) transform_pass_with_warning ;;
+
 esac
diff -r bd47d57b6607 -r 61c2e74c975f mk/wrapper/transform-ccc-cc
--- a/mk/wrapper/transform-ccc-cc       Thu Nov 30 11:48:25 2006 +0000
+++ b/mk/wrapper/transform-ccc-cc       Thu Nov 30 11:51:39 2006 +0000
@@ -1,32 +1,29 @@
-# $NetBSD: transform-ccc-cc,v 1.3 2006/09/17 18:46:00 rillig Exp $
+# $NetBSD: transform-ccc-cc,v 1.4 2006/11/30 11:58:55 rillig Exp $
 #
 
+transform_setname "transform-ccc-cc"
+
 case $arg in
-######################################################################
+
+# Standard options (except -g, which is handled later).
+-[cEOo]                |\
+-[DILlU]?*     |\
+-O[01]         ) transform_pass ;;
+
+# XXX: What's the benefit of -g3 over -g?
+-g             ) transform_to "-g3" ;;
+
 # Directories for the runtime library search path are passed via
 # "-Wl,-rpath,<dir>", not "-Wl,-R<dir>".
-######################################################################
--Wl,-R*)
-       arg="-Wl,-rpath,${arg#-Wl,-R}"
-       $debug_log $wrapperlog "   (transform-ccc-cc) to: $arg"
-       addtocache=yes
-       ;;
--W[LlSc],*)
-       addtocache=yes
-       ;;
--W*)
-       arg=
-       $debug_log $wrapperlog "   (transform-ccc-cc) to: $arg"
-       addtocache=yes
-       ;;
--mieee)
-       arg="-ieee"
-       $debug_log $wrapperlog "        (transform-ccc-cc) to: $arg"
-       addtocache=yes
-       ;;
--g)
-       arg="-g3"
-       $debug_log $wrapperlog "   (transform-ccc-cc) to: $arg"
-       addtocache=yes
-       ;;
+-Wl,-R*                ) transform_to "-Wl,-rpath,${arg#-Wl,-R}" ;;
+
+-W[LlSc],*     ) transform_pass ;;
+
+# Ignore options that are likely to be GCC warnings.
+-W*            ) transform_discard_with_warning ;;
+
+-mieee         ) transform_to "-ieee" ;;
+
+-*             ) transform_pass_with_warning ;;
+
 esac



Home | Main Index | Thread Index | Old Index