]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
make: hopefully fix the modules again for Fedora
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 9 Feb 2018 14:22:47 +0000 (15:22 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 12 Feb 2018 12:32:16 +0000 (13:32 +0100)
- their `cc --version` doesn't start with "gcc"
- modifying CFLAGS at this point doesn't work,
  so we modify BUILD_CFLAGS instead (_vomit_)

platform.mk

index d42c66e4ce6429c442f58ac57052be1dad3705e1..170269ca93b374aa642fa5671bdda3f2e2869caa 100644 (file)
@@ -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 '\<GCC\>' && 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