darwin.dtrace: add -fcommon workaround

Workaround build failure on -fno-common toolchains like upstream
clang-11. Otherwise build fails as:

    duplicate symbol '_kCSRegionMachHeaderName' in: libproc.o dt_module_apple.o
This commit is contained in:
Sergei Trofimovich 2022-06-05 13:49:31 +01:00
parent 88e0f07bd6
commit d3805f8df5

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" ];