diff mbox

[1/1] cjson: fix build for toolchains without ssp

Message ID 1488320767-63856-1-git-send-email-fontaine.fabrice@gmail.com
State Accepted
Headers show

Commit Message

Fabrice Fontaine Feb. 28, 2017, 10:26 p.m. UTC
Set ENABLE_CUSTOM_COMPILER_FLAGS to OFF to disable custom flags, in
particular -fstack-protector-strong which depends on
BR2_TOOLCHAIN_HAS_SSP

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/cjson/cjson.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Feb. 28, 2017, 10:40 p.m. UTC | #1
Hello,

On Tue, 28 Feb 2017 23:26:07 +0100, Fabrice Fontaine wrote:
> Set ENABLE_CUSTOM_COMPILER_FLAGS to OFF to disable custom flags, in
> particular -fstack-protector-strong which depends on
> BR2_TOOLCHAIN_HAS_SSP
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Is this necessary for the 1.3.2 bump to work fine, or is it a separate
build fix that applies to the version of cjson currently packaged in
Buildroot?

Thanks,

Thomas
Thomas Petazzoni March 1, 2017, 8:05 a.m. UTC | #2
Hello,

Please keep the mailing list in CC, thanks!

On Wed, 1 Mar 2017 07:04:53 +0100, Fabrice Fontaine wrote:

> This is a separate build fix that applies to the version of cjson
> currently packaged in buildroot. I found this issue on 1.3.2 and was
> able to reproduce it on 1.3.0.

Ah, ok, it's probably new in 1.3.0, which we only have in the next
branch. Our master branch, and the 2017.02 release, only have 1.2.1,
which I guess doesn't have this issue since the autobuilders didn't
catch it.

Thanks,

Thomas
Fabrice Fontaine March 1, 2017, 11:47 a.m. UTC | #3
2017-03-01 9:05 GMT+01:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:

> Hello,
>
> Please keep the mailing list in CC, thanks!
>
> On Wed, 1 Mar 2017 07:04:53 +0100, Fabrice Fontaine wrote:
>
> > This is a separate build fix that applies to the version of cjson
> > currently packaged in buildroot. I found this issue on 1.3.2 and was
> > able to reproduce it on 1.3.0.
>
> Ah, ok, it's probably new in 1.3.0, which we only have in the next
> branch. Our master branch, and the 2017.02 release, only have 1.2.1,
> which I guess doesn't have this issue since the autobuilders didn't
> catch it.
>
Yes, -fstack-protector-strong was introduced in 1.3.0.

>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Thomas Petazzoni March 1, 2017, 8:49 p.m. UTC | #4
Hello,

On Tue, 28 Feb 2017 23:26:07 +0100, Fabrice Fontaine wrote:
> Set ENABLE_CUSTOM_COMPILER_FLAGS to OFF to disable custom flags, in
> particular -fstack-protector-strong which depends on
> BR2_TOOLCHAIN_HAS_SSP
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/cjson/cjson.mk | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied to master, thanks. Peter: even though this is a build fix, this
one is not needed on the LTS branch, because it is only needed after
the 1.3.0 bump, which was done post 2017.02.

Best regards,

Thomas
Peter Korsgaard March 2, 2017, 7:14 a.m. UTC | #5
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Tue, 28 Feb 2017 23:26:07 +0100, Fabrice Fontaine wrote:
 >> Set ENABLE_CUSTOM_COMPILER_FLAGS to OFF to disable custom flags, in
 >> particular -fstack-protector-strong which depends on
 >> BR2_TOOLCHAIN_HAS_SSP
 >> 
 >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 >> ---
 >> package/cjson/cjson.mk | 5 ++++-
 >> 1 file changed, 4 insertions(+), 1 deletion(-)

 > Applied to master, thanks. Peter: even though this is a build fix, this
 > one is not needed on the LTS branch, because it is only needed after
 > the 1.3.0 bump, which was done post 2017.02.

Ok, thanks for the heads up!
diff mbox

Patch

diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk
index aea9578..c554654 100644
--- a/package/cjson/cjson.mk
+++ b/package/cjson/cjson.mk
@@ -9,7 +9,10 @@  CJSON_SITE = $(call github,DaveGamble,cjson,$(CJSON_VERSION))
 CJSON_INSTALL_STAGING = YES
 CJSON_LICENSE = MIT
 CJSON_LICENSE_FILES = LICENSE
+# Set ENABLE_CUSTOM_COMPILER_FLAGS to OFF in particular to disable
+# -fstack-protector-strong which depends on BR2_TOOLCHAIN_HAS_SSP
 CJSON_CONF_OPTS += \
-	-DENABLE_CJSON_TEST=OFF
+	-DENABLE_CJSON_TEST=OFF \
+	-DENABLE_CUSTOM_COMPILER_FLAGS=OFF
 
 $(eval $(cmake-package))