From: ChenQi <Qi.Chen@windriver.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl
Date: Wed, 28 Feb 2018 16:46:34 +0800 [thread overview]
Message-ID: <9bbbe528-0650-35ae-c68d-ea2cdba6eee7@windriver.com> (raw)
In-Reply-To: <CAMKF1spn6uXBQJsSBnTs8ZMkBVyQeJFOqv9_ufWSnAoFqqJ0mg@mail.gmail.com>
On 02/28/2018 04:29 PM, Khem Raj wrote:
> On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi <Qi.Chen@windriver.com> wrote:
>> Remove the 'fstack-protector' and 'fstack-protector-strong' flags
>> as a workaround to fix the following error when building for qemux86
>> and qemuppc with musl.
>>
>> undefined reference to `__stack_chk_fail_local'
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>> ...ck-protector-flags-to-workaround-musl-bui.patch | 33 ++++++++++++++++++++++
>> meta/recipes-core/systemd/systemd_236.bb | 4 +++
>> 2 files changed, 37 insertions(+)
>> create mode 100644 meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>>
>> diff --git a/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>> new file mode 100644
>> index 0000000..783e579
>> --- /dev/null
>> +++ b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>> @@ -0,0 +1,33 @@
>> +From a3e71209957e627be7e47969a61d2c69de4f2659 Mon Sep 17 00:00:00 2001
>> +From: Chen Qi <Qi.Chen@windriver.com>
>> +Date: Tue, 27 Feb 2018 18:06:51 -0800
>> +Subject: [PATCH] Remove fstack-protector flags to workaround musl build
>> +
>> +Remove fstack-protector and fstack-protector-strong flags to fix
>> +the following build failure for qemux86 and qemuppc with musl.
>> +
>> + undefined reference to `__stack_chk_fail_local'
>> +
>> +Upstream-Status: Inappropriate [OE Specific]
>> +
>> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> +---
>> + meson.build | 2 --
>> + 1 file changed, 2 deletions(-)
>> +
>> +diff --git a/meson.build b/meson.build
>> +index ddc061c12..631e76886 100644
>> +--- a/meson.build
>> ++++ b/meson.build
>> +@@ -298,8 +298,6 @@ foreach arg : ['-Wextra',
>> + '-fdiagnostics-show-option',
>> + '-fno-strict-aliasing',
>> + '-fvisibility=hidden',
>> +- '-fstack-protector',
>> +- '-fstack-protector-strong',
>> + '-fPIE',
>> + '--param=ssp-buffer-size=4',
>> + ]
>> +--
>> +2.13.0
>> +
>> diff --git a/meta/recipes-core/systemd/systemd_236.bb b/meta/recipes-core/systemd/systemd_236.bb
>> index a208f62..7798abb 100644
>> --- a/meta/recipes-core/systemd/systemd_236.bb
>> +++ b/meta/recipes-core/systemd/systemd_236.bb
>> @@ -53,6 +53,10 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
>> "
>> SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
>>
>> +# Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and qemuppc for musl
>> +SRC_URI_append_libc-musl_qemux86 = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
>> +SRC_URI_append_libc-musl_qemuppc = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
>> +
> we have security_flags.inc to build with these flags. So it might be fine
> to just remove these flags including -fPIE
>
Hi Khem,
Just to confirm, do you mean that we remove these flags unconditionally?
Something like:
SRC_URI_append = " file://0001-Remove-security-flags"
Best Regards,
Chen Qi
>> PAM_PLUGINS = " \
>> pam-plugin-unix \
>> pam-plugin-loginuid \
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
next prev parent reply other threads:[~2018-02-28 8:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 5:56 [PATCH 0/4] systemd & systemd-boot: upgrade to 236 Chen Qi
2018-02-28 5:56 ` [PATCH 1/4] meson.bbclass: fix to build for more projects Chen Qi
2018-02-28 8:25 ` Khem Raj
2018-02-28 8:55 ` ChenQi
2018-02-28 5:56 ` [PATCH 2/4] systemd: upgrade to 236 Chen Qi
2018-02-28 11:41 ` Alexander Kanavin
2018-03-01 3:18 ` ChenQi
2018-03-03 2:45 ` Khem Raj
2018-02-28 13:50 ` Burton, Ross
2018-03-01 3:15 ` ChenQi
2018-03-01 12:19 ` Burton, Ross
2018-02-28 5:56 ` [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl Chen Qi
2018-02-28 8:29 ` Khem Raj
2018-02-28 8:46 ` ChenQi [this message]
2018-02-28 14:59 ` Khem Raj
2018-03-05 2:08 ` ChenQi
2018-02-28 5:56 ` [PATCH 4/4] systemd-boot: upgrade to 236 Chen Qi
2018-02-28 13:30 ` Burton, Ross
2018-02-28 13:32 ` Burton, Ross
2018-03-01 3:10 ` ChenQi
2018-03-05 2:05 ` ChenQi
-- strict thread matches above, loose matches on Subject: below --
2018-03-05 2:02 [PATCH 0/4] systemd & systemd-boot: upgrade to 237 Chen Qi
2018-03-05 2:02 ` [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl Chen Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bbbe528-0650-35ae-c68d-ea2cdba6eee7@windriver.com \
--to=qi.chen@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox