From f2e1dffb9905d3d8e993c0727854b66206eee52a Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Wed, 2 Sep 2020 04:28:31 +0000 Subject: [PATCH] Remove unused duplicate global symbols to fix the build against modern compilers which by default place uninitialized global variables in the BSS section of the object file; this inhibits the merging of tentative definitions by the linker and results in the multiple-definition error because the same variable is defined in more than one compilation unit. Reported by: pkg-fallout --- audio/aqualung/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/aqualung/Makefile b/audio/aqualung/Makefile index b27a84e61c17..b4e36232987d 100644 --- a/audio/aqualung/Makefile +++ b/audio/aqualung/Makefile @@ -53,4 +53,10 @@ SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CONFIGURE_ON= --with-sndio=yes SNDIO_CONFIGURE_OFF= --with-sndio=no +post-patch: +# Remove unused duplicate global symbols (-fno-common) + @${REINPLACE_CMD} -E '/^g?char command/d' \ + ${WRKSRC}/src/gui_main.c \ + ${WRKSRC}/src/playlist.c + .include