From 0bdfc801752946a2fa367c531c9469cfafa253ce Mon Sep 17 00:00:00 2001 From: grant Date: Mon, 2 Feb 2004 01:36:14 +0000 Subject: 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. --- mk/buildlink3/sunpro-cc-post-logic | 21 +++++++++++++-------- 1 file 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", not "-Wl,-R". @@ -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 -- cgit v1.2.3