summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorgrant <grant>2004-02-02 01:36:14 +0000
committergrant <grant>2004-02-02 01:36:14 +0000
commit4e4027cec7c43e2e49bc575fab3b668a44f1ca23 (patch)
tree51272797e938c209339178c575c7ea63033554ed /mk/buildlink3
parent0534b16238c2679319f04d468e2c6decca5c9f23 (diff)
downloadpkgsrc-4e4027cec7c43e2e49bc575fab3b668a44f1ca23.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.
Diffstat (limited to 'mk/buildlink3')
-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