summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Config.in15
-rw-r--r--toolchain/Makefile28
-rw-r--r--toolchain/binutils/Makefile6
-rw-r--r--toolchain/gcc/Makefile37
-rw-r--r--toolchain/gcc/patches/4.8.2/abi32.patch54
5 files changed, 28 insertions, 112 deletions
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 6a41140b8..f80c44841 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -44,18 +44,11 @@ config ADK_TOOLCHAIN_USE_GOLD
depends on ADK_TOOLCHAIN_GOLD
default n
-choice
-prompt "Use ARM thumb mode"
-depends on ADK_CPU_CORTEX_A9
-
-config ADK_LINUX_ARM_WITHOUT_THUMB
- boolean "disabled"
- select ADK_mode_arm
-
config ADK_LINUX_ARM_WITH_THUMB
- boolean "enabled"
- select ADK_mode_thumb
+ prompt "Use THUMB2 ARM mode"
+ boolean
+ depends on ADK_CPU_CORTEX_A9 && ADK_TARGET_LIB_GLIBC
select ADK_KERNEL_THUMB2_KERNEL
+ default n
-endchoice
endmenu
diff --git a/toolchain/Makefile b/toolchain/Makefile
index d37117272..d0922507f 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -18,15 +18,15 @@ include $(TOPDIR)/rules.mk
TARGETS:=binutils gmp mpfr mpc libelf gcc
ifeq ($(ADK_TARGET_LIB_GLIBC),y)
TARGETS+=glibc
-LIBC:=glibc
+CLIB:=glibc
endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
TARGETS+=uclibc
-LIBC:=uclibc
+CLIB:=uclibc
endif
ifeq ($(ADK_TARGET_LIB_MUSL),y)
TARGETS+=musl
-LIBC:=musl
+CLIB:=musl
endif
ifeq ($(ADK_TOOLCHAIN_GDB),y)
TARGETS+=gdb
@@ -34,7 +34,7 @@ endif
DOWNLOAD:=kernel-headers-download $(patsubst %,%-download,$(TARGETS))
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
-FIXUP:=$(patsubst %,%-fixup,$(LIBC))
+FIXUP:=$(patsubst %,%-fixup,$(CLIB))
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
install: $(TARGETS_INSTALL)
@@ -43,14 +43,14 @@ download: $(DOWNLOAD)
fixup: $(FIXUP)
gcc-prepare: binutils-install gmp-install mpfr-install mpc-install libelf-install
-$(LIBC)-prepare: gcc-prepare kernel-headers-prepare
-gcc-configure: $(LIBC)-prepare
-$(LIBC)-compile: gcc-configure
-gcc-compile: $(LIBC)-install
+$(CLIB)-prepare: gcc-prepare kernel-headers-prepare
+gcc-configure: $(CLIB)-prepare
+$(CLIB)-compile: gcc-configure
+gcc-compile: $(CLIB)-install
ifeq ($(ADK_TOOLCHAIN_GDB),y)
-$(LIBC)-fixup: gcc-install gdb-install
+$(CLIB)-fixup: gcc-install gdb-install
else
-$(LIBC)-fixup: gcc-install
+$(CLIB)-fixup: gcc-install
endif
%-download:
@@ -59,7 +59,7 @@ endif
%-prepare:
$(TRACE) toolchain/$(patsubst %-prepare,%,$@)/prepare
- @if test x"$(patsubst %-prepare,%,$@)" = x"$(LIBC)"; then \
+ @if test x"$(patsubst %-prepare,%,$@)" = x"$(CLIB)"; then \
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare \
$(MAKE_TRACE); \
else \
@@ -70,7 +70,7 @@ endif
%-configure: %-prepare
$(TRACE) toolchain/$(patsubst %-configure,%,$@)/configure
- @if test x"$(patsubst %-configure,%,$@)" = x"$(LIBC)"; then \
+ @if test x"$(patsubst %-configure,%,$@)" = x"$(CLIB)"; then \
$(MAKE) -C $(patsubst %-configure,%,$@) configure \
$(MAKE_TRACE); \
else \
@@ -81,7 +81,7 @@ endif
%-compile: %-configure
$(TRACE) toolchain/$(patsubst %-compile,%,$@)/compile
- @if test x"$(patsubst %-compile,%,$@)" = x"$(LIBC)"; then \
+ @if test x"$(patsubst %-compile,%,$@)" = x"$(CLIB)"; then \
$(MAKE) -C $(patsubst %-compile,%,$@) compile \
$(MAKE_TRACE); \
else \
@@ -92,7 +92,7 @@ endif
%-install: %-compile
$(TRACE) toolchain/$(patsubst %-install,%,$@)/install
- @if test x"$(patsubst %-install,%,$@)" = x"$(LIBC)"; then \
+ @if test x"$(patsubst %-install,%,$@)" = x"$(CLIB)"; then \
$(MAKE) -C $(patsubst %-install,%,$@) install \
$(MAKE_TRACE); \
else \
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 8947ee77e..0a41fc9f3 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -24,11 +24,7 @@ else
CONFOPTS+= --disable-gold
endif
-ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
-CONFOPTS+= --with-arch=armv6
-endif
-
-ifneq ($(ADK_LINUX_64),)
+ifneq ($(ADK_LINUX_64)$(ADK_TARGET_KERNEL_64),)
CONFOPTS+= --enable-64-bit-bfd
endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 63d0237c3..0d309b60f 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
@@ -82,30 +87,6 @@ else
GCC_CONFOPTS+= --enable-target-optspace
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
-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
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
-+<http://www.gnu.org/licenses/>. */
-+
-+#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"
- ;;