Skip to contentSkip to conversation

package/libmodsecurity: fix build failure on m68k_cf

PATCH Applied Giulio Benetti 3 participants 4 messages Aug 21, 2021 – Sep 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libmodsecurity: fix build failure 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/

---
 package/libmodsecurity/libmodsecurity.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/libmodsecurity/libmodsecurity.mk +10 -0
index 66e7e522a1..be46eb6e02 100644
@@ -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))
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#1 lore raw
Quoted 6 lines · Giulio Benetti

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/

Applied to master, thanks.

I just changed the subject line from "fix" to "disable -fPIC". Most changes are
fixes, so that's obvious, and "disable -fPIC" is given a lot more information in few words.

Regards,
Arnout

Quoted 16 lines
---
 package/libmodsecurity/libmodsecurity.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/libmodsecurity/libmodsecurity.mk +1 -0
index 66e7e522a1..be46eb6e02 100644
@@ -52,4 +52,14 @@ else
 LIBMODSECURITY_CONF_OPTS += --without-maxmind
 endif
 
+LIBMODSECURITY_CXXFLAGS = $(TARGET_CXXFLAGS)

package/libmodsecurity/libmodsecurity.mk else · line 65

Quoted 10 lines
package/libmodsecurity/libmodsecurity.mk +9 -0
+
+# 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))

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw
Quoted 7 lines · Arnout Vandecappelle
Quoted 4 lines · Giulio Benetti

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.

Quoted 8 lines
Quoted 2 lines

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

Applied to master, thanks.

I just changed the subject line from "fix" to "disable -fPIC". Most changes are
fixes, so that's obvious, and "disable -fPIC" is given a lot more information in few words.

Ah yes, thank you. This almost sent me to nut, because it seemed a gcc bug instead it was this and I've written commit log too fast!

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 17 lines

Regards,
Arnout

Quoted 14 lines
---
  package/libmodsecurity/libmodsecurity.mk | 10 ++++++++++
  1 file changed, 10 insertions(+)
package/libmodsecurity/libmodsecurity.mk +0 -0
index 66e7e522a1..be46eb6e02 100644
@@ -52,4 +52,14 @@ else
  LIBMODSECURITY_CONF_OPTS += --without-maxmind
  endif
 
Quoted 12 lines

package/libmodsecurity/libmodsecurity.mk else · line 65

Quoted 12 lines
package/libmodsecurity/libmodsecurity.mk +10 -0
+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))

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw
In reply to Giulio Benetti
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

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/

Committed to 2021.02.x and 2021.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot