From patchwork Wed Nov 2 17:20:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 9409661 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 CAA2260585 for ; Wed, 2 Nov 2016 17:21:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B986D1FE83 for ; Wed, 2 Nov 2016 17:21:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE3522A493; Wed, 2 Nov 2016 17:21:20 +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,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 5F4971FE83 for ; Wed, 2 Nov 2016 17:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932674AbcKBRVT convert rfc822-to-8bit (ORCPT ); Wed, 2 Nov 2016 13:21:19 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:60273 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932526AbcKBRVS (ORCPT ); Wed, 2 Nov 2016 13:21:18 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1c1zC9-0001th-0c; Wed, 02 Nov 2016 18:19:25 +0100 From: Sebastian Andrzej Siewior To: linux-kernel@vger.kernel.org Cc: Sven Joachim , Tomas Janousek , Joe Perches , Adam Borowski , Michal Marek , linux-kbuild@vger.kernel.org, ben@decadent.org.uk, Sebastian Andrzej Siewior Subject: [PATCH 2/2] kbuild: add -fno-PIE Date: Wed, 2 Nov 2016 18:20:58 +0100 Message-Id: <20161102172058.13641-2-bigeasy@linutronix.de> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161102172058.13641-1-bigeasy@linutronix.de> References: <20161102172058.13641-1-bigeasy@linutronix.de> MIME-Version: 1.0 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 Debian started to build the gcc with -fPIE by default so the kernel build ends before it starts properly with: |kernel/bounds.c:1:0: error: code model kernel does not support PIC mode Also add to KBUILD_AFLAGSi due to: |gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d … -mfentry -DCC_USING_FENTRY … vdso/vdso32/note.S |arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in c ombination with -fpic Signed-off-by: Sebastian Andrzej Siewior --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 93beca4312c4..3e0a9afa428f 100644 --- a/Makefile +++ b/Makefile @@ -398,12 +398,12 @@ 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 KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := -KBUILD_AFLAGS := -D__ASSEMBLY__ +KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds