package/libmodsecurity: disable -fPIC on m68k_cf
authorGiulio Benetti <giulio.benetti@benettiengineering.com>
Sat, 21 Aug 2021 23:06:13 +0000 (01:06 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Mon, 23 Aug 2021 22:24:48 +0000 (00:24 +0200)
This package has -fPIC gcc option set by default but we can't use it on
m68k_cf since it doesn't support it throwing a gcc build failure. So let's
disable it by passing -fno-PIC.

Fixes:
http://autobuild.buildroot.net/results/b92980a563fe7ee331e70f288ce041be0bf29d40/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/libmodsecurity/libmodsecurity.mk

index 66e7e522a1c5a0c8e9fedb67e818627368625b9f..be46eb6e02d5486a4cc9254ddcbd2bc0b2126d99 100644 (file)
@@ -52,4 +52,14 @@ else
 LIBMODSECURITY_CONF_OPTS += --without-maxmind
 endif
 
+LIBMODSECURITY_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+# m68k_cf can't use -fPIC that libmodsecurity forces to use, so we need
+# to disable it to avoid a build failure.
+ifeq ($(BR2_m68k_cf),y)
+LIBMODSECURITY_CXXFLAGS += -fno-PIC
+endif
+
+LIBMODSECURITY_CONF_OPTS += CXXFLAGS="$(LIBMODSECURITY_CXXFLAGS)"
+
 $(eval $(autotools-package))