* [PATCH] systemd: disable problematic GCC 5.2 optimizations
@ 2015-09-21 11:23 Jonathan Liu
2015-09-21 12:23 ` Burton, Ross
2015-09-21 17:05 ` Khem Raj
0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Liu @ 2015-09-21 11:23 UTC (permalink / raw)
To: openembedded-core
This fixes systemd failing to start on Raspberry Pi 2 if it is compiled
with GCC 5.2.
It would try to start "Journal Service" and "udev Kernel Device Manager"
but fail repeatedly.
[YOCTO #8291]
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/systemd/systemd_225.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_225.bb
index f7d4c7d..4a19ff4 100644
--- a/meta/recipes-core/systemd/systemd_225.bb
+++ b/meta/recipes-core/systemd/systemd_225.bb
@@ -123,6 +123,9 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
# uclibc does not have NSS
EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
+# disable problematic GCC 5.2 optimizations [YOCTO #8291]
+FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
+
do_configure_prepend() {
export NM="${HOST_PREFIX}gcc-nm"
export AR="${HOST_PREFIX}gcc-ar"
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 11:23 [PATCH] systemd: disable problematic GCC 5.2 optimizations Jonathan Liu
@ 2015-09-21 12:23 ` Burton, Ross
2015-09-21 12:31 ` Jonathan Liu
2015-09-21 17:05 ` Khem Raj
1 sibling, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2015-09-21 12:23 UTC (permalink / raw)
To: Jonathan Liu; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
On 21 September 2015 at 12:23, Jonathan Liu <net147@gmail.com> wrote:
> +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
>
Are these bugs with the gcc optimisations or the systemd source code, and
if its gcc's fault are the problematic optimisations specific to a
particular architecture (such as ARM)? Just wondering if we can use
overrides to only change the optimisations where they're a problem.
Ross
[-- Attachment #2: Type: text/html, Size: 855 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 12:23 ` Burton, Ross
@ 2015-09-21 12:31 ` Jonathan Liu
2015-09-21 12:45 ` Adrian Freihofer
0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Liu @ 2015-09-21 12:31 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On 21/09/2015 10:23 PM, Burton, Ross wrote:
>
> On 21 September 2015 at 12:23, Jonathan Liu <net147@gmail.com
> <mailto:net147@gmail.com>> wrote:
>
> +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
>
>
> Are these bugs with the gcc optimisations or the systemd source code,
> and if its gcc's fault are the problematic optimisations specific to a
> particular architecture (such as ARM)? Just wondering if we can use
> overrides to only change the optimisations where they're a problem.
>
> Ross
I am not sure how to isolate if it's an issue in the systemd source code
but the issue is not present when using GCC 4.9.
Haven't checked if this is occuring on other architectures. Any feedback
whether this occurs on other platforms (Raspberry Pi 2 is ARMv7) is welcome.
Regards,
Jonathan
[-- Attachment #2: Type: text/html, Size: 1893 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 12:31 ` Jonathan Liu
@ 2015-09-21 12:45 ` Adrian Freihofer
2015-09-21 12:49 ` Jonathan Liu
0 siblings, 1 reply; 8+ messages in thread
From: Adrian Freihofer @ 2015-09-21 12:45 UTC (permalink / raw)
To: Jonathan Liu; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
Hi,
On Beaglebone-black Systemd 215 does not boot if compiled with -O2.
Compiling with -O1 works.
Regards,
Adrian
2015-09-21 14:31 GMT+02:00 Jonathan Liu <net147@gmail.com>:
> On 21/09/2015 10:23 PM, Burton, Ross wrote:
>
>
> On 21 September 2015 at 12:23, Jonathan Liu <net147@gmail.com> wrote:
>
>> +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
>>
>
> Are these bugs with the gcc optimisations or the systemd source code, and
> if its gcc's fault are the problematic optimisations specific to a
> particular architecture (such as ARM)? Just wondering if we can use
> overrides to only change the optimisations where they're a problem.
>
> Ross
>
> I am not sure how to isolate if it's an issue in the systemd source code
> but the issue is not present when using GCC 4.9.
> Haven't checked if this is occuring on other architectures. Any feedback
> whether this occurs on other platforms (Raspberry Pi 2 is ARMv7) is welcome.
>
> Regards,
> Jonathan
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
[-- Attachment #2: Type: text/html, Size: 2542 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 12:45 ` Adrian Freihofer
@ 2015-09-21 12:49 ` Jonathan Liu
2015-09-21 13:53 ` Adrian Freihofer
0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Liu @ 2015-09-21 12:49 UTC (permalink / raw)
To: Adrian Freihofer; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
Hi Adrian,
On 21/09/2015 10:45 PM, Adrian Freihofer wrote:
> On Beaglebone-black Systemd 215 does not boot if compiled with -O2.
> Compiling with -O1 works.
> 2015-09-21 14:31 GMT+02:00 Jonathan Liu <net147@gmail.com
> <mailto:net147@gmail.com>>:
>
> On 21/09/2015 10:23 PM, Burton, Ross wrote:
>>
>> On 21 September 2015 at 12:23, Jonathan Liu <net147@gmail.com
>> <mailto:net147@gmail.com>> wrote:
>>
>> +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
>>
>>
>> Are these bugs with the gcc optimisations or the systemd source
>> code, and if its gcc's fault are the problematic optimisations
>> specific to a particular architecture (such as ARM)? Just
>> wondering if we can use overrides to only change the
>> optimisations where they're a problem.
>>
>> Ross
> I am not sure how to isolate if it's an issue in the systemd
> source code but the issue is not present when using GCC 4.9.
> Haven't checked if this is occuring on other architectures. Any
> feedback whether this occurs on other platforms (Raspberry Pi 2 is
> ARMv7) is welcome.
>
> Regards,
> Jonathan
>
Can you try the patch instead of changing -O2 to -O1 to see if it fixes
booting with systemd?
Regards,
Jonathan
[-- Attachment #2: Type: text/html, Size: 3559 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 12:49 ` Jonathan Liu
@ 2015-09-21 13:53 ` Adrian Freihofer
0 siblings, 0 replies; 8+ messages in thread
From: Adrian Freihofer @ 2015-09-21 13:53 UTC (permalink / raw)
To: Jonathan Liu; +Cc: OE-core
Hi Jonathan
Your patch is fine on beaglebone black. At least it is possible to
login. Thank you.
Regards,
Adrian
On Mon, 2015-09-21 at 22:49 +1000, Jonathan Liu wrote:
> Hi Adrian,
>
> On 21/09/2015 10:45 PM, Adrian Freihofer wrote:
> > On Beaglebone-black Systemd 215 does not boot if compiled with -O2.
> > Compiling with -O1 works.
> > 2015-09-21 14:31 GMT+02:00 Jonathan Liu <net147@gmail.com>:
> > > On 21/09/2015 10:23 PM, Burton, Ross wrote:
> > > >
> > > > On 21 September 2015 at 12:23, Jonathan Liu <net147@gmail.com>
> > > > wrote:
> > > > > +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule
> > > > > -insns2"
> > > > >
> > > > Are these bugs with the gcc optimisations or the systemd source
> > > > code, and if its gcc's fault are the problematic optimisations
> > > > specific to a particular architecture (such as ARM)? Just
> > > > wondering if we can use overrides to only change the
> > > > optimisations where they're a problem.
> > > >
> > > > Ross
> > > I am not sure how to isolate if it's an issue in the systemd
> > > source code but the issue is not present when using GCC 4.9.
> > > Haven't checked if this is occuring on other architectures. Any
> > > feedback whether this occurs on other platforms (Raspberry Pi 2
> > > is ARMv7) is welcome.
> > >
> > > Regards,
> > > Jonathan
> > >
> Can you try the patch instead of changing -O2 to -O1 to see if it
> fixes booting with systemd?
>
> Regards,
> Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 11:23 [PATCH] systemd: disable problematic GCC 5.2 optimizations Jonathan Liu
2015-09-21 12:23 ` Burton, Ross
@ 2015-09-21 17:05 ` Khem Raj
2015-09-21 18:04 ` Jonathan Liu
1 sibling, 1 reply; 8+ messages in thread
From: Khem Raj @ 2015-09-21 17:05 UTC (permalink / raw)
To: Jonathan Liu; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]
Please make it arm specific
On Sep 21, 2015 4:22 AM, "Jonathan Liu" <net147@gmail.com> wrote:
> This fixes systemd failing to start on Raspberry Pi 2 if it is compiled
> with GCC 5.2.
>
> It would try to start "Journal Service" and "udev Kernel Device Manager"
> but fail repeatedly.
>
> [YOCTO #8291]
>
> Signed-off-by: Jonathan Liu <net147@gmail.com>
> ---
> meta/recipes-core/systemd/systemd_225.bb | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_225.bb
> b/meta/recipes-core/systemd/systemd_225.bb
> index f7d4c7d..4a19ff4 100644
> --- a/meta/recipes-core/systemd/systemd_225.bb
> +++ b/meta/recipes-core/systemd/systemd_225.bb
> @@ -123,6 +123,9 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
> # uclibc does not have NSS
> EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
>
> +# disable problematic GCC 5.2 optimizations [YOCTO #8291]
> +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
> +
> do_configure_prepend() {
> export NM="${HOST_PREFIX}gcc-nm"
> export AR="${HOST_PREFIX}gcc-ar"
> --
> 2.5.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 2298 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: disable problematic GCC 5.2 optimizations
2015-09-21 17:05 ` Khem Raj
@ 2015-09-21 18:04 ` Jonathan Liu
0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Liu @ 2015-09-21 18:04 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]
Hi Khem,
On 22/09/2015 3:05 AM, Khem Raj wrote:
>
> Please make it arm specific
>
I have sent V2 that only makes the change for arm.
Interestly, this issue doesn't appear for qemuarm (ARMv5) when running
under qemu.
I am wondering if this issue affects platforms other than ARM on real
boards depending on TUNE_FEATURES and TARGET_FPU.
> On Sep 21, 2015 4:22 AM, "Jonathan Liu" <net147@gmail.com
> <mailto:net147@gmail.com>> wrote:
>
> This fixes systemd failing to start on Raspberry Pi 2 if it is
> compiled
> with GCC 5.2.
>
> It would try to start "Journal Service" and "udev Kernel Device
> Manager"
> but fail repeatedly.
>
> [YOCTO #8291]
>
> Signed-off-by: Jonathan Liu <net147@gmail.com
> <mailto:net147@gmail.com>>
> ---
> meta/recipes-core/systemd/systemd_225.bb <http://systemd_225.bb>
> | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_225.bb
> <http://systemd_225.bb> b/meta/recipes-core/systemd/systemd_225.bb
> <http://systemd_225.bb>
> index f7d4c7d..4a19ff4 100644
> --- a/meta/recipes-core/systemd/systemd_225.bb <http://systemd_225.bb>
> +++ b/meta/recipes-core/systemd/systemd_225.bb <http://systemd_225.bb>
> @@ -123,6 +123,9 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
> # uclibc does not have NSS
> EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
>
> +# disable problematic GCC 5.2 optimizations [YOCTO #8291]
> +FULL_OPTIMIZATION += "-fno-schedule-insns -fno-schedule-insns2"
> +
> do_configure_prepend() {
> export NM="${HOST_PREFIX}gcc-nm"
> export AR="${HOST_PREFIX}gcc-ar"
> --
> 2.5.0<http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
Regards,
Jonathan
[-- Attachment #2: Type: text/html, Size: 3590 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-21 18:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 11:23 [PATCH] systemd: disable problematic GCC 5.2 optimizations Jonathan Liu
2015-09-21 12:23 ` Burton, Ross
2015-09-21 12:31 ` Jonathan Liu
2015-09-21 12:45 ` Adrian Freihofer
2015-09-21 12:49 ` Jonathan Liu
2015-09-21 13:53 ` Adrian Freihofer
2015-09-21 17:05 ` Khem Raj
2015-09-21 18:04 ` Jonathan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox