Sat Mar 14 10:00:38 2020 UTC ()
mk: default to gfortran on aarch64, there's no g95 for aarch64


(nia)
diff -r1.21 -r1.22 pkgsrc/mk/compiler/clang.mk
diff -r1.208 -r1.209 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.21 -r1.22 pkgsrc/mk/compiler/clang.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/clang.mk 2019/07/15 16:06:19 1.21
+++ pkgsrc/mk/compiler/clang.mk 2020/03/14 10:00:37 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: clang.mk,v 1.21 2019/07/15 16:06:19 ryoon Exp $ 1# $NetBSD: clang.mk,v 1.22 2020/03/14 10:00:37 nia Exp $
2# 2#
3# This is the compiler definition for the clang compiler. 3# This is the compiler definition for the clang compiler.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# CLANGBASE 7# CLANGBASE
8# The base directory where the compiler is installed. 8# The base directory where the compiler is installed.
9# 9#
10 10
11.if !defined(COMPILER_CLANG_MK) 11.if !defined(COMPILER_CLANG_MK)
12COMPILER_CLANG_MK= defined 12COMPILER_CLANG_MK= defined
13 13
14# Add the dependency on clang 14# Add the dependency on clang
@@ -74,27 +74,31 @@ _CLANG_LDFLAGS+= ${_RELRO_LDFLAGS} @@ -74,27 +74,31 @@ _CLANG_LDFLAGS+= ${_RELRO_LDFLAGS}
74CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS} 74CWRAPPERS_APPEND.ld+= ${_RELRO_LDFLAGS}
75.endif 75.endif
76 76
77LDFLAGS+= ${_CLANG_LDFLAGS} 77LDFLAGS+= ${_CLANG_LDFLAGS}
78 78
79# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the 79# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
80# ones requested by the package in USE_LANGUAGES. 80# ones requested by the package in USE_LANGUAGES.
81# 81#
82_LANGUAGES.clang= # empty 82_LANGUAGES.clang= # empty
83.for _lang_ in ${USE_LANGUAGES} 83.for _lang_ in ${USE_LANGUAGES}
84_LANGUAGES.clang+= ${LANGUAGES.clang:M${_lang_}} 84_LANGUAGES.clang+= ${LANGUAGES.clang:M${_lang_}}
85.endfor 85.endfor
86 86
 87.if !empty(MACHINE_ARCH:Maarch64*)
 88PKGSRC_FORTRAN?=gfortran
 89.else
87PKGSRC_FORTRAN?=g95 90PKGSRC_FORTRAN?=g95
 91.endif
88 92
89.if !empty(PKGSRC_FORTRAN) && (!empty(USE_LANGUAGES:Mfortran) || !empty(USE_LANGUAGES:Mfortran77)) 93.if !empty(PKGSRC_FORTRAN) && (!empty(USE_LANGUAGES:Mfortran) || !empty(USE_LANGUAGES:Mfortran77))
90. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk" 94. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"
91.endif 95.endif
92 96
93_WRAP_EXTRA_ARGS.CC+= -Qunused-arguments 97_WRAP_EXTRA_ARGS.CC+= -Qunused-arguments
94CWRAPPERS_APPEND.cc+= -Qunused-arguments 98CWRAPPERS_APPEND.cc+= -Qunused-arguments
95_WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments 99_WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments
96CWRAPPERS_APPEND.cxx+= -Qunused-arguments 100CWRAPPERS_APPEND.cxx+= -Qunused-arguments
97 101
98.for _version_ in ${_CXX_STD_VERSIONS} 102.for _version_ in ${_CXX_STD_VERSIONS}
99_CXX_STD_FLAG.${_version_}?= -std=${_version_} 103_CXX_STD_FLAG.${_version_}?= -std=${_version_}
100.endfor 104.endfor

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

--- pkgsrc/mk/compiler/gcc.mk 2019/09/19 06:46:59 1.208
+++ pkgsrc/mk/compiler/gcc.mk 2020/03/14 10:00:37 1.209
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.208 2019/09/19 06:46:59 rillig Exp $ 1# $NetBSD: gcc.mk,v 1.209 2020/03/14 10:00:37 nia 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# GCCBASE 7# GCCBASE
8# If using a native GCC and the compiler is not in $PATH then 8# If using a native GCC and the compiler is not in $PATH then
9# this should be set to the base installation directory. 9# this should be set to the base installation directory.
10# 10#
11# USE_NATIVE_GCC 11# USE_NATIVE_GCC
12# When set to "yes", the native gcc is used, no matter which 12# When set to "yes", the native gcc is used, no matter which
13# compiler version a package requires. 13# compiler version a package requires.
14# 14#
@@ -1039,27 +1039,31 @@ ${_GCC_${_var_}}: @@ -1039,27 +1039,31 @@ ${_GCC_${_var_}}:
1039. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} 1039. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
1040 ${RUN} \ 1040 ${RUN} \
1041 if [ ! -x "${_alias_}" ]; then \ 1041 if [ ! -x "${_alias_}" ]; then \
1042 ${LN} -f -s ${.TARGET:T} ${_alias_}; \ 1042 ${LN} -f -s ${.TARGET:T} ${_alias_}; \
1043 fi 1043 fi
1044. endfor 1044. endfor
1045. endif 1045. endif
1046.endfor 1046.endfor
1047 1047
1048# On systems without a Fortran compiler, pull one in if needed. 1048# On systems without a Fortran compiler, pull one in if needed.
1049# The default is g95 as it supports a modern dialect, but it can 1049# The default is g95 as it supports a modern dialect, but it can
1050# be overridden in mk.conf to use only f2c. 1050# be overridden in mk.conf to use only f2c.
1051# 1051#
 1052.if !empty(MACHINE_ARCH:Maarch64*)
 1053PKGSRC_FORTRAN?=gfortran
 1054.else
1052PKGSRC_FORTRAN?=g95 1055PKGSRC_FORTRAN?=g95
 1056.endif
1053 1057
1054_GCC_NEEDS_A_FORTRAN= no 1058_GCC_NEEDS_A_FORTRAN= no
1055.if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !exists(${FCPATH}) 1059.if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !exists(${FCPATH})
1056_GCC_NEEDS_A_FORTRAN= yes 1060_GCC_NEEDS_A_FORTRAN= yes
1057.else 1061.else
1058. for _pattern_ in 0.* 1.[0-4] 1.[0-4].* 1062. for _pattern_ in 0.* 1.[0-4] 1.[0-4].*
1059. if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*) 1063. if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*)
1060_GCC_NEEDS_A_FORTRAN= yes 1064_GCC_NEEDS_A_FORTRAN= yes
1061. endif 1065. endif
1062. endfor 1066. endfor
1063.endif 1067.endif
1064.if !empty(_GCC_NEEDS_A_FORTRAN:M[yY][eE][sS]) 1068.if !empty(_GCC_NEEDS_A_FORTRAN:M[yY][eE][sS])
1065. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk" 1069. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"