diff --git a/lang/gcc10/Portfile b/lang/gcc10/Portfile index 773a914a502eb..7b2c662e1b710 100644 --- a/lang/gcc10/Portfile +++ b/lang/gcc10/Portfile @@ -95,8 +95,18 @@ license_noconflict gmp mpfr ppl libmpc zlib set major [lindex [split ${version} .-] 0] +proc gcc_arch {arch} { + switch ${arch} { + arm64 {return aarch64} + ppc64 {return powerpc64} + ppc {return powerpc} + default {return ${arch}} + } +} + platform darwin { - configure.pre_args-append --build=${build_arch}-apple-darwin${os.major} + set gcc_triple [gcc_arch ${build_arch}]-apple-darwin${os.major} + configure.pre_args-append --build=${gcc_triple} } set gcc_configure_langs {c c++ objc obj-c++ lto fortran}