From patchwork Mon Apr 16 06:50:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 133434 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3238146ljb; Sun, 15 Apr 2018 23:50:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx49AK1moyPbYTiyQ0nfV1TUjNi9sLB28P6fNsubM4E2xkhx2SFDAv3bQpCE6HqhEglVEPTZX X-Received: by 2002:a17:902:8692:: with SMTP id g18-v6mr7998591plo.152.1523861438743; Sun, 15 Apr 2018 23:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523861438; cv=none; d=google.com; s=arc-20160816; b=lsUz7pJY6z796zgivY39VDO2bQAwFPTZvwets8lLE4nAAPCLy3xJIGdNZ0G8c9W1Pk sj8ckpoXp6qPJIQYZBDAUg4RTvbwtiTMldNjee6Sh/+zO6ICxOhHFZwOpwSFoM2WyVtD BXXocf3Bn/7ANRcRrEm8Jdr/yIFkgOizk8MlvysPL8TZN7Lhf3M+qe1mEOqTdbhUzr4f 5bUOapLupGUH8J6+4r2tFuke0c5qKXv5X0ebHcrL6MvKDA+Oyy4Aj9GGIrc5pyLntvM/ Y5m93G79446agc+yK4FXrg8DIU2lu+cLd8n8ScXhpIshS4p/TF9ZeaRLGlUz0ENUUnX8 jSFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=ShfCha/X4gpL6MxSY2XHSwm4EKbJ21TQAqkDJqjvDb4=; b=AiqETfwlP5f8J16bMGplTiITqn9ux4/6sCyFoP5YGV55iwVRLMfbWZ21VROtvBFlE5 zLBKCbrc5hbJK7Ljw5/hp6wYNxhYznmHV98R9tGHGznOwXNXSXaMQpwYs3ErrXP5+PZz MzcVVK7l6FzByGDZHYqpUDzCI0oV09cvVhHBmJd/opx2wQ15Rw8u40an1IVsJCdhKNdi fodpekdin69fwdcYWDr5d4lnSCsOuTtyQuSCxDDqFvmKOJFwUPyhWe2vJc+RwUnoh0c6 L0PMEPOn8nNB68LccsIqHXcQwM2TWJbFTGlzJCEXohPLa8mXHz/i5ou8drmxJZS1EgaY GAEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DmXOO5AY; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id r79si10410874pfb.149.2018.04.15.23.50.38; Sun, 15 Apr 2018 23:50:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DmXOO5AY; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AF95A744E6; Mon, 16 Apr 2018 06:50:34 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by mail.openembedded.org (Postfix) with ESMTP id 3B08B6FFA1 for ; Mon, 16 Apr 2018 06:50:32 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id h69so10060966pfe.13 for ; Sun, 15 Apr 2018 23:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UTPuHWzLvs/ZCe5P0BY30bHEYgYw1W0YvyFGo55arg8=; b=DmXOO5AYI9wf/39qZWlzsVE9biWO7eGAoe58uEPAPBHLGmDmKrAeIzx/hWjdKyUQXN GqS49wM3YCMDBQ1gZXuAGOdYQV2gGIUvwlGPJB/07DwH7UUbtIUg8STNVrwnx1vNagmw AUGxRCD8vlktDsp2u5vR8CYRHYbEUD9zfJEdYK9n4p5mPhUTBdgflMDGHv+0pbdWRHQC qxYOWjqMOyECiNtdAyeqbUj11elST0u3bgNr5QMrY1MHWHfc38mnESrUPQ7UvB5OfVVd kD3z2dkVzsk7x6sNghT/YhgkyxKuMHKwWkaCQEANxCSq92gqjkJqLHMajDBw24csvxkB MS5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UTPuHWzLvs/ZCe5P0BY30bHEYgYw1W0YvyFGo55arg8=; b=sbRyVbhwYo/p3l35+/D2O4yWI7fjoTImpu5nxXRkrjf81hZq6fYgNNcY3Nkr4+aBhs gOPn0xF4doj5XyXNo5RkkWFU+OjFlRqh5Jy1qSqDppEpT5wjJkHFJ/gRv5JlZVSF+jZc 5AcXxZQbanNO8rnlm6o4hw1S/Nd2qvmWv2zXhImwcPZLPPkySiBrMfTAGXtB8H2ffjtQ 59cUAd2O5oDkFIr7qN24/rufj3HpASd6snGR4x0QYl3lOJH0bSSBlzrfUFTRbDYwU4NC Wcq741Egl4c/teg1TXJZBiDGG7D6RNNZRfPgqhK9U5SUgxrHKbe7mrrYk9Nnh6Ut8eOK nbOQ== X-Gm-Message-State: ALQs6tAu2l2o+mVaYRUSO3Nk1JEZ8FNn/SRCsEhvRMMp93kU62T+4ncR IvrcocRbejgVCIGRvjvcLbngsw== X-Received: by 10.101.71.138 with SMTP id e10mr11390266pgs.47.1523861433737; Sun, 15 Apr 2018 23:50:33 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8880:466c::487b]) by smtp.gmail.com with ESMTPSA id o13sm2388362pgn.54.2018.04.15.23.50.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 23:50:33 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 15 Apr 2018 23:50:11 -0700 Message-Id: <20180416065014.29385-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 Subject: [OE-core] [PATCH 1/4] libssp-nonshared: Add recipe 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org libssp-nonshared is a minimal gcc runtime piece which is needed on non-glibc systems which do implement libssp APIs in libc Signed-off-by: Khem Raj --- meta/recipes-core/musl/libssp-nonshared.bb | 39 ++++++++++++++++ .../musl/libssp-nonshared/ssp-local.c | 45 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 meta/recipes-core/musl/libssp-nonshared.bb create mode 100644 meta/recipes-core/musl/libssp-nonshared/ssp-local.c -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/musl/libssp-nonshared.bb b/meta/recipes-core/musl/libssp-nonshared.bb new file mode 100644 index 0000000000..3afab30fa2 --- /dev/null +++ b/meta/recipes-core/musl/libssp-nonshared.bb @@ -0,0 +1,39 @@ +# Copyright (C) 2018 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl" +LICENSE = "GPL-3.0-with-GCC-exception" +LIC_FILES_CHKSUM = "file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4" +SECTION = "libs" + +SRC_URI = "file://ssp-local.c" + +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" + +INHIBIT_DEFAULT_DEPS = "1" + +STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}" +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" + +DEPENDS = "virtual/${TARGET_PREFIX}binutils \ + virtual/${TARGET_PREFIX}gcc-initial \ +" + +do_configure[noexec] = "1" + +S = "${WORKDIR}" + +do_compile() { + ${CC} ${CPPFLAGS} ${CFLAGS} -c ssp-local.c -o ssp-local.o + ${AR} r libssp_nonshared.a ssp-local.o +} +do_install() { + install -Dm 0644 ${B}/libssp_nonshared.a ${D}${base_libdir}/libssp_nonshared.a +} + +PACKAGES = "${PN}" +FILES_${PN} = "${base_libdir}/libssp_nonshared.a" +# +# We will skip parsing for non-musl systems +# +COMPATIBLE_HOST = ".*-musl.*" diff --git a/meta/recipes-core/musl/libssp-nonshared/ssp-local.c b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c new file mode 100644 index 0000000000..8f51afa2c1 --- /dev/null +++ b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c @@ -0,0 +1,45 @@ +/* Stack protector support. + Copyright (C) 2005-2018 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file into combinations with other programs, +and to distribute those combinations without any restriction coming +from the use of this file. (The General Public License restrictions +do apply in other respects; for example, they cover modification of +the file, and distribution when not linked into a combine +executable.) + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +extern void __stack_chk_fail (void); + +/* Some targets can avoid loading a GP for calls to hidden functions. + Using this entry point may avoid the load of a GP entirely for the + function, making the overall code smaller. */ + +void +__attribute__((visibility ("hidden"))) +__stack_chk_fail_local (void) +{ + __stack_chk_fail (); +} From patchwork Mon Apr 16 06:50:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 133435 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3238302ljb; Sun, 15 Apr 2018 23:50:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Jk+3b6Sjaey4AUXlI5lx+6OcHZNFmhH8OcjdFx2LVwqr3CNomNjl1BuXiChdReTNRcwCt X-Received: by 10.101.75.135 with SMTP id t7mr12044050pgq.235.1523861453257; Sun, 15 Apr 2018 23:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523861453; cv=none; d=google.com; s=arc-20160816; b=ruuF7xvD229f02OQR5AmhDC5fqvWV6O/s+FT/jZyphHpkHduW0kOxv22V0INX/ebQO ykqFfNesqaq90gVbApnVvHuBPUZ73S5es9GdeoMcTLDThEK1fUpvz2CzrT5oZxlKsjuf ZntESFfXHi3zWnLPApLbn60eCg6eufid5gsvewsBYtEV2PvRu8CmWhOufB90u1mG+K+E ziQGfUNCtMLDELrTdCf24VqWPFIPhSG0pEwP+ccoNZYHVesbUeQKmyinc5JjGTZBKShB H6hbbZm5iqiYVd+Qb9wGJ5ZMuvegNT0YgIe8l9Q2XIDckg/7cm5QcFoxPTEMbd7U6m3m hgFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Iet+GBX0wjKr8I5l9w3dgrFzeSfQcrWL+CwagI8a6LA=; b=sIPqhEEkC083Gsk7gxQbCCd15a3MLnE2sMFvbCgQYyiJ77QquObWZ+g+FZmadNyI0a 7I06BjNH71ZQ8tez3RZJ6tozi83M5UteiNEIFSK/W7F5PmHhnMZ+e5swPKxbuRK6yWYw u95VHyGkRilzVy4IjGKfMpPKmdJzbGjkGlKNOecV2cwEhxff8ZcbeGOijW5rZ6KEt3Z2 PCVScF4+ycdRtfBOTQnyeRrTS2MAvVTqdcJ2jmXTBu2n2OerCx1UgQSNNUSzS2Igf0/r 0gT0Af+YwjteLn9ahu9a/Lm01asoDEHmD7I2EL3TdgjEMB+kIPwzkUv4KiMtRn7dYCh7 SIMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=R3H59UBR; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b5si9667646pfi.324.2018.04.15.23.50.52; Sun, 15 Apr 2018 23:50:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=R3H59UBR; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 912AC7450C; Mon, 16 Apr 2018 06:50:50 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by mail.openembedded.org (Postfix) with ESMTP id C9DD16FFA1 for ; Mon, 16 Apr 2018 06:50:33 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id s13-v6so2229164plq.11 for ; Sun, 15 Apr 2018 23:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3IoNDPlvoy81APIeG49BLAcc3LVQpG9zZKxHZXzkAs0=; b=R3H59UBRRPDyyUMseQucJDdKXPMKxOuR4EHm67DozPdw3z26Fc+F6GbT7hVJqwCmwq dVkmiGCKOfUKNbQ8iXjWbiO+dwUzjw5NBllI1jUGzF+NE8NtL70B1SltGSQuRusJbt1V qwzxt4BUjsxIoDFxw0RK74iN0E6gya4/FzvARYZCCaRcWzPKiagpOgMTcK72eFTA+bzM hB14KaCoQjq7LJA+Z0GaDg0BMgC2MUvMDsdygpQVZ8oqf11uFIOYpXoPMTQhfipmcpGP Db6srI7hDlIczm5lRBrjj5FzuXSgrvfDL4i1BgsPkJiDeebuedDIOkftd424iKg5D4eo u+Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3IoNDPlvoy81APIeG49BLAcc3LVQpG9zZKxHZXzkAs0=; b=UdaD/wyxoTgQE5nxVuvcb9T/KTHoxrlgAC4SMohrXRf0W1AInGYdbbI2LN6gBs7o8t WQTzXmLGuNu2xxibaWCK927gn4+X3wxLpHv6rJ0Hs9gkoZvssqhZS5J6Bo9Pjj4yb9KP 1VXvuEW1K/ht8NPPcN2Y6SzpH2SVY1yZIjRc5rTj1te86x5x9v+HZ6QJg8YI+2CRDEQY E+8X1grelaJcrNgN0zpim9/HKsPIgJ4hkwqpiubwVoUw84HonGllH2ptvc2Kv/+vdBGP QuVY95HEo3wiqHxJVSdkd7BlTNfCtS+UMiAFng1ojoaRslRhzr57gLq0SAB7eat8jM0T lDpQ== X-Gm-Message-State: ALQs6tDaG662Xk3FJ6LMZAhsWGLt1C9tCKALk9285vLlqcW7R/Yb+Cjr VdhjCREbMEuHLviAPnFhXpe7+w== X-Received: by 2002:a17:902:5c6:: with SMTP id f64-v6mr14165122plf.77.1523861434595; Sun, 15 Apr 2018 23:50:34 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8880:466c::487b]) by smtp.gmail.com with ESMTPSA id o13sm2388362pgn.54.2018.04.15.23.50.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 23:50:33 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 15 Apr 2018 23:50:12 -0700 Message-Id: <20180416065014.29385-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180416065014.29385-1-raj.khem@gmail.com> References: <20180416065014.29385-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 2/4] musl: Depend on libssp-nonshared 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org libssp-nonshared is required on musl since it does not implement the gcc runtime piece of libssp, which actually it a gcc optimization to reach to __stack_chk_fail Signed-off-by: Khem Raj --- meta/recipes-core/musl/musl_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb index 42ba411f17..d5a9360b70 100644 --- a/meta/recipes-core/musl/musl_git.bb +++ b/meta/recipes-core/musl/musl_git.bb @@ -22,6 +22,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \ libgcc-initial \ linux-libc-headers \ bsd-headers \ + libssp-nonshared \ " export CROSS_COMPILE="${TARGET_PREFIX}" @@ -65,7 +66,7 @@ do_install() { done } -RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev" +RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared" RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev" RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)" From patchwork Mon Apr 16 06:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 133436 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3238364ljb; Sun, 15 Apr 2018 23:50:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Ot101xiAag1qcMX48DKd+uaL3sXbGEZiVGiTLvtEX+Py5aOTJKwQNJZ+qSKJ+cqbcd/PS X-Received: by 10.167.129.154 with SMTP id g26mr316496pfi.169.1523861458169; Sun, 15 Apr 2018 23:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523861458; cv=none; d=google.com; s=arc-20160816; b=cC+2vETd4OlrwV/SJd1zz2XwSYWBuFC1ErwMc5JUJmm0rQjPW8Ze3e5ime/FU2gVv8 IKE+6G2nxqPPBECnc7wXfhvj7LhORsaj5P45aYCt/+r20OXuQOUz0n00w/P+H3JR0lq/ fouTOKAfMPcdnyHS/R0aQSLlBcoEo4C4n5nHfopWXmuVT8a3k0Sy0hSudDE0iXGq6EPA Zty342N5i0O+Rl8f5WtxKB21ejGw2zH0slzzehuG0AW6yr+0YMMFgRWReMeKtgR6h2uI aHM90NUwqW9o8DQXTlpcHCOnD1Op2rk/9XaHKDOOvIl93p7ogyFsuFlj53+rS3+u4L4w omkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=q695EzIBgFGh57dSTzriOqu619GCdZOUPsd05cuRB4A=; b=PvcvF6ntgghAxVewsETb5Zpzv18yKocFyM5UAIJ7vhA0utn2+fAva3PMYNpZVD9o89 p6ro+bdPZUtLwjss++qBVFoTBmGjr5WL8kAgvrWNPSbc51QsEuOrjwUhE/Vo1DE/nQa2 28Qnih8/ms+VjNukONyoI+Mz5o2x2Bgr7ICN6G7n48WY6VCnHEYBVUuyQHq0ZFCEkRur QUNUNbtH/EjyX7x7plxNHFQhbI2wYh6zqprVEJ5qnOZI3MsZngfrHhF9FhJRkmP761Rq py57XpEe6RQOPsJVkr7vb8Cx00+f4hXE63BtYdkuI5JcnJ2vgZB01r3kxsXendX0VPd7 9etg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=D9ziJyly; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 1-v6si11358642plj.247.2018.04.15.23.50.57; Sun, 15 Apr 2018 23:50:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=D9ziJyly; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A0EE674524; Mon, 16 Apr 2018 06:50:51 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by mail.openembedded.org (Postfix) with ESMTP id 61395744F9 for ; Mon, 16 Apr 2018 06:50:35 +0000 (UTC) Received: by mail-pl0-f66.google.com with SMTP id t20-v6so9485735ply.9 for ; Sun, 15 Apr 2018 23:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GYC8GjwZodQPQ4S17ZXlj5gEmFAFtoxhcPT1zboyBsc=; b=D9ziJyly5wpq0h0fLYkjwBIgL9n9ZuUKNmzrAHMLqPhLURDRd78K6x2F5Hx5Fbm+TU G97E+JEjYX0+/qintrv9rOWN9e2FrTSdWA2WgISuflNJtPSTkTNo+WJIF5QxJI3RhLiI V0LxDzuUhUSA48z8JZxRbPboMNNusZFuEiCMi1EQWoMJK4whlrDM8xQg5ERY4GWkD05T JORghWvS2BHv7MgA3dmvUAB3pXcyyukB8yoDnbyGmPvB0GgFMjsHoF4TzVLFGcGZceiC TJNUMyO8BrV6OMb1TkpCOwPvehQKlkZkCfe4C/Q3HtZakZjtAf9dFS/Zr1xxpFyBOOZ1 oNAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GYC8GjwZodQPQ4S17ZXlj5gEmFAFtoxhcPT1zboyBsc=; b=GK5gOxgx1oT1Ljun7LfpbWk1PKMevee6anGlHkOilA9MM+Cneb9kCEOBU67QP+RVD0 gyTDOSRONWylhLHEXmnF4xQ2ReIVxjEXngxAH13d4bCkVxH3IiyuMSaUu5TeNhtcgzHk ITtM91D+rRe0gqqhun2Dy8VL+2JurgT7P+/dAaiPzc2yX4n0Nvpe8cbKPI65+VKZQTAs PqVLmv3wfmBzD+agmZ4ajOHXiR9vxpsV37soXsyBsMmlTfFqpzpsghCYqVpjOyfcNx7r u9xZr8YSNQZapWrvSTNx/hsz2u6bDwnKGLMJtJ23KjvjNfmZ7KxQiwDvV663LmGvngSa w/gQ== X-Gm-Message-State: ALQs6tB8EjauUyr3q/eE/qJzdVF2XV7KTxIJUA6UtBn7OehB7oqBtjyc dtWE9CD5xgZgpfzNJX6Adn56hQ== X-Received: by 2002:a17:902:bd03:: with SMTP id p3-v6mr14378185pls.236.1523861436234; Sun, 15 Apr 2018 23:50:36 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8880:466c::487b]) by smtp.gmail.com with ESMTPSA id o13sm2388362pgn.54.2018.04.15.23.50.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 23:50:34 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 15 Apr 2018 23:50:13 -0700 Message-Id: <20180416065014.29385-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180416065014.29385-1-raj.khem@gmail.com> References: <20180416065014.29385-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 3/4] gcc-runtime: Disable gcc version of libssp 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org libssp is implemented fully in glibc as well as in musl so we really do not need the gcc version of this library except may be for mingw, where we keep it enabled anyway gcc in OE is built with the knowledge that C library already provides libssp implementation, we should therefore not need the gcc implementation of same. libssp_nonshared piece is a detail which is needed when gcc is the compiler, in glibc this is part of libc_nonshared.a already and libc_nonshared.a is linked always when linking with -lc becuase libc.so in glibc is actually a linker script GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /usr/lib/ld-linux-x86-64.so.2 ) ) which automatically links in the needed runtime bits, this however is not the case for musl, where core SSP APIs are implemented in full but compiler specific runtime isn't, for this we add a new package called libssp_nonshared which generate the needed runtime stub and gcc is already carrying patch to link to libssp_nonshared.a on musl This should fix a long standing problem where static PIE executable were not buildable with OE since it was conflicting SSP implementation one from C library and the other one from gcc and we end up with duplicate symbol errors during linking. Signed-off-by: Khem Raj --- meta/recipes-devtools/gcc/gcc-7.3.inc | 4 +++- meta/recipes-devtools/gcc/gcc-runtime.inc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc index d968c322d2..7e52afc643 100644 --- a/meta/recipes-devtools/gcc/gcc-7.3.inc +++ b/meta/recipes-devtools/gcc/gcc-7.3.inc @@ -93,10 +93,12 @@ FORTRAN = "" JAVA = "" LTO = "--enable-lto" +SSP ?= "--disable-libssp" +SSP_mingw = "--enable-libssp" EXTRA_OECONF_BASE = "\ ${LTO} \ - --enable-libssp \ + ${SSP} \ --enable-libitm \ --disable-bootstrap \ --disable-libmudflap \ diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index 97365a21dc..b4e5539575 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -24,8 +24,10 @@ RUNTIMELIBITM_nios2 = "" RUNTIMELIBITM_microblaze = "" RUNTIMELIBITM_riscv32 = "" RUNTIMELIBITM_riscv64 = "" +RUNTIMELIBSSP ?= "" +RUNTIMELIBSSP_mingw ?= "libssp" -RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ +RUNTIMETARGET = "libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ " RUNTIMETARGET_append_x86 = " libmpx" From patchwork Mon Apr 16 06:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 133437 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3238474ljb; Sun, 15 Apr 2018 23:51:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx48iS6b0yCNJFstdBcVsJTKjdKeePoPiBCPk8ZMKWDqhuJQoCkWQHdByFR6dYVQ6QVtrnCK3 X-Received: by 10.98.68.135 with SMTP id m7mr20485071pfi.57.1523861464286; Sun, 15 Apr 2018 23:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523861464; cv=none; d=google.com; s=arc-20160816; b=ZDxslETU5oggnx+81KK3tNM3VyXqdtXIJvrtBsYk2BA99RExfG5tFGSVbKoSbqFGBp w4yT8AbjPHZEdXIr8KZU2uPX4XklR/XNmVsP/Skmct+BDG94JjtemzVD1eYvcF9ame57 LCe7conbR2Q9MkXIpcVgz/FpHO+jOTQLCcXyq1b71T2dSuLM7Rt1yYLPRDFQdaqE7b9E Eiigy/KYT1rUMYf2vTKRLloqS2zkUcSuc7YdF3HtQOySqKPfIf7saZ6Xf45pT7xBKkTb TR5siDTJpqkJ730gNfHzgyF1JKum7YefIPoRjCo0FWfLxYko8Z1cjuThxUei4X7+36DM Bvqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=w11hcF0UTu64lk+53U623+xXZvcrmdnxIZCh1N5ls/s=; b=y2yUlbwwbPohP4uNg0FlHs/Iz3lvsY1jHjCBNUy93g3oqGuwqFThVQU58YWSVEq9up eLdJvViw0Z7hByhOqwmFMgMNDKJa6I1CvSv1EZYUyVAcR3UwkAL760zxyT922n0xgZNX SPKpxwCRPojrVYXF4nbnfhNdOYA38m+uud1qjtPeTfeKbAHB7cdP/MzEf0LrgT3IjxMt kog0ZrkOCM1hGuG4dDpMmnmWvRErsEZl/vlnDZDwC7NIEdGb1c9L7paMujArEyL/mVST f/DGoJ47iMcwISq6gwRYtfxxqOm26MGTAqORH7rg6zFjBW8Yf4e9Chu7YxvwWBaO493Y vE8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YO6wuj+V; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 91-v6si11340363pld.396.2018.04.15.23.51.03; Sun, 15 Apr 2018 23:51:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YO6wuj+V; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B8A077452A; Mon, 16 Apr 2018 06:50:52 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by mail.openembedded.org (Postfix) with ESMTP id B9582744F9 for ; Mon, 16 Apr 2018 06:50:36 +0000 (UTC) Received: by mail-pl0-f68.google.com with SMTP id 59-v6so9469375plc.13 for ; Sun, 15 Apr 2018 23:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XH50gH3v5Zfcm0YQpiX+2GbtcXf2EsakvQGwlY91Gt8=; b=YO6wuj+VzkGiGzm0cNu9hZfVn4MnrdFhwsNFlBxlExPDOcKB/L5PVlxPve703diJWp 4AL1V2kiMqe/kKEC4ga5/eLeaJgw566cCPwUZuiEbJuzrsFx/5j9SZu9ci7m0QrCGTSt oM2Q2Ji1r7BAZxSnbte9ii1NPwn93EedpFWDo/WwRTT7qnufoa5UDboE0NTWHw+cOmqp 3Yd244NK9x2C3KjkLieCPIWkx16hTIPj7lc2DSqc9U2M9w2aCcbhqLNF7vNsQmFJqZ1O UZTB0euesujQAsw5HZV5YQO8tCu8LyaeeUatY26J6nLLDHIg5Euf9rUpUhfP260/s0/q mKPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XH50gH3v5Zfcm0YQpiX+2GbtcXf2EsakvQGwlY91Gt8=; b=F1fB0umxOB5Pm5zWANkJw1Uxt8okwzNptvisJ7zRsfYEZ+1OT41XHiU0zPmnVhUiTC 1SN7mJUQ6Zy/7SQoquE15w+F+k/2wnqQwM1DkXVfmI0fquiz9vIP5VO+BKcyFrYhEGDR oshr8S8N1c+JPLczWezqXUou6vKoifW7nOEYaLzZceLVU2q79IqJO65JY83cLajYGWw5 zwfgfxdBTZiF0kcD8jVYAPZt8MHt7qPN5rKQ0K1CF8T8v3YCH47cPiGbm0/nLhA0xWq4 m3TkpLZKCXEXXiIx0yLxkhm/sL04BTDp/i6CXEr2wQyC7JLimTme3xlbhEZp19Znni02 SQlg== X-Gm-Message-State: ALQs6tD9Kh1Q22C02N3nLQk3OldxoDtOR9nI0c29oht2eSRkNwS100iA kvefl/GRhoDsjSI8qWCKHAqTSg== X-Received: by 2002:a17:902:8a82:: with SMTP id p2-v6mr14245633plo.91.1523861437588; Sun, 15 Apr 2018 23:50:37 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8880:466c::487b]) by smtp.gmail.com with ESMTPSA id o13sm2388362pgn.54.2018.04.15.23.50.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 23:50:36 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 15 Apr 2018 23:50:14 -0700 Message-Id: <20180416065014.29385-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180416065014.29385-1-raj.khem@gmail.com> References: <20180416065014.29385-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 4/4] libunwind: Drop adding libssp to linker flags 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This is no longer needed as gcc provided libssp is not built Signed-off-by: Khem Raj --- meta/recipes-support/libunwind/libunwind.inc | 2 -- 1 file changed, 2 deletions(-) -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc index b9c532d3ad..36851d07ed 100644 --- a/meta/recipes-support/libunwind/libunwind.inc +++ b/meta/recipes-support/libunwind/libunwind.inc @@ -14,8 +14,6 @@ PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, lat EXTRA_OECONF_arm = "--enable-debug-frame" EXTRA_OECONF_aarch64 = "--enable-debug-frame" -SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp" - do_install_append () { oe_multilib_header libunwind.h }