From patchwork Thu Mar 1 18:26:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 130390 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3133207edc; Thu, 1 Mar 2018 10:27:56 -0800 (PST) X-Google-Smtp-Source: AG47ELsnYz3V+HRVLTDKq834bJZ5l/i2sW3G4ZEvGVKwZV/cR7MJXCa0htniCNyiVFk9opEYP3Um X-Received: by 10.99.116.22 with SMTP id p22mr2317725pgc.132.1519928876173; Thu, 01 Mar 2018 10:27:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519928876; cv=none; d=google.com; s=arc-20160816; b=rcfQk3Yt7bANcHucQz6NBPiCAs52ZNf8VXpiSGYuCGWqhL7ha2/yaGbAAepbNca2rK xKZ75Bt3Az58hB9zlU+97IA/4XOOm48Y1WxAtFLqhIrDkRNfTUbs+hN80gbOWf/D0rNW mCIDoDsKZX4xG9VPbLCrjbsZWlILAxa/0hF62c/pMNFBRNXcHkKaeq+ZdrTUBA5W4oVv bT5iTicu+IQjoB04D5TX3ivEQZvaHDemBeO0ZWH+LuOz5Ha4u8yL7XpAIFMEi8j2HuIE GoBJcTPbUFwrKU/o9iXzJuEJk/FmyiecCLHqz50diRjvpwHLaHy2LJnO2Am8aaS3qp13 bJbw== 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=SDybbV3FIEi0c6KaiiKFEKLdFqNzhJYprwZIUz1pj2k=; b=GfhhCY8XIQ4RfAeSxoMC3o4TYUgbx/lfwLCeOH1BRwpdkAWBy4Bggj0kSJN7XRRPF/ CGWDD04g7SBtI7x/VAJAhka0A8aCTnRCT2Xxvz/0CiG9YHjvGCLRT1DcVr+h3zn1fe9d wcUVyKz2wqGtkii8iAHG+FiwN3bzW1x3GFUDxY7WCMdG12zYWX3J71oxu2KJDC8j0ojf O+BFuEh7VM5syIToIoXEWBPFQoOdCEFY/b0LXBQ+js4WHSEKku2HZAUhpUslhb//5riQ QrgtwzkmqzwFJCHFP8EBzlcr19OXxEYaY+L6tVEuBi7Oj/zB/LP5P8LcXm3X0B6HXcUG g9Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=hGVtid6R; 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 Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id k71si2755217pgc.453.2018.03.01.10.27.55; Thu, 01 Mar 2018 10:27:56 -0800 (PST) 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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=hGVtid6R; 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 Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 51C8C7890C; Thu, 1 Mar 2018 18:27:02 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by mail.openembedded.org (Postfix) with ESMTP id E8740788F1 for ; Thu, 1 Mar 2018 18:26:51 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id m5so7595083wrg.1 for ; Thu, 01 Mar 2018 10:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M9yflCopJZVXrvF7F3K+Tn+QNJmvmIrp31AubhSMYYI=; b=hGVtid6R6ue+JpkIrrMIXASyPEYHB/kb8kwG3SW0v58MmDcc3LNiky+uW9Bz0EJZkZ 6S/X4o82+QZoQFOiH0F3UaU+VKR84GMTZuceJknels4U+960/Wq49XZ5TdsX/QwQge8m a/Lf+3TIxNwowfBVN/L/bYarQdYXpw5jZfXGREgvITWPFFSeocRfjoRR+XPRqn8C5zWo Wsf+cbqJo4hOHS+sgem7aVBfigYIMhYAjlyVMrmhQiy1dWl8B9CjYihxN4e8lA1gf1uU laS6BmnfCMeaJnk3Bb9WZf90+FywX5sk6TXR1tGzgcmas0A3lOPTtNiCTzRmhT3Yl6Hu JJ6A== 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=M9yflCopJZVXrvF7F3K+Tn+QNJmvmIrp31AubhSMYYI=; b=naNOJ/itXyaZl6p1hhWXY3rCi0yEIj+4dh8PZVwWXilyMcUOOkPql8+N+CuorIr1vZ y71mJzjBwGRe6PORSWxJF7S9YswaDeZMk5Dy+TiUn7athJZIDjeD+bSdTvv9E9ta95xM wJdG4V2sA4+AAxQAT3Ri0XcGoCsJLEO55MGeAHxTsA/slxarEUETergpZIuZBhMQDi7M Ka7AnJAIZLnQ9IQftMPcrtKt5dW001t/vQvtoBnK26TILPmipDXUwH26bCAEcLaDkP5P 9ObIMORMrnCZg8h5raOc1ud1QCfhgT3WoFL2zM8cVDq98fqHslnJdWIW3VZHm4D2BzZa 5oZA== X-Gm-Message-State: APf1xPA0mvsmXCxFEttMwvF7xUuJyzIokgAVNQEstbwO25DblmiKVoNA yIimMMx6yscoog9N0c5WMEUzqY6c X-Received: by 10.223.134.136 with SMTP id 8mr2654170wrx.86.1519928812290; Thu, 01 Mar 2018 10:26:52 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id h188sm4955285wmf.23.2018.03.01.10.26.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 10:26:51 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 1 Mar 2018 18:26:34 +0000 Message-Id: <20180301182634.20502-11-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180301182634.20502-1-ross.burton@intel.com> References: <20180301182634.20502-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 11/11] glibc: Enable static PIE support when security_flags are enabled 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 From: Khem Raj Signed-off-by: Khem Raj Signed-off-by: Ross Burton --- meta/conf/distro/include/security_flags.inc | 2 ++ meta/recipes-core/glibc/glibc_2.27.bb | 3 +++ 2 files changed, 5 insertions(+) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc index 49d2417a882..d66dd576493 100644 --- a/meta/conf/distro/include/security_flags.inc +++ b/meta/conf/distro/include/security_flags.inc @@ -6,6 +6,7 @@ # in the DISTRO="poky-lsb" configuration. GCCPIE ?= "--enable-default-pie" +GLIBCPIE ?= "--enable-static-pie" # _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use # -O0 which then results in a compiler warning. @@ -30,6 +31,7 @@ SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro" SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_NOPIE_CFLAGS}" SECURITY_CFLAGS_pn-libgcc_powerpc = "" GCCPIE_powerpc = "" +GLIBCPIE_powerpc = "" # arm specific security flag issues SECURITY_CFLAGS_pn-glibc = "" diff --git a/meta/recipes-core/glibc/glibc_2.27.bb b/meta/recipes-core/glibc/glibc_2.27.bb index 2434c061056..bcc1acfbc28 100644 --- a/meta/recipes-core/glibc/glibc_2.27.bb +++ b/meta/recipes-core/glibc/glibc_2.27.bb @@ -69,6 +69,8 @@ GLIBC_BROKEN_LOCALES = "" # COMPATIBLE_HOST_libc-musl_class-target = "null" +GLIBCPIE ??= "" + EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ --without-cvs --disable-profile \ --disable-debug --without-gd \ @@ -82,6 +84,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ --enable-bind-now \ --enable-stack-protector=strong \ --enable-stackguard-randomization \ + ${GLIBCPIE} \ ${GLIBC_EXTRA_OECONF}" EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"