From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mail.openembedded.org (Postfix) with ESMTP id 93F0F788B8 for ; Wed, 28 Feb 2018 08:46:28 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id w1S8kTHW026310 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 28 Feb 2018 00:46:29 -0800 (PST) Received: from [128.224.162.197] (128.224.162.197) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 28 Feb 2018 00:46:02 -0800 To: Khem Raj References: <846a1c535da3f41e87999910427d49929d9753a2.1519797175.git.Qi.Chen@windriver.com> From: ChenQi Message-ID: <9bbbe528-0650-35ae-c68d-ea2cdba6eee7@windriver.com> Date: Wed, 28 Feb 2018 16:46:34 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [128.224.162.197] Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 08:46:28 -0000 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit On 02/28/2018 04:29 PM, Khem Raj wrote: > On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi 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 >> --- >> ...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 >> +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 >> +--- >> + 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