mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot for basile@opensource.dyc.edu" <basile@opensource.dyc.edu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	mail@cleeus.de, zorry@gentoo.org, akpm@linux-foundation.org,
	basile@opensource.dyc.edu, tglx@linutronix.de,
	hpa@linux.intel.com
Subject: [tip:x86/urgent] x86, build: Disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y
Date: Mon, 13 Sep 2010 23:00:56 GMT	[thread overview]
Message-ID: <tip-08c2b394b98786ebb067e2a54d08f1f6f0d247da@git.kernel.org> (raw)
In-Reply-To: <20100913101319.748A1148E216@opensource.dyc.edu>

Commit-ID:  08c2b394b98786ebb067e2a54d08f1f6f0d247da
Gitweb:     http://git.kernel.org/tip/08c2b394b98786ebb067e2a54d08f1f6f0d247da
Author:     basile@opensource.dyc.edu <basile@opensource.dyc.edu>
AuthorDate: Mon, 13 Sep 2010 06:13:19 -0400
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 13 Sep 2010 15:53:16 -0700

x86, build: Disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y

The arch/x86/Makefile uses scripts/gcc-x86_$(BITS)-has-stack-protector.sh
to check if cc1 supports -fstack-protector.  When -fPIE is passed to cc1,
these scripts fail causing stack protection to be disabled even when it
is available.

This fix is similar to commit c47efe5548abbf53c2f66e06dcb46183b11d6b22

Reported-by: Kai Dietrich <mail@cleeus.de>
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
LKML-Reference: <20100913101319.748A1148E216@opensource.dyc.edu>
Signed-off-by: Anthony G. Basile <basile@opensource.dyc.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 8aa1b59..e8c8881 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -74,7 +74,7 @@ endif
 
 ifdef CONFIG_CC_STACKPROTECTOR
 	cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
-        ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(biarch)),y)
+        ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(KBUILD_CPPFLAGS) $(biarch)),y)
                 stackp-y := -fstack-protector
                 KBUILD_CFLAGS += $(stackp-y)
         else

      reply	other threads:[~2010-09-13 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 10:13 [PATCH] fix cc1 options to disable " basile
2010-09-13 23:00 ` tip-bot for basile@opensource.dyc.edu [this message]

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=tip-08c2b394b98786ebb067e2a54d08f1f6f0d247da@git.kernel.org \
    --to=basile@opensource.dyc.edu \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mail@cleeus.de \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=zorry@gentoo.org \
    /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

Powered by JetHome