Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933722AbcJXHjT convert rfc822-to-8bit (ORCPT ); Mon, 24 Oct 2016 03:39:19 -0400 Received: from mout.gmx.net ([212.227.17.20]:65469 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbcJXHjQ (ORCPT ); Mon, 24 Oct 2016 03:39:16 -0400 From: Sven Joachim To: Joe Perches Cc: Adam Borowski , Sebastian Andrzej Siewior , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, ben@decadent.org.uk Subject: Re: [RFC PATCH] kbuild: add -fno-PIE References: <20161021111600.9417-1-bigeasy@linutronix.de> <20161021212127.GA32611@angband.pl> <87eg37niky.fsf@turtle.gmx.de> <1477250598.3561.4.camel@perches.com> Date: Mon, 24 Oct 2016 09:38:49 +0200 In-Reply-To: <1477250598.3561.4.camel@perches.com> (Joe Perches's message of "Sun, 23 Oct 2016 12:23:18 -0700") Message-ID: <8760oinqly.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K0:8WvBQjA8+/7XaXXWplO/tvJnqJVEXgAjmZor/xioEennbTCA5QS 4MziJ0xSTi7rjKYx6MnwaxR1OtNTgTn4UEept6aBX5fBvxch6Y4tuobxvZKOQs0EizqpIAM drgdz7D/zWjnArpAMVJUoeaexlvUB3cyvdizzGJtEBhUHoxvFFbMH5/swiSFmEDYjEYNb5H wjO6L9bxo7UAQVxxezJOg== X-UI-Out-Filterresults: notjunk:1;V01:K0:UsSByBA+rZc=:ZbEhxPm92GLI2pauFpMNXw Ix0fko8nNAwapur1cfPjA9pmuf8IHQV6fiibEcqjPeh4K8Aj9d9mF9+YLfhjgfajW2+XaH0wS J79v4SHygEiFAibEyg1GOCWmJsyIPqEgaudARbxS9rjxyGNtsPRE53l3f3s86K6tj6Yu38Jm5 gHy3kzAbuyssFF9WFNv/lSKIZoXMVlilv5Q80gVmf8q4NGQxgCXCAeIclcuG1a+X3vOUOhJ7k dIcU6yGpbaeUUfyiU883WZ6kAp2zq55X/0LFXGV4A8Mtyqm7VbOjq12BnWmAAx+1aV1CMM9c/ Z9O7b0wzzVNh+lmFOvbdi7BqhXShmayRKrKk5Uj6JDZfte5MxWLrguUOIGc8GMMsw7G5GgmhW zinEct0//erx7/oe+w4WoIZxzOHEV/hKzkS9bpP9chlXdMxm6orbFyaKVLTyRVBJNG3j4HZYb 80+vmUD1d5+LekDEuBWBgv04UTjWJobQAhau4JWaYZ4c+b1ZRGa8vJ5F68aJr3zIoBHHHD5Ez ZGs9hrTvSn/EMKGUKJHeM80Yt/Y/26O7CxLCt6kF9Ujz6EE4F/2LORofQKWJinBnrf1BXLH3C rR2dQt1cwMlHnDJr/s4EVpyToYJDXWJI5q6+5yFHlTGX6jttoNrrWC/V96SlBq0cUlVYxyRuR sBwBCnxp2Hp242sbfu5NMsa8/j1M47v4o613iYRPajLyoKSsV8ukl7jPCj15BFVTyYpOhOwlo LwqK9q7oYL+xMnQCL/fOyx74MlG86/Nz30WFrzNbzA9K9aRQjpu8tgDaZjH4/VU9JpqO6YwEV v0ewA8l Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2550 Lines: 63 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