From 783b54dfe2aa758555075ef2df14f851a33fbbba Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 31 Aug 2024 02:40:41 +0300 Subject: [PATCH] linux: add -Wl,--no-undefined shared object link flag Helps to avoid stupid situation where something was referenced but wasn't added in the build. --- linux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index df65701c3..fefa963dc 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -54,9 +54,9 @@ endif SHLIBEXT=so SHLIBCFLAGS= ifeq "$(CFG)" "release" - SHLIBLDFLAGS="-shared -Wl,-Map,$@_map.txt" + SHLIBLDFLAGS="-shared -Wl,-Map,$@_map.txt -Wl,--no-undefined" else - SHLIBLDFLAGS="-shared -gdwarf-2 -g2 -Wl,-Map,$@_map.txt" + SHLIBLDFLAGS="-shared -gdwarf-2 -g2 -Wl,-Map,$@_map.txt -Wl,--no-undefined" endif AR=ar