[Buildroot] [PATCH] package/libmodsecurity: fix build failure on m68k_cf

Arnout Vandecappelle arnout at mind.be
Mon Aug 23 22:25:47 UTC 2021



On 22/08/2021 01:06, Giulio Benetti wrote:
> 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

> 
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
> ---
>  package/libmodsecurity/libmodsecurity.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> index 66e7e522a1..be46eb6e02 100644
> --- a/package/libmodsecurity/libmodsecurity.mk
> +++ b/package/libmodsecurity/libmodsecurity.mk
> @@ -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))
> 


More information about the buildroot mailing list