Merge pull request #173374 from trofi/workaround-fno-common-for-libprom

libprom: add -fcommon workaround
This commit is contained in:
Artturi
2022-05-17 14:35:28 +03:00
committed by GitHub
@@ -43,6 +43,13 @@ let
)
];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: CMakeFiles/prom.dir/src/prom_process_stat.c.o:(.bss+0x0): multiple definition of
# `prom_process_start_time_seconds'; CMakeFiles/prom.dir/src/prom_collector.c.o:(.bss+0x0): first defined here
# Should be fixed in 1.2.0 and later: https://github.com/digitalocean/prometheus-client-c/pull/25
NIX_CFLAGS_COMPILE = "-fcommon";
preConfigure = ''
cd ${subdir}
'';