From patchwork Fri Aug 19 23:23:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Santa, Carlos" X-Patchwork-Id: 9291391 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 52D53607FF for ; Fri, 19 Aug 2016 23:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 313E5295DD for ; Fri, 19 Aug 2016 23:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2635B295DF; Fri, 19 Aug 2016 23:22:32 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B74D2295DD for ; Fri, 19 Aug 2016 23:22:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 418666ECA0; Fri, 19 Aug 2016 23:22:31 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E25D6ECA0 for ; Fri, 19 Aug 2016 23:22:30 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 19 Aug 2016 16:22:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,546,1464678000"; d="scan'208";a="868526295" Received: from graypixels.jf.intel.com ([10.7.201.158]) by orsmga003.jf.intel.com with ESMTP; 19 Aug 2016 16:22:30 -0700 From: Carlos Santa To: intel-gfx@lists.freedesktop.org Date: Fri, 19 Aug 2016 16:23:17 -0700 Message-Id: <1471648997-26976-1-git-send-email-carlos.santa@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH] x86, build: Set -fno-pic for 32/64-bit kernels X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Make the -fno-pic compiler flag common for both 32 and 64 bit kernels. The GCC toolchain in Android still enables -fpic by default causing the build to break. Signed-off-by: Carlos Santa --- arch/x86/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 830ed39..17af5e1 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -49,6 +49,10 @@ endif KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow KBUILD_CFLAGS += $(call cc-option,-mno-avx,) +# Never want PIC in both 32/64-bit kernel, prevent breakage with GCC built +# with nonstandard options +KBUILD_CFLAGS += -fno-pic + ifeq ($(CONFIG_X86_32),y) BITS := 32 UTS_MACHINE := i386 @@ -60,10 +64,6 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return - # Never want PIC in a 32-bit kernel, prevent breakage with GCC built - # with nonstandard options - KBUILD_CFLAGS += -fno-pic - # prevent gcc from keeping the stack 16 byte aligned KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)