All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Joachim <svenjoac@gmx.de>
To: Joe Perches <joe@perches.com>
Cc: Adam Borowski <kilobyte@angband.pl>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Michal Marek <mmarek@suse.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	ben@decadent.org.uk
Subject: Re: [RFC PATCH] kbuild: add -fno-PIE
Date: Mon, 24 Oct 2016 09:38:49 +0200	[thread overview]
Message-ID: <8760oinqly.fsf@turtle.gmx.de> (raw)
In-Reply-To: <1477250598.3561.4.camel@perches.com> (Joe Perches's message of "Sun, 23 Oct 2016 12:23:18 -0700")

On 2016-10-23 12:23 -0700, Joe Perches wrote:

> On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote:
>> On 2016-10-21 23:21 +0200, Adam Borowski wrote:
>> > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote:
>> > > Debian started to build the gcc with --enable-default-pie by default
> []
>> > > diff --git a/Makefile b/Makefile
> []
>> > > @@ -398,7 +398,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__
>> > >  KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
>> > >  		   -fno-strict-aliasing -fno-common \
>> > >  		   -Werror-implicit-function-declaration \
>> > > -		   -Wno-format-security \
>> > > +		   -Wno-format-security -fno-PIE \
>> > >  		   -std=gnu89
>
> I've used this here instead:
>
> KBUILD_CFLAGS  += $(call cc-option,-fno-pie)

Where exactly do you set that?  I tried this patch:

--8<---------------cut here---------------start------------->8---
diff --git a/Makefile b/Makefile
index 93beca4..fde1e21 100644
--- a/Makefile
+++ b/Makefile
@@ -619,6 +619,7 @@ ARCH_AFLAGS :=
 ARCH_CFLAGS :=
 include arch/$(SRCARCH)/Makefile
 
+KBUILD_CFLAGS	+= $(call cc-option,-fno-pie,)
 KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
 KBUILD_CFLAGS	+= $(call cc-disable-warning,maybe-uninitialized,)
 KBUILD_CFLAGS	+= $(call cc-disable-warning,frame-address,)
--8<---------------cut here---------------end--------------->8---

But make still fails with it. :-(

,----
| $ LANG=C make      
| scripts/kconfig/conf  --silentoldconfig Kconfig
|   SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
|   SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_32_ia32.h
|   SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_64_x32.h
|   SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_64.h
|   SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
|   SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
|   SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
|   HOSTCC  arch/x86/tools/relocs_32.o
|   HOSTCC  arch/x86/tools/relocs_64.o
|   HOSTCC  arch/x86/tools/relocs_common.o
|   HOSTLD  arch/x86/tools/relocs
|   CHK     include/config/kernel.release
|   UPD     include/config/kernel.release
| Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong available but compiler is broken
| Makefile:1066: recipe for target 'prepare-compiler-check' failed
| make: *** [prepare-compiler-check] Error 1
`----

Cheers,
       Sven

  reply	other threads:[~2016-10-24  7:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 11:16 [RFC PATCH] kbuild: add -fno-PIE Sebastian Andrzej Siewior
2016-10-21 21:21 ` Adam Borowski
2016-10-23 16:19   ` Sven Joachim
2016-10-23 19:23     ` Joe Perches
2016-10-24  7:38       ` Sven Joachim [this message]
2016-10-24  7:43         ` Sebastian Andrzej Siewior
2016-10-24 17:32           ` Sven Joachim
2016-10-24 17:32             ` Sven Joachim
2016-10-24 17:48             ` Joe Perches
2016-10-25  7:30             ` Sebastian Andrzej Siewior
2016-10-26 17:51               ` Sven Joachim
2016-10-27  7:28                 ` Sebastian Andrzej Siewior
2016-10-28 23:00                   ` Andrew Morton
2016-10-29 10:10             ` Tomas Janousek
2016-10-29 17:03               ` Sven Joachim
2016-10-29 19:21                 ` Tomas Janousek
2016-10-29 21:18                   ` Sven Joachim
2016-10-24  9:57         ` Joe Perches
2016-10-27 17:09 ` Shuah Khan
2016-10-28  8:09   ` Sebastian Andrzej Siewior

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=8760oinqly.fsf@turtle.gmx.de \
    --to=svenjoac@gmx.de \
    --cc=ben@decadent.org.uk \
    --cc=bigeasy@linutronix.de \
    --cc=joe@perches.com \
    --cc=kilobyte@angband.pl \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.