From patchwork Fri Oct 21 11:16:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 9388723 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 5F9C7607F0 for ; Fri, 21 Oct 2016 11:16:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 521A72A0AE for ; Fri, 21 Oct 2016 11:16:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46C5B2A0B1; Fri, 21 Oct 2016 11:16:16 +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 BD4152A0AE for ; Fri, 21 Oct 2016 11:16:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754802AbcJULQM (ORCPT ); Fri, 21 Oct 2016 07:16:12 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51554 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754127AbcJULQL (ORCPT ); Fri, 21 Oct 2016 07:16:11 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1bxXmq-00011j-7O; Fri, 21 Oct 2016 13:14:56 +0200 From: Sebastian Andrzej Siewior To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, ben@decadent.org.uk, Sebastian Andrzej Siewior Subject: [RFC PATCH] kbuild: add -fno-PIE Date: Fri, 21 Oct 2016 13:16:00 +0200 Message-Id: <20161021111600.9417-1-bigeasy@linutronix.de> X-Mailer: git-send-email 2.9.3 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 --enable-default-pie 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 Is this okay or do we want some kind of check to see if -fno-PIE is supported? It is mentioned in the 4.4.7 gcc manpage is it is not *that* new :) Signed-off-by: Sebastian Andrzej Siewior --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf6e44a421df..97296d66b586 100644 --- 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 KBUILD_AFLAGS_KERNEL :=