* [PATCH] x86, build: Set -fno-pic for 32/64-bit kernels
@ 2016-08-19 23:23 Carlos Santa
2016-08-19 23:39 ` Carlos Santa
0 siblings, 1 reply; 2+ messages in thread
From: Carlos Santa @ 2016-08-19 23:23 UTC (permalink / raw)
To: intel-gfx
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 <carlos.santa@intel.com>
---
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)
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86, build: Set -fno-pic for 32/64-bit kernels
2016-08-19 23:23 [PATCH] x86, build: Set -fno-pic for 32/64-bit kernels Carlos Santa
@ 2016-08-19 23:39 ` Carlos Santa
0 siblings, 0 replies; 2+ messages in thread
From: Carlos Santa @ 2016-08-19 23:39 UTC (permalink / raw)
To: intel-gfx
On Fri, 2016-08-19 at 16:23 -0700, Carlos Santa wrote:
> 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 <carlos.santa@intel.com>
Wrong version, please disregard this patch.
> ---
> 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)
>
thanks,
Carlos Santa
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-19 23:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 23:23 [PATCH] x86, build: Set -fno-pic for 32/64-bit kernels Carlos Santa
2016-08-19 23:39 ` Carlos Santa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox