summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2004-12-05 09:26:59 +0000
committergrant <grant@pkgsrc.org>2004-12-05 09:26:59 +0000
commit71232b1911b0db60450df920679ab17cb91e8ec8 (patch)
treeb0b2be6d18c0561a76de766182398934fb42ae02 /mk/wrapper
parente221a993ebbe0f95c646e51ae557b0b0d92ed301 (diff)
downloadpkgsrc-71232b1911b0db60450df920679ab17cb91e8ec8.tar.gz
transform -dynamiclib and -fno-common to the appropriate arguments
for xlc.
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/transform-xlc-cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/mk/wrapper/transform-xlc-cc b/mk/wrapper/transform-xlc-cc
index cfc5c88f63a..ad325072d76 100644
--- a/mk/wrapper/transform-xlc-cc
+++ b/mk/wrapper/transform-xlc-cc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-xlc-cc,v 1.3 2004/12/05 02:47:52 grant Exp $
+# $NetBSD: transform-xlc-cc,v 1.4 2004/12/05 09:26:59 grant Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -49,10 +49,24 @@ case $arg in
msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
addtocache=yes
;;
+# 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"
+ msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
+ addtocache=yes
+ split_arg=yes
+ ;;
+# -qnocommon is the xlc argument to allocate uninitialized globals in
+# the data section.
+-fno-common)
+ arg=-qnocommon
+ addtocache=yes
+ ;;
######################################################################
# Ignore some flags that are unnecessary for XL C.
######################################################################
--pipe|-ansi|-fno-common|-fno-gnu-keywords|-fstrict-prototypes|-no-cpp-precomp|-pedantic)
+-pipe|-ansi|-fno-gnu-keywords|-fstrict-prototypes|-no-cpp-precomp|-pedantic)
arg=
msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
addtocache=yes