diff options
author | jlam <jlam@pkgsrc.org> | 2004-09-23 13:49:21 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-09-23 13:49:21 +0000 |
commit | 8c07809f8142e82c778b2c2dab30dfcb70948808 (patch) | |
tree | 5cb15fa30d41bd6c231edfcd5fed1a4e7811a749 /mk/compiler/gcc.mk | |
parent | 3345412c7d7c240f288455404804301b726cb3b1 (diff) | |
download | pkgsrc-8c07809f8142e82c778b2c2dab30dfcb70948808.tar.gz |
Support the ABI flags on MIPS platforms.
Diffstat (limited to 'mk/compiler/gcc.mk')
-rw-r--r-- | mk/compiler/gcc.mk | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index f9a44bf31dd..5979c5a06f8 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.70 2004/08/27 06:29:09 jlam Exp $ +# $NetBSD: gcc.mk,v 1.71 2004/09/23 13:49:21 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -132,15 +132,6 @@ _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} CFLAGS+= -Wno-import .endif -# Some platforms (such as IRIX) may support different ABIs. Set the CFLAGS -# accordingly. - -.if defined(ABI) -MABIFLAG= -mabi=${ABI:C/^32$/n&/} -CFLAGS+= ${MABIFLAG} -LDFLAGS+= ${MABIFLAG} -.endif - .if !empty(_NEED_GCC2:M[yY][eE][sS]) # # We require gcc-2.x in the lang/gcc directory. @@ -250,6 +241,17 @@ _LINKER_RPATH_FLAG= -R # GCC passes rpath directives to the linker using "-Wl,-R". _COMPILER_RPATH_FLAG= -Wl,${_LINKER_RPATH_FLAG} +.if !empty(MACHINE_ARCH:Mmips*) +_COMPILER_ABI_FLAG.32= -mabi=n32 # ABI == "32" == "n32" +_COMPILER_ABI_FLAG.n32= -mabi=n32 +_COMPILER_ABI_FLAG.o32= -mabi=32 +_COMPILER_ABI_FLAG.64= -mabi=64 + +. if defined(ABI) && !empty(ABI) +MABIFLAG= ${_COMPILER_ABI_FLAG.${ABI}} +. endif +.endif + .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) # # Ensure that the correct rpath is passed to the linker if we need to |