summaryrefslogtreecommitdiff
path: root/mk/wrapper/transform-xlc-cc
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-12-10 03:14:59 +0000
committerrillig <rillig@pkgsrc.org>2006-12-10 03:14:59 +0000
commitaf345e7eb39e117e5998d44edc94baef25c2e1aa (patch)
tree49299f82ecd09368029410edf56d6337b8416291 /mk/wrapper/transform-xlc-cc
parente89ec495e9bd4c9cc9375de31d0a9cc6870a354c (diff)
downloadpkgsrc-af345e7eb39e117e5998d44edc94baef25c2e1aa.tar.gz
Converted to using the functions from wrapper-subr.sh.
Diffstat (limited to 'mk/wrapper/transform-xlc-cc')
-rw-r--r--mk/wrapper/transform-xlc-cc59
1 files changed, 28 insertions, 31 deletions
diff --git a/mk/wrapper/transform-xlc-cc b/mk/wrapper/transform-xlc-cc
index 27ba4db08ec..ac0dc0f1b58 100644
--- a/mk/wrapper/transform-xlc-cc
+++ b/mk/wrapper/transform-xlc-cc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-xlc-cc,v 1.8 2006/09/17 18:46:00 rillig Exp $
+# $NetBSD: transform-xlc-cc,v 1.9 2006/12/10 03:14:59 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -34,42 +34,39 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+transform_setname "transform-xlc-cc"
+
case $arg in
-######################################################################
-# Leave -Wl, unchanged.
-######################################################################
--Wl,*)
- ;;
-######################################################################
-# XL C doesn't understand many -W* arguments, so just silently ignore
-# them all.
-######################################################################
--W*)
- arg=
- $debug_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- ;;
+
+# Standard options.
+-[cEgOos] |\
+-[DILlU]?* |\
+-O[01] ) transform_pass ;;
+
+-Wl,* ) transform_pass ;;
+
+-W* ) transform_discard_with_warning ;;
+
# xlc uses -qmkshrobj to create shared objects, and we also need to
# tell the linker to use a flat namespace and allow undefined symbols.
--dynamiclib)
- arg="-qmkshrobj -Wl,-flat_namespace -Wl,-undefined -Wl,suppress"
- $debug_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- split_arg=yes
- ;;
+-dynamiclib ) transform_to_and_split "-qmkshrobj -Wl,-flat_namespace -Wl,-undefined -Wl,suppress" ;;
+
# -qnocommon is the xlc argument to allocate uninitialized globals in
# the data section for PIC.
--fno-common|-fPIC)
- arg=-qnocommon
- $debug_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- ;;
+-fPIC |\
+-fno-common ) transform_to "-qnocommon" ;;
+
+
######################################################################
# Ignore some flags that are unnecessary for XL C.
######################################################################
--pipe|-ansi|-fno-gnu-keywords|-fstrict-prototypes|-no-cpp-precomp|-pedantic)
- arg=
- $debug_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- ;;
+-ansi |\
+-fno-gnu-keywords |\
+-fstrict-prototypes |\
+-no-cpp-precomp |\
+-pedantic |\
+-pipe ) transform_discard_with_warning ;;
+
+-* ) transform_pass_with_warning ;;
+
esac