summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2004-02-02 01:36:14 +0000
committergrant <grant@pkgsrc.org>2004-02-02 01:36:14 +0000
commit0bdfc801752946a2fa367c531c9469cfafa253ce (patch)
tree51272797e938c209339178c575c7ea63033554ed
parent62278b632af1bb490a629d1e379e5b73fccf4c88 (diff)
downloadpkgsrc-0bdfc801752946a2fa367c531c9469cfafa253ce.tar.gz
transform -f{pic,PIC} -> -Kpic and -shared -> -G to fix building of
packages which pass these gcc-specific flags. also ignore -Werror; if a package passes -Werror, it's expecting that the compiler is gcc, which in this case it is not. SunPro often emits warnings on code which gcc doesn't, so transforming this flag to -errwarn is counterproductive.
-rw-r--r--mk/buildlink3/sunpro-cc-post-logic21
1 files changed, 13 insertions, 8 deletions
diff --git a/mk/buildlink3/sunpro-cc-post-logic b/mk/buildlink3/sunpro-cc-post-logic
index 1b9d53ba470..22ce4cd1d58 100644
--- a/mk/buildlink3/sunpro-cc-post-logic
+++ b/mk/buildlink3/sunpro-cc-post-logic
@@ -1,4 +1,4 @@
-# $NetBSD: sunpro-cc-post-logic,v 1.3 2004/01/06 08:48:29 jlam Exp $
+# $NetBSD: sunpro-cc-post-logic,v 1.4 2004/02/02 01:36:14 grant Exp $
#
# Silently accept some GCC compiler arguments by silently converting
# them to the SunPro compiler equivalents. This makes the SunPro
@@ -21,13 +21,6 @@ case $arg in
arg=
addtoprivatecache=yes
;;
--Werror)
- # "-errwarn" is the right way to convince the SunPro compiler
- # to stop on compilation warnings.
- #
- arg="-errwarn"
- addtoprivatecache=yes
- ;;
-Wl,-R*)
# Directories for the runtime library search path are passed
# via simply "-R<dir>", not "-Wl,-R<dir>".
@@ -42,4 +35,16 @@ case $arg in
arg=
addtoprivatecache=yes
;;
+-f[Pp][Ii][Cc])
+ # SunPro uses -Kpic to create position indepedent code.
+ #
+ arg=-Kpic
+ addtoprivatecache=yes
+ ;;
+-shared)
+ # Solaris' linker uses -G to create shared objects.
+ #
+ arg=-G
+ addtoprivatecache=yes
+ ;;
esac