Parcourir la source

package/libmodsecurity: disable -fPIC on m68k_cf

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>
(cherry picked from commit 2a48a6ee9d6b81c804182ff0ad6e0f7c850f6839)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Giulio Benetti il y a 4 ans
Parent
commit
62f6b53c19
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      package/libmodsecurity/libmodsecurity.mk

+ 10 - 0
package/libmodsecurity/libmodsecurity.mk

@@ -52,4 +52,14 @@ else
 LIBMODSECURITY_CONF_OPTS += --without-maxmind
 LIBMODSECURITY_CONF_OPTS += --without-maxmind
 endif
 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))
 $(eval $(autotools-package))