From patchwork Mon Oct 24 07:38:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sven Joachim X-Patchwork-Id: 9391541 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4684B607D0 for ; Mon, 24 Oct 2016 07:39:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31A84287B2 for ; Mon, 24 Oct 2016 07:39:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24F2C28A95; Mon, 24 Oct 2016 07:39:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4BA8287B2 for ; Mon, 24 Oct 2016 07:39:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932354AbcJXHjR convert rfc822-to-8bit (ORCPT ); Mon, 24 Oct 2016 03:39:17 -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 Received: from localhost.localdomain ([91.19.51.98]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LtVLE-1cwyT41kwe-010tLK; Mon, 24 Oct 2016 09:38:54 +0200 Received: by localhost.localdomain (Postfix, from userid 1000) id 66EDA3F399; Mon, 24 Oct 2016 09:38:49 +0200 (CEST) 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 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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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--- --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 --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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,)