Tue Jun 26 15:48:53 2012 UTC ()
Solaris needs -m32 for ABI=32 too, now that we have compilers which build
64-bit by default.


(jperkin)
diff -r1.120 -r1.121 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.120 -r1.121 pkgsrc/mk/compiler/gcc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/gcc.mk 2012/04/25 16:28:18 1.120
+++ pkgsrc/mk/compiler/gcc.mk 2012/06/26 15:48:53 1.121
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.120 2012/04/25 16:28:18 hans Exp $ 1# $NetBSD: gcc.mk,v 1.121 2012/06/26 15:48:53 jperkin Exp $
2# 2#
3# This is the compiler definition for the GNU Compiler Collection. 3# This is the compiler definition for the GNU Compiler Collection.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# USE_NATIVE_GCC 7# USE_NATIVE_GCC
8# When set to "yes", the native gcc is used, no matter which 8# When set to "yes", the native gcc is used, no matter which
9# compiler version a package requires. 9# compiler version a package requires.
10# 10#
11# USE_PKGSRC_GCC 11# USE_PKGSRC_GCC
12# Force using the appropriate version of GCC from pkgsrc based on 12# Force using the appropriate version of GCC from pkgsrc based on
13# GCC_REQD instead of the native compiler. 13# GCC_REQD instead of the native compiler.
14# 14#
@@ -597,36 +597,27 @@ _GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREF @@ -597,36 +597,27 @@ _GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREF
597_ALIASES.FC= gfortran 597_ALIASES.FC= gfortran
598FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran 598FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
599F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran 599F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
600PKG_FC:= ${_GCC_FC} 600PKG_FC:= ${_GCC_FC}
601PKGSRC_FORTRAN?= gfortran 601PKGSRC_FORTRAN?= gfortran
602.endif 602.endif
603_COMPILER_STRIP_VARS+= ${_GCC_VARS} 603_COMPILER_STRIP_VARS+= ${_GCC_VARS}
604 604
605# Pass the required flags to imake to tell it we're using gcc on Solaris. 605# Pass the required flags to imake to tell it we're using gcc on Solaris.
606.if ${OPSYS} == "SunOS" 606.if ${OPSYS} == "SunOS"
607IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES 607IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
608.endif 608.endif
609 609
610.if ${OPSYS} == "SunOS" 610.if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
611_COMPILER_ABI_FLAG.64= -m64 
612.endif 
613 
614.if ${OPSYS} == "Darwin" 
615_COMPILER_ABI_FLAG.32= -m32 
616_COMPILER_ABI_FLAG.64= -m64 
617.endif 
618 
619.if ${OPSYS} == "Linux" 
620_COMPILER_ABI_FLAG.32= -m32 611_COMPILER_ABI_FLAG.32= -m32
621_COMPILER_ABI_FLAG.64= -m64 612_COMPILER_ABI_FLAG.64= -m64
622.endif 613.endif
623 614
624.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) 615.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
625. if exists(${CCPATH}) 616. if exists(${CCPATH})
626CC_VERSION_STRING!= ${CCPATH} -v 2>&1 617CC_VERSION_STRING!= ${CCPATH} -v 2>&1
627CC_VERSION!= \ 618CC_VERSION!= \
628 if ${CCPATH} -dumpversion > /dev/null 2>&1; then \ 619 if ${CCPATH} -dumpversion > /dev/null 2>&1; then \
629 ${ECHO} "gcc-`${CCPATH} -dumpversion`"; \ 620 ${ECHO} "gcc-`${CCPATH} -dumpversion`"; \
630 else \ 621 else \
631 ${ECHO} "gcc-${_GCC_REQD}"; \ 622 ${ECHO} "gcc-${_GCC_REQD}"; \
632 fi 623 fi