Merge pull request #176393 from trofi/workaround-fno-common-for-darwin.dtrace

darwin.dtrace: add -fcommon workaround
This commit is contained in:
Sergei Trofimovich 2022-06-07 21:16:11 +00:00 committed by GitHub
commit 70839a8f13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,9 @@
appleDerivation {
nativeBuildInputs = [ xcbuildHook flex bison fixDarwinDylibNames ];
buildInputs = [ CoreSymbolication darling xnu ];
NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration";
# -fcommon: workaround build failure on -fno-common toolchains:
# duplicate symbol '_kCSRegionMachHeaderName' in: libproc.o dt_module_apple.o
NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon";
NIX_LDFLAGS = "-L./Products/Release";
xcbuildFlags = [ "-target" "dtrace_frameworks" "-target" "dtrace" ];