diff options
author | grant <grant@pkgsrc.org> | 2003-10-11 02:44:17 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-10-11 02:44:17 +0000 |
commit | beb87586beaefa2dbcab767ef3a88a1aeefe4fd1 (patch) | |
tree | 67b17bb421fbddd6abd4cc6a92238547e7f8d8b6 /mk | |
parent | 93835fcfa7badf3d4d6b54565d0430c8c91a1d15 (diff) | |
download | pkgsrc-beb87586beaefa2dbcab767ef3a88a1aeefe4fd1.tar.gz |
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 (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 17 | ||||
-rw-r--r-- | mk/compiler.mk | 9 | ||||
-rw-r--r-- | mk/defs.SunOS.mk | 4 |
3 files changed, 19 insertions, 11 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk index 41d6cf1feb2..a71aed18042 100644 --- a/mk/bsd.pkg.defaults.mk +++ b/mk/bsd.pkg.defaults.mk @@ -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 @@ PATCH_FUZZ_FACTOR?= -F0 # 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 @@ PATCH_FUZZ_FACTOR?= -F0 # 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 --git a/mk/compiler.mk b/mk/compiler.mk index 02e2ace0fc0..418afaab5de 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -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= # SunPro compiler _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 --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk index 956f0519bad..d1ae454eb21 100644 --- a/mk/defs.SunOS.mk +++ b/mk/defs.SunOS.mk @@ -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 @@ GZIP_CMD?= /usr/bin/gzip -nf ${GZIP} 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 |