From b04d79075da6b6bd0d19ad9de2b31d11b4db813a Mon Sep 17 00:00:00 2001 From: jperkin Date: Thu, 15 Jul 2021 21:10:53 +0000 Subject: [PATCH] cmake: Don't add additional -arch flags on Darwin. Fixes building on arm64 in an x86_64 chroot where it would append "-arch x86_64" and then fail to link. schmonz verified that this change doesn't seem to affect non-chroot native builds. --- devel/cmake/distinfo | 3 ++- .../patches/patch-Source_cmLocalGenerator.cxx | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 devel/cmake/patches/patch-Source_cmLocalGenerator.cxx diff --git a/devel/cmake/distinfo b/devel/cmake/distinfo index 5a6a42d060e2..02fca9cceab1 100644 --- a/devel/cmake/distinfo +++ b/devel/cmake/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.180 2021/06/24 09:30:55 adam Exp $ +$NetBSD: distinfo,v 1.181 2021/07/15 21:10:53 jperkin Exp $ SHA1 (cmake-3.20.5.tar.gz) = 42b43d0a5d82285384db8d17b5bd5dd9cc3fc6a2 RMD160 (cmake-3.20.5.tar.gz) = 8737df0ceeb6d3d8ec94a907d7fcf475a69feffc @@ -19,5 +19,6 @@ SHA1 (patch-Source_Checks_Curses_CMakeLists.txt) = 37d95c6162cc1f4c0e47b537ac820 SHA1 (patch-Source_Checks_Curses_CheckCurses.c) = c86cae48f7b39fb735eba4788d4e9d595b2ccf3b SHA1 (patch-Source_Checks_cm__cxx17__check.cpp) = d5e2708df6fcda078b1b5ea59264c663d2633ced SHA1 (patch-Source_QtDialog_CMakeLists.txt) = 0858da256bba174694a165d5f910eedb3faa06d5 +SHA1 (patch-Source_cmLocalGenerator.cxx) = 7b41e5837c2dcff54114541920c45258632275b0 SHA1 (patch-Utilities_KWIML_CMakeLists.txt) = e4bdf9fc58757e87bf7e3e3e195839eededbc796 SHA1 (patch-bootstrap) = e34f5b888790e766338086b8c3680be79b71ef18 diff --git a/devel/cmake/patches/patch-Source_cmLocalGenerator.cxx b/devel/cmake/patches/patch-Source_cmLocalGenerator.cxx new file mode 100644 index 000000000000..15ca82b5b039 --- /dev/null +++ b/devel/cmake/patches/patch-Source_cmLocalGenerator.cxx @@ -0,0 +1,15 @@ +$NetBSD: patch-Source_cmLocalGenerator.cxx,v 1.1 2021/07/15 21:10:53 jperkin Exp $ + +Disable additional -arch flags on macOS. + +--- Source/cmLocalGenerator.cxx.orig 2021-06-21 15:23:19.000000000 +0000 ++++ Source/cmLocalGenerator.cxx +@@ -97,7 +97,7 @@ cmLocalGenerator::cmLocalGenerator(cmGlo + + this->AliasTargets = makefile->GetAliasTargets(); + +- this->EmitUniversalBinaryFlags = true; ++ this->EmitUniversalBinaryFlags = false; + this->BackwardsCompatibility = 0; + this->BackwardsCompatibilityFinal = false; +