Merge pull request #176351 from trofi/workaround-fno-common-for-darwin.top

darwin.top: add -fcommon workaround
This commit is contained in:
Sergei Trofimovich 2022-06-09 17:13:11 +00:00 committed by GitHub
commit f436bf1145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,9 @@
appleDerivation {
nativeBuildInputs = [ xcbuildHook ];
buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil ];
# Workaround build failure on -fno-common toolchains:
# duplicate symbol '_tsamp' in: main.o top.o
NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = "-lutil";
installPhase = ''
install -D Products/Release/libtop.a $out/lib/libtop.a