see https://github.com/facebook/zstd/pull/4056 see https://trac.macports.org/ticket/70130 see https://gitlab.kitware.com/cmake/cmake/-/issues/26024 --- build/cmake/CMakeModules/AddZstdCompilationFlags.cmake.orig 2024-03-21 15:05:51.000000000 -0700 +++ build/cmake/CMakeModules/AddZstdCompilationFlags.cmake 2024-06-02 06:18:44.000000000 -0700 @@ -76,7 +76,7 @@ endif () # Add noexecstack flags # LDFLAGS - EnableCompilerFlag("-z noexecstack" false false true) + EnableCompilerFlag("LINKER:SHELL:-z noexecstack" false false true) # CFLAGS & CXXFLAGS EnableCompilerFlag("-Qunused-arguments" true true false) EnableCompilerFlag("-Wa,--noexecstack" true true false)