From: Vladimír Čunát Date: Fri, 9 Feb 2018 14:22:47 +0000 (+0100) Subject: make: hopefully fix the modules again for Fedora X-Git-Tag: v2.1.0~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afbb5cd461fc4dc96e4717d7826b7bace4864397;p=thirdparty%2Fknot-resolver.git make: hopefully fix the modules again for Fedora - their `cc --version` doesn't start with "gcc" - modifying CFLAGS at this point doesn't work, so we modify BUILD_CFLAGS instead (_vomit_) --- diff --git a/platform.mk b/platform.mk index d42c66e4c..170269ca9 100644 --- a/platform.mk +++ b/platform.mk @@ -55,9 +55,10 @@ else ifeq ($(UNAME),Linux) LDFLAGS += -ldl endif - ifeq ($(firstword $(shell $(CC) --version)),gcc) - # Otherwise Fedora is making kresd symbols inaccessible for modules? - CFLAGS += -rdynamic + ifeq (GCC,$(shell $(CC) --version | grep -q '\' && echo GCC)) + # Otherwise Fedora is making kresd symbols inaccessible for modules. + # Clang doesn't support this flag, so we hackily detect gcc. + BUILD_CFLAGS += -rdynamic endif endif endif