defaultsetup.conf: Enable security flags+pie by default
PATCH 1/1 defaultsetup.conf: Enable security flags+pie by default
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)
meta/conf/distro/defaultsetup.conf +1 -0
@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.inc TCMODE ?= "default"
Signature · 1 line
2.18.0
Quoted 4 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Should be removed from poky-lsb in that case otherwise gives duplicate inclusion warnings.
Quoted 19 lines
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.inc TCMODE ?= "default"
Quoted 10 lines · Anuj Mittal
Quoted 4 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Should be removed from poky-lsb in that case otherwise gives duplicate inclusion warnings.
yes. after this patch lands we can do that.
Quoted 20 lines
Quoted 19 lines
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.inc TCMODE ?= "default"
Hi Khem,
The comments in security-flags.inc also needs to be modified to remove 'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf) instead of defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be necessary default values to build things out. I don't think security flags is necessary to build things out.
Also, I got a question when I just looked at this file.
Do you think we should adjust CFLAGS and LDFALGS in security_flags.inc instead of the current TARGET_CC_ARCH and TARGET_LDFLAGS? We are naming variables to SECURITY_CFLAGS and SECURITY_LDFLAGS, it seems that they belong to CFLAGS and LDFLAGS naturally. But I'm not sure about it.
Best Regards,
Chen Qi
Quoted 22 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.inc TCMODE ?= "default"
Quoted 11 lines · ChenQi
Hi Khem,
The comments in security-flags.inc also needs to be modified to remove 'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf) instead of defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be necessary default values to build things out. I don't think security flags is necessary to build things out.
this is the default setup, even non-poky users will get consistent experience.
Quoted 4 lines
Also, I got a question when I just looked at this file.
Do you think we should adjust CFLAGS and LDFALGS in security_flags.inc instead of the currentTARGET_CC_ARCHandTARGET_LDFLAGS?
in many cases packages do not honor CFLAGS/LDFLAGS say during configure
We are naming
Quoted 3 lines
variables to
SECURITY_CFLAGSandSECURITY_LDFLAGS, it seems that they belong to CFLAGS and LDFLAGS naturally. But I'm not sure about it.
yes they do, but this makes it easy to override the setting for packages where these options are needed to be overridden or modified.
Quoted 29 lines
Best Regards,
Chen QiQuoted 22 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.inc TCMODE ?= "default"
Quoted 19 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Khem Raj
Sent: den 24 juli 2018 16:12
To: ChenQi <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultQuoted 4 lines · ChenQi
Hi Khem,
The comments in security-flags.inc also needs to be modified to
remove
Quoted 3 lines
'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf) instead
Quoted 8 lines
of
Quoted 4 lines
defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be necessary default values to build things out. I don't think security flags is necessary to build things out.
this is the default setup, even non-poky users will get consistent experience.
I have to agree with Chen here. I think requiring security_flags.inc from defaultsetup.conf is the wrong thing to do. We use security_flags.inc in our setup, and I know how much trouble it has brought. To me, using it should be a distro decision, not something that is enforced by the use of bitbake.
Quoted 4 lines
Quoted 3 lines
Also, I got a question when I just looked at this file.
Do you think we should adjust CFLAGS and LDFALGS in security_flags.inc instead of the currentTARGET_CC_ARCHandTARGET_LDFLAGS?
Quoted 8 lines
in many cases packages do not honor CFLAGS/LDFLAGS say during configure
Quoted 4 lines
We are naming
variables toSECURITY_CFLAGSandSECURITY_LDFLAGS, it seems that they belong to CFLAGS and LDFLAGS naturally. But I'm not sure about it.yes they do, but this makes it easy to override the setting for packages where these options are needed to be overridden or modified.
Actually, with the changes introduced in Pyro, SECURITY_CFLAGS became a mess. Before Pyro, you either set SECURITY_CFLAGS to "${SECURITY_NO_PIE_CFLAGS}" (to disable the use of -fpie), or you set it to the empty string (to disable all security options). With Pyro and later, you instead have to set SECURITY_CFLAGS to "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_NOPIE_CFLAGS}" to make sure -fpie is disabled, or set it to "${SECURITY_NOPIE_CFLAGS}" to disable everything. Alternatively you can set SECURITY_PIE_CFLAGS to "${SECURITY_NOPIE_CFLAGS}" to only disable -fpie.
I have considered to suggest changing the definition of SECURITY_NOPIE_CFLAGS to:
SECURITY_NOPIE_CFLAGS ?= "${@'-no-pie -fno-PIE' if '${GCCPIE}' else ''}"
and then change SECURITY_NO_PIE_CFLAGS to:
SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-strong ${SECURITY_NOPIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
That would better have matched the situation before Pyro, in that one yet again would set SECURITY_CFLAGS to "${SECURITY_NO_PIE_CFLAGS}" to disable -fpie. Unfortunately one would still have to set SECURITY_CFLAGS to "${SECURITY_NOPIE_CFLAGS}" to disable everything.
Quoted 27 lines
Quoted 10 lines
Best Regards,
Chen QiQuoted 5 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Quoted 6 lines
Review
Quoted 6 lines
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/meta/conf/distro/defaultsetup.confQuoted 10 lines
Quoted 10 lines
index
ca2f9178d2..352e279596100644meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.inc
Quoted 1 line
Quoted 1 line
meta/conf/distro/defaultsetup.conf line 7
Quoted 1 line
meta/conf/distro/defaultsetup.conf +0
-0TCMODE ?= "default"
//Peter
Quoted 25 lines · Peter Kjellerstedt
Quoted 25 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Khem Raj
Sent: den 24 juli 2018 16:12
To: ChenQi <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultQuoted 4 lines · ChenQi
Hi Khem,
The comments in security-flags.inc also needs to be modified to
remove
Quoted 3 lines
'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf) instead
of
Quoted 4 lines
defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be necessary default values to build things out. I don't think security flags is necessary to build things out.
Quoted 8 lines
Quoted 2 lines
this is the default setup, even non-poky users will get consistent experience.
I have to agree with Chen here. I think requiring security_flags.inc from defaultsetup.conf is the wrong thing to do. We use security_flags.inc in our setup, and I know how much trouble it has brought. To me, using it should be a distro decision, not something that is enforced by the use of bitbake.
The current approach taken by security_flags.inc is basically to enable every possible option related to security. Some of these options cause trouble and but some are trouble free... and unfortunately up to now we've lumped them all in together.
If we enable security related flags by default it would be better to do so step by step - starting with the smallest and least risky change and (for now) leaving the rest for distros who want/need them.
ie I agree that enabling the current security_flags.inc by default isn't the right approach.
Quoted 73 lines
Quoted 4 lines
Quoted 3 lines
Also, I got a question when I just looked at this file.
Do you think we should adjust CFLAGS and LDFALGS in security_flags.inc instead of the currentTARGET_CC_ARCHandTARGET_LDFLAGS?Quoted 8 lines
in many cases packages do not honor CFLAGS/LDFLAGS say during configure
Quoted 4 lines
We are naming
variables toSECURITY_CFLAGSandSECURITY_LDFLAGS, it seems that they belong to CFLAGS and LDFLAGS naturally. But I'm not sure about it.yes they do, but this makes it easy to override the setting for packages where these options are needed to be overridden or modified.
Actually, with the changes introduced in Pyro,
SECURITY_CFLAGSbecame a mess. Before Pyro, you either setSECURITY_CFLAGSto "${SECURITY_NO_PIE_CFLAGS}" (to disable the use of -fpie), or you set it to the empty string (to disable all security options). With Pyro and later, you instead have to setSECURITY_CFLAGSto "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_NOPIE_CFLAGS}" to make sure -fpie is disabled, or set it to "${SECURITY_NOPIE_CFLAGS}" to disable everything. Alternatively you can setSECURITY_PIE_CFLAGSto "${SECURITY_NOPIE_CFLAGS}" to only disable -fpie.I have considered to suggest changing the definition of
SECURITY_NOPIE_CFLAGSto:
SECURITY_NOPIE_CFLAGS?= "${@'-no-pie -fno-PIE' if '${GCCPIE}' else ''}"and then change
SECURITY_NO_PIE_CFLAGSto:
SECURITY_NO_PIE_CFLAGS?= "-fstack-protector-strong ${SECURITY_NOPIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"That would better have matched the situation before Pyro, in that one yet again would set
SECURITY_CFLAGSto "${SECURITY_NO_PIE_CFLAGS}" to disable -fpie. Unfortunately one would still have to setSECURITY_CFLAGSto "${SECURITY_NOPIE_CFLAGS}" to disable everything.Quoted 27 lines
Quoted 10 lines
Best Regards,
Chen QiQuoted 5 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Quoted 6 lines
Review
Quoted 6 lines
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/meta/conf/distro/defaultsetup.confQuoted 10 lines
Quoted 10 lines
index
ca2f9178d2..352e279596100644meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.incQuoted 1 line
Quoted 1 line
meta/conf/distro/defaultsetup.conf line 7
Quoted 1 line
meta/conf/distro/defaultsetup.conf +0
-0TCMODE ?= "default"//Peter
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 26 lines · Peter Kjellerstedt
Quoted 26 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Khem Raj
Sent: den 24 juli 2018 16:12
To: ChenQi <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultQuoted 4 lines · ChenQi
Hi Khem,
The comments in security-flags.inc also needs to be modified to
remove
Quoted 3 lines
'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf) instead
of
Quoted 4 lines
defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be necessary default values to build things out. I don't think security flags is necessary to build things out.
Quoted 8 lines
Quoted 2 lines
this is the default setup, even non-poky users will get consistent experience.
I have to agree with Chen here. I think requiring security_flags.inc from defaultsetup.conf is the wrong thing to do. We use security_flags.inc in our setup, and I know how much trouble it has brought. To me, using it should be a distro decision, not something that is enforced by the use of bitbake.
Thats fine, I can move this to poky distro settings, using it by default would have
been in sync for all since reference distro is using it would be easier for others when
submitting patches, as a phase 2 I was also thinking of defaulting to hardeing in the toolchain itself
and remove this file completely that would have made it much better, then folks who dont want hardeing could just disable
it in toolchain. but I am fine to leave it a distro decision for now.
Quoted 69 lines
Quoted 5 lines
Quoted 4 lines
Also, I got a question when I just looked at this file.
Do you think we should adjust CFLAGS and LDFALGS in security_flags.inc instead of the currentTARGET_CC_ARCHandTARGET_LDFLAGS?Quoted 8 lines
in many cases packages do not honor CFLAGS/LDFLAGS say during configure
Quoted 4 lines
We are naming
variables toSECURITY_CFLAGSandSECURITY_LDFLAGS, it seems that they belong to CFLAGS and LDFLAGS naturally. But I'm not sure about it.yes they do, but this makes it easy to override the setting for packages where these options are needed to be overridden or modified.
Actually, with the changes introduced in Pyro,
SECURITY_CFLAGSbecame a mess. Before Pyro, you either setSECURITY_CFLAGSto "${SECURITY_NO_PIE_CFLAGS}" (to disable the use of -fpie), or you set it to the empty string (to disable all security options). With Pyro and later, you instead have to setSECURITY_CFLAGSto "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_NOPIE_CFLAGS}" to make sure -fpie is disabled, or set it to "${SECURITY_NOPIE_CFLAGS}" to disable everything. Alternatively you can setSECURITY_PIE_CFLAGSto "${SECURITY_NOPIE_CFLAGS}" to only disable -fpie.I have considered to suggest changing the definition of
SECURITY_NOPIE_CFLAGSto:
SECURITY_NOPIE_CFLAGS?= "${@'-no-pie -fno-PIE' if '${GCCPIE}' else ''}"and then change
SECURITY_NO_PIE_CFLAGSto:
SECURITY_NO_PIE_CFLAGS?= "-fstack-protector-strong ${SECURITY_NOPIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"That would better have matched the situation before Pyro, in that one yet again would set
SECURITY_CFLAGSto "${SECURITY_NO_PIE_CFLAGS}" to disable -fpie. Unfortunately one would still have to setSECURITY_CFLAGSto "${SECURITY_NOPIE_CFLAGS}" to disable everything.Quoted 27 lines
Quoted 10 lines
Best Regards,
Chen QiQuoted 5 lines · Khem Raj
This has been an opt-in for so long, some distributions e.g. poky-lsb uses it by default however, since most of linux distros have started to default to these settings for security enhancements, time has come for OE to make it default too
Quoted 6 lines
Review
Quoted 6 lines
Signed-off-by Khem Raj <[email protected]>--- meta/conf/distro/defaultsetup.conf | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/meta/conf/distro/defaultsetup.confQuoted 10 lines
Quoted 10 lines
index
ca2f9178d2..352e279596100644meta/conf/distro/defaultsetup.conf +1
-0@@ -1,6 +1,7 @@ include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc +require conf/distro/include/security_flags.inc include conf/distro/include/world-broken.incQuoted 1 line
Quoted 1 line
meta/conf/distro/defaultsetup.conf line 7
Quoted 1 line
meta/conf/distro/defaultsetup.conf +0
-0TCMODE ?= "default"//Peter
Quoted 55 lines
-----Original Message-----
From: Khem Raj <[email protected]>
Sent: den 27 juli 2018 23:27
To: Peter Kjellerstedt <[email protected]>
Cc: ChenQi <[email protected]>; Patches and discussions about the oe-core layer <[email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultQuoted 3 lines · Peter Kjellerstedt
Quoted 3 lines
-----Original Message-----
From: [email protected]<openembedded-
Quoted 9 lines
Quoted 9 lines
[email protected]> On Behalf Of Khem Raj
Sent: den 24 juli 2018 16:12
To: ChenQi <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultOn Tue, Jul 24, 2018 at 12:30 AM ChenQi <[email protected]>
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 4 lines
Hi Khem,
The comments in security-flags.inc also needs to be modified to
remove
Quoted 3 lines
'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf)
instead
Quoted 3 lines
Quoted 3 lines
of
Quoted 2 lines
defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be
necessary
Quoted 1 line
Quoted 1 line
Quoted 1 line
default values to build things out. I don't think security flags
is
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
necessary to build things out.
this is the default setup, even non-poky users will get consistent experience.
I have to agree with Chen here. I think requiring security_flags.inc
from
Quoted 1 line
defaultsetup.conf is the wrong thing to do. We use security_flags.inc
in
Quoted 1 line
our setup, and I know how much trouble it has brought. To me, using
it
Quoted 1 line
should be a distro decision, not something that is enforced by the
use
Quoted 1 line
of bitbake.
Quoted 9 lines
Thats fine, I can move this to poky distro settings, using it by default would have
been in sync for all since reference distro is using it would be easier for others when
submitting patches, as a phase 2 I was also thinking of defaulting to hardeing in the toolchain itself
and remove this file completely that would have made it much better, then folks who dont want hardeing could just disable
it in toolchain. but I am fine to leave it a distro decision for now.
I do not think that relying on the toolchain to handle this is the right thing to do, given that some of us use external toolchains in addition to the toolchain from OE-Core... With the current setup we get roughly the same coverage regardless of which toolchain we use.
//Peter
Quoted 66 lines · Peter Kjellerstedt
Quoted 56 lines
-----Original Message-----
From: Khem Raj <[email protected]>
Sent: den 27 juli 2018 23:27
To: Peter Kjellerstedt <[email protected]>
Cc: ChenQi <[email protected]>; Patches and discussions about the oe-core layer <[email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultQuoted 3 lines · Peter Kjellerstedt
Quoted 3 lines
-----Original Message-----
From: [email protected]<openembedded-
Quoted 9 lines
Quoted 9 lines
[email protected]> On Behalf Of Khem Raj
Sent: den 24 juli 2018 16:12
To: ChenQi <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] defaultsetup.conf: Enable security flags+pie by defaultOn Tue, Jul 24, 2018 at 12:30 AM ChenQi <[email protected]>
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 4 lines
Hi Khem,
The comments in security-flags.inc also needs to be modified to
remove
Quoted 3 lines
'poky-lsb' info.
I'd suggest we still put it into distro conf file (poky.conf)
instead
Quoted 3 lines
Quoted 3 lines
of
Quoted 2 lines
defaultsetup.conf, because defaultsetup.conf is included by bitbake.conf. I think things in defaultsetup.conf should be
necessary
Quoted 1 line
Quoted 1 line
Quoted 1 line
default values to build things out. I don't think security flags
is
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
necessary to build things out.
this is the default setup, even non-poky users will get consistent experience.
I have to agree with Chen here. I think requiring security_flags.inc
from
Quoted 1 line
defaultsetup.conf is the wrong thing to do. We use security_flags.inc
in
Quoted 1 line
our setup, and I know how much trouble it has brought. To me, using
it
Quoted 1 line
should be a distro decision, not something that is enforced by the
use
Quoted 1 line
of bitbake.
Quoted 9 lines
Thats fine, I can move this to poky distro settings, using it by default would have
been in sync for all since reference distro is using it would be easier for others when
submitting patches, as a phase 2 I was also thinking of defaulting to hardeing in the toolchain itself
and remove this file completely that would have made it much better, then folks who dont want hardeing could just disable
it in toolchain. but I am fine to leave it a distro decision for now.
Quoted 4 lines
I do not think that relying on the toolchain to handle this is the right thing to do, given that some of us use external toolchains in addition to the toolchain from OE-Core... With the current setup we get roughly the same coverage regardless of which toolchain we use.
conversely,
external toolchains can then include unsecure-flags.inc or some such file IMO we should provide best experience out of box for internal toolchain users since thats all what we can do effectively. If we were to switch defaults to use hardened flags
then it will be much better to have toolchains default to it and thereby we can remove
many patches which we carry to inject these flags artificially in many recipes confusing the
component build systems especially when dealing with PIE and PIC and shared objects