From patchwork Fri Sep 20 08:53:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1165108 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XPqQ/z9Z"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46ZSDX0MTCz9s00 for ; Fri, 20 Sep 2019 18:53:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 38163204E0; Fri, 20 Sep 2019 08:53:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7X8fEsD+VDgy; Fri, 20 Sep 2019 08:53:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 72F762043C; Fri, 20 Sep 2019 08:53:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 714FA1BF35A for ; Fri, 20 Sep 2019 08:53:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6A68D87B21 for ; Fri, 20 Sep 2019 08:53:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TsA6RwwZzn6S for ; Fri, 20 Sep 2019 08:53:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 217CE87B20 for ; Fri, 20 Sep 2019 08:53:24 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id i18so5859011wru.11 for ; Fri, 20 Sep 2019 01:53:24 -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:mime-version :content-transfer-encoding; bh=tj3b2txrQPr81Fp49zZwhdBfcAordrJHb6CnHo4bHD8=; b=XPqQ/z9ZNFLhO5dWKLCFzHVfceCgBCuLU5IUWZ/rbd7Lhawd/ht+A8iQ0tMEB4PVIS api3bAwaYSiCyxtpGycGhP0wxtjgmZ7I6Q072fnRlJJY3JKO4hpLkIJqnpJmBalXbLNj Br6jn/edJsFLUpIUjASMuc+QsucWGE01wCumZNFDru6IG7T/YcqeX/z6K3jNPEtwSqX9 1wFx7wk/Rj401brZe8ohj+1ixn7HAkpx1onbr5VFWGKn54BZmLXXSKCdbPDfSFigB/14 L8pGJkSbJZHohLM8yJKlrDsJ4Gj48CJqZWG46Ja1DKEbGkET8p02JT16gbL4Roir8ElY DpoA== 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:mime-version :content-transfer-encoding; bh=tj3b2txrQPr81Fp49zZwhdBfcAordrJHb6CnHo4bHD8=; b=UTB+Sa4qAF4Ni6lEq7VEaWbZVpeAofcG5aZ8L/x2HjB/SItlny/ZKl3KPRLwCdhDC7 lYfUTLGseJB0xouflSaQ3eDwU1oafAX45mjBQgFcF/2SWJDn97SNuH/++ZNHoEQePCuH mHtje9KxPsett5S7gWv8TmCTGoI7WeoLvW6kjTJ9SVwnPMUIw9yhQHsFKa9xS6WdjNv1 veAwe3RL9vpUdZtadseRByo9+PwuGlp/gNU9y5KqbZlOz/jQLYAVeioBZLheZbcUcLYA lU7G/aPMyymRA+WNmATPwg+QbxRVONaM91t9fUzdwvAWsIDyNJdFTBC1wboL6i95HD7H /FSw== X-Gm-Message-State: APjAAAWySt4iW02DkcW3w97N6JWU+2YvYY5qsKnFm9hZgijQiY+0U1lB 2XCLhxDKBrMNmuJy4pCipyqxmDAxraA= X-Google-Smtp-Source: APXvYqxoUdDJY+ZqMGtRLsARyYFmpxpUk6AYWFI2bDb21NCmzUZszZV4F32BN/wSDfHthBCOFIXhMw== X-Received: by 2002:a5d:4582:: with SMTP id p2mr11548512wrq.305.1568969602338; Fri, 20 Sep 2019 01:53:22 -0700 (PDT) Received: from lano-work.andritz.com ([80.120.136.76]) by smtp.gmail.com with ESMTPSA id r20sm2391044wrg.61.2019.09.20.01.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 01:53:21 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Fri, 20 Sep 2019 10:53:14 +0200 Message-Id: <20190920085314.7816-1-nolange79@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/systemd: fix build not adding stack protector library X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Norbert Lange , "Yann E . MORIN" , Adam Duskett , Maxime Hadjinlian Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" the stack protector flag is added during compilation, but not when linking. A compiler not defaulting to ssp will complain about missing symbols upstream PR #13599 Signed-off-by: Norbert Lange --- ...ompilers-with-default-stack-protecto.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 package/systemd/0005-fix-build-with-compilers-with-default-stack-protecto.patch diff --git a/package/systemd/0005-fix-build-with-compilers-with-default-stack-protecto.patch b/package/systemd/0005-fix-build-with-compilers-with-default-stack-protecto.patch new file mode 100644 index 0000000000..d233df90da --- /dev/null +++ b/package/systemd/0005-fix-build-with-compilers-with-default-stack-protecto.patch @@ -0,0 +1,31 @@ +From e028863a2ed4b380e12a79479fc7fc13d7b3214a Mon Sep 17 00:00:00 2001 +From: Norbert Lange +Date: Thu, 19 Sep 2019 17:49:20 +0200 +Subject: [PATCH] fix build with compilers with default stack-protector enabled + +building systemd fails with a compiler that supports +-fstack-protector but does not enable it by default. +(will miss several __stack_chk_* symbols). + +fix this by also adding the switch during linking. + +Signed-off-by: Norbert Lange +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/meson.build b/meson.build +index e5ceb1e..4fc7dfa 100644 +--- a/meson.build ++++ b/meson.build +@@ -382,6 +382,7 @@ possible_cc_flags = [ + possible_link_flags = [ + '-Wl,-z,relro', + '-Wl,-z,now', ++ '-fstack-protector', + ] + + if cc.get_id() == 'clang' +-- +2.23.0 +