pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/wrapper The sunpro wrapper needs to distinguish whe...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/567e777cdbe9
branches:  trunk
changeset: 524035:567e777cdbe9
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Jan 17 13:19:47 2007 +0000

description:
The sunpro wrapper needs to distinguish whether cc or CC is called in
some cases.

XXX: There should be more support in the infrastructure for this case.

diffstat:

 mk/wrapper/transform-sunpro-cc |  37 +++++++++++++++++++++++++++++++------
 1 files changed, 31 insertions(+), 6 deletions(-)

diffs (85 lines):

diff -r a5c57284f17e -r 567e777cdbe9 mk/wrapper/transform-sunpro-cc
--- a/mk/wrapper/transform-sunpro-cc    Wed Jan 17 13:19:30 2007 +0000
+++ b/mk/wrapper/transform-sunpro-cc    Wed Jan 17 13:19:47 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: transform-sunpro-cc,v 1.22 2007/01/14 18:56:25 rillig Exp $
+# $NetBSD: transform-sunpro-cc,v 1.23 2007/01/17 13:19:47 rillig Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -53,8 +53,8 @@
 -O*            ) transform_discard_with_warning ;;
 
 # Directories for the runtime library search path are passed via
-# simply "-R<dir>", not "-Wl,-R<dir>".
-# XXX: Why? For me, -Wl,-R works equally well.
+# simply "-R<dir>", not "-Wl,-R<dir>". This is because the C++ compiler
+# does not know about the -W?,* options.
 -Wl,-R*                ) transform_to "${arg#-Wl,}" ;;
 -R*            ) transform_pass ;;
 
@@ -63,13 +63,26 @@
 
 # Solaris' linker exports all dynamic symbols by default when
 # building a shared object.
+-export-dynamic        |\
 -Wl,--export-dynamic |\
 -Wl,-E         ) transform_discard ;;
 
--W[02aclmop],* ) transform_pass ;;
+-W[02aclmop],* ) case ${0##*/} in
+                 cc | gcc) transform_pass ;;
+                 CC | g++ | c++) transform_discard_with_warning ;;
+                 *) echo "ERROR: [transform-sunpro-cc] cmd = $0"; exit 1 ;;
+                 esac ;;
+
+-Wall          |\
+-W             ) case ${0##*/} in
+                 cc | gcc) transform_to "-v" ;;
+                 CC | g++ | c++) transform_to_and_split "+w +w2" ;;
+                 *) echo "ERROR: [transform-sunpro-cc] cmd = $0"; exit 1 ;;
+                 esac ;;
 
 # Ignore options that are probably meant for GCC.
--W*            ) transform_discard_with_warning ;;
+-W*            |\
+-Xc            ) transform_discard_with_warning ;;
 
 -static                ) transform_to "-Bstatic" ;;
 
@@ -78,6 +91,7 @@
 
 -fPIC          |\
 -fpic          ) transform_to "-Kpic" ;;
+-KPIC          ) transform_pass ;;
 
 # SunPro needs -mt -lpthread for POSIX threads.
 -pthread       ) transform_to_and_split "-mt -lpthread" ;;
@@ -89,6 +103,8 @@
 -fast          ) transform_to_and_split "-fast -xnolibmopt" ;;
 
 # Pass through those options that SunPro understands.
+-Bdynamic      |\
+-Bstatic       |\
 -fd            |\
 -features*     |\
 -flags         |\
@@ -101,8 +117,17 @@
 -fsingle       |\
 -fstore                |\
 -ftrap*                |\
+-G             |\
+-h*.so.*       |\
 -mt            |\
--template=*    ) transform_pass ;;
+-template=*    |\
+-xarch=*       |\
+-xcode=*       |\
+-xdepend       |\
+-xstrconst     |\
+-xtarget=*     ) transform_pass ;;
+
+#-xc99         ) transform_to_and_split "-xc99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__" ;;
 
 # Ignore all other -f flags.
 -f*            ) transform_discard_with_warning ;;



Home | Main Index | Thread Index | Old Index