pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk don't hardcode the -DHasGcc2... flags to imake, pas...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ac4e8b0dbbc4
branches:  trunk
changeset: 462727:ac4e8b0dbbc4
user:      grant <grant%pkgsrc.org@localhost>
date:      Sat Oct 11 02:44:17 2003 +0000

description:
don't hardcode the -DHasGcc2... flags to imake, pass them only if
we're actually using gcc on Solaris.

fixes building of imake PIC code when the compiler is not gcc.

diffstat:

 mk/bsd.pkg.defaults.mk |  17 +++++++++--------
 mk/compiler.mk         |   9 ++++++++-
 mk/defs.SunOS.mk       |   4 ++--
 3 files changed, 19 insertions(+), 11 deletions(-)

diffs (78 lines):

diff -r 6155af4ee6b8 -r ac4e8b0dbbc4 mk/bsd.pkg.defaults.mk
--- a/mk/bsd.pkg.defaults.mk    Sat Oct 11 02:39:24 2003 +0000
+++ b/mk/bsd.pkg.defaults.mk    Sat Oct 11 02:44:17 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.186 2003/09/20 16:56:10 salo Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.187 2003/10/11 02:44:17 grant Exp $
 #
 
 # A file providing defaults for pkgsrc and the packages collection.
@@ -409,11 +409,11 @@
 # correct commands.
 # Possible: any valid flags
 # Default:
-#  for SunOS:
-#          -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
+#  for Solaris with gcc:
+#      -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
 #  for IRIX:
-#          -DMakeCmd=${PREFIX}/bin/bmake -DProjectRoot=${X11BASE} \
-#          -DManUsr=${PREFIX}
+#      -DMakeCmd=${PREFIX}/bin/bmake -DProjectRoot=${X11BASE} \
+#      -DManUsr=${PREFIX}
 .if ${OPSYS} == "IRIX"
 #IMAKEOPTS?=   -DMakeCmd=${PREFIX}/bin/bmake -DProjectRoot=${X11BASE} \
 #               -DManUsr=${PREFIX}
@@ -428,9 +428,10 @@
 # you may also wish to add ISA specific flags, such as "-DSgiISA32=4" if
 # you are compiling for mips4.
 .elif ${OPSYS} == "SunOS"
-#IMAKEOPTS?=   -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
-# To use Sun ONE Studio (formerly known as WorkShop and Forte) compliers
-# set IMAKEOPTS to the empty string.
+# The flags required by imake with gcc on Solaris are automatically
+# added if gcc is being used. Though it should not be needed, you can
+# override this using:
+#IMAKEOPTS+=   -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
 .endif
 
 PRE_ROOT_CMD?= ${TRUE}
diff -r 6155af4ee6b8 -r ac4e8b0dbbc4 mk/compiler.mk
--- a/mk/compiler.mk    Sat Oct 11 02:39:24 2003 +0000
+++ b/mk/compiler.mk    Sat Oct 11 02:44:17 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.17 2003/10/06 11:14:22 grant Exp $
+# $NetBSD: compiler.mk,v 1.18 2003/10/11 02:44:18 grant Exp $
 
 # This Makefile fragment implements handling for supported
 # C/C++/fortran compilers.
@@ -252,4 +252,11 @@
 _COMPILER_LD_FLAG=     -Wl,    # GCC and others
 .endif
 
+# Pass the required flags to imake to tell it we're using gcc on
+# Solaris.
+#
+.if ${OPSYS} == "SunOS" && defined(_CC_IS_GCC)
+IMAKEOPTS+=    -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
+.endif
+
 .endif # COMPILER_MK
diff -r 6155af4ee6b8 -r ac4e8b0dbbc4 mk/defs.SunOS.mk
--- a/mk/defs.SunOS.mk  Sat Oct 11 02:39:24 2003 +0000
+++ b/mk/defs.SunOS.mk  Sat Oct 11 02:44:17 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.SunOS.mk,v 1.69 2003/09/24 07:40:03 grant Exp $
+# $NetBSD: defs.SunOS.mk,v 1.70 2003/10/11 02:44:17 grant Exp $
 #
 # Variable definitions for the SunOS/Solaris operating system.
 
@@ -42,7 +42,7 @@
 HEAD?=         /usr/bin/head
 HOSTNAME_CMD?= /bin/hostname
 ID?=           /usr/xpg4/bin/id
-IMAKE?=                ${X11BASE}/bin/imake -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
+IMAKE?=                ${X11BASE}/bin/imake ${IMAKEOPTS}
 LDCONFIG?=     /usr/bin/true
 LN?=           /usr/bin/ln
 LS?=           /usr/bin/ls



Home | Main Index | Thread Index | Old Index