From 96b68fb7047d2d355a6d3cc8409a0f1db95acec9 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 30 Apr 2014 01:07:06 +0200 Subject: fix 32 bit userland with 64 bit kernel support after onger discussion with Phil, I understood his old patches and fixed support for x86 systems with 32 Bit userland and 64 Bit kernel by using a biarch toolchain instead of a multilib one. --- toolchain/gcc/Makefile | 13 +++++--- toolchain/gcc/patches/4.8.2/abi32.patch | 54 --------------------------------- 2 files changed, 9 insertions(+), 58 deletions(-) delete mode 100644 toolchain/gcc/patches/4.8.2/abi32.patch (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 63d0237c3..12ad4ebca 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -35,7 +35,7 @@ GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \ --disable-nls GCC_FINAL_CONFOPTS:= -ifeq ($(ADK_LINUX_SH)$(ADK_LINUX_X86_64),) +ifeq ($(ADK_LINUX_SH)$(ADK_LINUX_X86_64)$(ADK_LINUX_X86),) GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib endif @@ -48,13 +48,18 @@ endif GCC_FINAL_CONFOPTS+= --enable-multilib --with-multilib-list=m4,m4-nofpu endif +ifeq ($(ADK_LINUX_X86),y) +ifeq ($(ADK_TARGET_KERNEL_64),y) +GCC_FINAL_CONFOPTS+= --enable-biarch --enable-targets=all --disable-multilib +else +GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib +endif +endif + ifeq ($(ADK_LINUX_X86_64),y) ifeq ($(ADK_x32),y) GCC_FINAL_CONFOPTS+= --with-abi=x32 endif -ifeq ($(ADK_32),y) -GCC_FINAL_CONFOPTS+= --with-abi=32 -endif ifeq ($(ADK_64),y) GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib endif diff --git a/toolchain/gcc/patches/4.8.2/abi32.patch b/toolchain/gcc/patches/4.8.2/abi32.patch deleted file mode 100644 index 856d608bd..000000000 --- a/toolchain/gcc/patches/4.8.2/abi32.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -Nur gcc-4.8.2.orig/gcc/config/i386/biarch32.h gcc-4.8.2/gcc/config/i386/biarch32.h ---- gcc-4.8.2.orig/gcc/config/i386/biarch32.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.8.2/gcc/config/i386/biarch32.h 2014-03-23 20:33:52.000000000 +0100 -@@ -0,0 +1,27 @@ -+/* Make configure files to produce biarch compiler defaulting to 32bit mode. -+ This file must be included very first, while the OS specific file later -+ to overwrite otherwise wrong defaults. -+ Copyright (C) 2001-2014 Free Software Foundation, Inc. -+ -+This file is part of GCC. -+ -+GCC is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 3, or (at your option) -+any later version. -+ -+GCC is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+Under Section 7 of GPL version 3, you are granted additional -+permissions described in the GCC Runtime Library Exception, version -+3.1, as published by the Free Software Foundation. -+ -+You should have received a copy of the GNU General Public License and -+a copy of the GCC Runtime Library Exception along with this program; -+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -+. */ -+ -+#define TARGET_64BIT_DEFAULT 0 -diff -Nur gcc-4.8.2.orig/gcc/config.gcc gcc-4.8.2/gcc/config.gcc ---- gcc-4.8.2.orig/gcc/config.gcc 2013-10-03 02:47:24.000000000 +0200 -+++ gcc-4.8.2/gcc/config.gcc 2014-03-22 13:15:18.000000000 +0100 -@@ -522,6 +522,9 @@ - 64 | m64) - tm_file="i386/biarch64.h ${tm_file}" - ;; -+ 32 | m32) -+ tm_file="i386/biarch32.h ${tm_file}" -+ ;; - x32 | mx32) - tm_file="i386/biarchx32.h ${tm_file}" - ;; -@@ -1343,6 +1346,9 @@ - x32 | mx32) - x86_multilibs="mx32" - ;; -+ 32 | m32) -+ x86_multilibs="m32" -+ ;; - *) - x86_multilibs="m64,m32" - ;; -- cgit v1.2.3 From 999c0d4d60937174ad592d3992e608415ff91a20 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 30 Apr 2014 01:37:52 +0200 Subject: rework thumb2 support do not change gcc defaults, discussed with phil, make the resulting toolchains more conform. --- toolchain/gcc/Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 12ad4ebca..7616f2ab3 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -89,7 +89,6 @@ endif ifeq ($(ARCH),arm) GCC_CONFOPTS+= --with-float=$(ADK_TARGET_FLOAT) -GCC_CONFOPTS+= --with-mode=$(ADK_TARGET_ARM_MODE) ifneq ($(ADK_TARGET_FPU),) GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU) endif -- cgit v1.2.3 From 5d154bde3abbae5a275b3627c5f5dbbcc9b6d55b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 3 May 2014 13:00:17 +0200 Subject: as discussed with phil, do not default toolchain to a specific cpu, we have -fhonour-copts, to detect when CFLAGS are not used --- toolchain/gcc/Makefile | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 7616f2ab3..0d309b60f 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -87,29 +87,6 @@ else GCC_CONFOPTS+= --enable-target-optspace endif -ifeq ($(ARCH),arm) -GCC_CONFOPTS+= --with-float=$(ADK_TARGET_FLOAT) -ifneq ($(ADK_TARGET_FPU),) -GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU) -endif -endif - -ifeq ($(ADK_CPU_ARM926EJ_S),y) -GCC_CONFOPTS+= --with-arch=armv5te --with-tune=arm1176jzf-s -endif - -ifeq ($(ADK_CPU_ARM1176JZF_S),y) -GCC_CONFOPTS+= --with-arch=armv6 --with-tune=arm1176jzf-s -endif - -ifeq ($(ADK_CPU_CORTEX_A9),y) -GCC_CONFOPTS+= --with-arch=armv7-a --with-tune=cortex-a9 -endif - -ifeq ($(ADK_CPU_SPARC_V9),y) -GCC_CONFOPTS+= --with-cpu=ultrasparc -endif - ifneq ($(ADK_TARGET_MIPS_ABI),) GCC_CONFOPTS+= --with-abi=${ADK_TARGET_MIPS_ABI} endif -- cgit v1.2.3