ARC port
v3 cover ARC port
Hi all,
Now that 3.9 has been released, ARC doesn't depend on its own kernel anymore. This is reflected in the patch set, furthermore, bison/flex host dependencies have been removed (thanks to Thomas for his input).
The GCC version architecture dependency cleanup patch is not really related to ARC, and I will come with a proposal as a separate patch.
The patch set is also published on our github site:
https://github.com/foss-for-synopsys-dwc-arc-processors/buildroot
Changes in v3:
* removed GCC arch-dependency cleanup patch (should be discussed separately)
* 3.9-rc8-->3.9 kernel headers
* Added bison/flex host dependencies
Changes in v2:
* BR2_ARC_SITE hardcoded now, and moved to Config.in.arc
* makeinfo dependency removed from binutils
* Added 3.9-rc8 kernel headers
* Patches split where suggested
* Removed ARC-specific uClibc config
* Moved ARC-specific binutils out of the choice menu
* Introduced explicit BR2_arcel, BR2_arceb symbols a la microblaze
* Added a patch that cleans up GCC architecture dependencies
* Fixed patches for binutils, gcc
Mischa Jonker (11):
arc: Add ARC and ARC BE architecture
arc: Add option for ARC-specific download site
arc: Add support for ARC-specific binutils
arc: disable Crosstool-NG for ARC
arc: add gcc for ARC
arc: Add support for ARC-specific uClibc
arc: Make sure that libgcc doesn't get included when it doesn't exist
yet
toolchain/gcc: Only enable --with-float when it makes sense toolchain/toolchain-buildroot: Disable NPTL for ARC
arc: Add arc, arcbe to gnuconfig
kernel-headers: Add support for ARC kernel headers
Makefile | 1 + arch/Config.in | 18 +++++ arch/Config.in.arc | 18 +++++ .../binutils/2.19-arc/add-empty-info-files.patch | 72 ++++++++++++++++++++ package/binutils/Config.in.host | 2 + package/binutils/binutils.mk | 7 ++ support/gnuconfig/config.sub | 4 +- toolchain/Config.in | 2 +- .../gcc/4.4.7-arc/fix_branch_out_of_range.patch | 30 ++++++++ toolchain/gcc/Config.in | 22 ++++-- toolchain/gcc/gcc-uclibc-4.x.mk | 5 ++ toolchain/kernel-headers/Config.in | 14 +++-- toolchain/toolchain-buildroot/Config.in.2 | 1 + toolchain/uClibc/Config.in | 10 ++- toolchain/uClibc/uClibc-snapshot.config | 2 + toolchain/uClibc/uclibc.mk | 19 +++++- 16 files changed, 207 insertions(+), 20 deletions(-) create mode 100644 arch/Config.in.arc create mode 100644 package/binutils/2.19-arc/add-empty-info-files.patch create mode 100644 toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch
PATCH v3 1/11 arc: Add ARC and ARC BE architecture
Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs that can be used from deeply embedded to high performance host applications.
--- arch/Config.in | 18 ++++++++++++++++++ arch/Config.in.arc | 14 ++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 arch/Config.in.arc
arch/Config.in +18 -0
@@ -7,6 +7,20 @@ choice help Select the target architecture family to build for. +config BR2_arcle + bool "ARC (little endian)" + help + Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs + that can be used from deeply embedded to high performance host + applications. Little endian. + +config BR2_arceb + bool "ARC (big endian)" + help + Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs + that can be used from deeply embedded to high performance host + applications. Big endian. + config BR2_arm bool "ARM (little endian)" help
@@ -175,6 +189,10 @@ config BR2_GCC_TARGET_ABI config BR2_GCC_TARGET_CPU string +if BR2_arcle || BR2_arceb +source "arch/Config.in.arc" +endif + if BR2_arm || BR2_armeb source "arch/Config.in.arm" endif
arch/Config.in.arc new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_ARCH + default "arc" if BR2_arcle + default "arceb" if BR2_arceb + +config BR2_arc + bool + default y if BR2_arcle || BR2_arceb + +config BR2_ENDIAN + default "LITTLE" if BR2_arcle + default "BIG" if BR2_arceb + +config BR2_GCC_TARGET_CPU + default "arc700"
Signature · 1 line
1.7.0.4
PATCH v3 2/11 arc: Add option for ARC-specific download site
In reply to Mischa JonkerAs ARC support is not yet in all upstream packages, a different location is required to download the packages from. This adds an option to specify a site for ARC-specific versions of packages such as binutils, gcc.
When ARC support has been upstreamed for all packages, this option can be removed again.
--- arch/Config.in.arc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/Config.in.arc +4 -0
@@ -12,3 +12,7 @@ config BR2_ENDIAN config BR2_GCC_TARGET_CPU default "arc700" + +config BR2_ARC_SITE + string + default "http://www.synopsys.com/apps/arc-developer/"
Signature · 1 line
1.7.0.4
PATCH v3 3/11 arc: Add support for ARC-specific binutils
In reply to Mischa JonkerARC support is not upstream yet...
package/binutils: add host-{flex,bison} dependencies for 2.19-arc
--- .../binutils/2.19-arc/add-empty-info-files.patch | 72 ++++++++++++++++++++ package/binutils/Config.in.host | 2 + package/binutils/binutils.mk | 7 ++ 3 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 package/binutils/2.19-arc/add-empty-info-files.patch
package/binutils/2.19-arc/add-empty-info-files.patch new file +72 -0
@@ -0,0 +1,72 @@ +binutils: add empty info files to remove makeinfo dependency + +Signed-off-by: Mischa jonker <[email protected]> +--- + bfd/doc/bfd.info | 1 + + binutils/doc/binutils.info | 1 + + etc/configure.info | 1 + + etc/standards.info | 1 + + gas/doc/as.info | 1 + + gprof/gprof.info | 1 + + ld/ld.info | 1 + + 7 files changed, 7 insertions(+), 0 deletions(-) + create mode 100644 bfd/doc/bfd.info + create mode 100644 binutils/doc/binutils.info + create mode 100644 etc/configure.info + create mode 100644 etc/standards.info + create mode 100644 gas/doc/as.info + create mode 100644 gprof/gprof.info + create mode 100644 ld/ld.info + +diff --git a/bfd/doc/bfd.info b/bfd/doc/bfd.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/bfd/doc/bfd.info +@@ -0,0 +1 @@ ++ +diff --git a/binutils/doc/binutils.info b/binutils/doc/binutils.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/binutils/doc/binutils.info +@@ -0,0 +1 @@ ++ +diff --git a/etc/configure.info b/etc/configure.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/etc/configure.info +@@ -0,0 +1 @@ ++ +diff --git a/etc/standards.info b/etc/standards.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/etc/standards.info +@@ -0,0 +1 @@ ++ +diff --git a/gas/doc/as.info b/gas/doc/as.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/gas/doc/as.info +@@ -0,0 +1 @@ ++ +diff --git a/gprof/gprof.info b/gprof/gprof.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/gprof/gprof.info +@@ -0,0 +1 @@ ++ +diff --git a/ld/ld.info b/ld/ld.info +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/ld/ld.info +@@ -0,0 +1 @@ ++ +-- +1.7.0.4 +
package/binutils/Config.in.host +2 -0
@@ -2,6 +2,7 @@ comment "Binutils Options" choice prompt "Binutils Version" + depends on !BR2_arc default BR2_BINUTILS_VERSION_2_21 if (BR2_mips || BR2_mipsel || BR2_sh) default BR2_BINUTILS_VERSION_2_21_1 if (!BR2_UCLIBC_VERSION_0_9_31) default BR2_BINUTILS_VERSION_2_21
@@ -41,6 +42,7 @@ endchoice config BR2_BINUTILS_VERSION string default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1 + default "2.19-arc" if BR2_arc default "2.20.1" if BR2_BINUTILS_VERSION_2_20_1 default "2.21" if BR2_BINUTILS_VERSION_2_21 default "2.21.1" if BR2_BINUTILS_VERSION_2_21_1
package/binutils/binutils.mk +7 -0
@@ -26,6 +26,9 @@ BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils ifeq ($(ARCH),avr32) BINUTILS_SITE = ftp://www.at91.com/pub/buildroot endif +ifeq ($(BR2_arc),y) +BINUTILS_SITE = $(BR2_ARC_SITE) +endif BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS)) BINUTILS_INSTALL_STAGING = YES BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
@@ -52,7 +55,11 @@ HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ --with-sysroot=$(STAGING_DIR) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) +ifeq ($(BINUTILS_VERSION),2.19-arc) +HOST_BINUTILS_DEPENDENCIES = host-flex host-bison +else HOST_BINUTILS_DEPENDENCIES = +endif # We just want libbfd and libiberty, not the full-blown binutils in staging define BINUTILS_INSTALL_STAGING_CMDS
Signature · 1 line
1.7.0.4
PATCH v3 4/11 arc: disable Crosstool-NG for ARC
In reply to Mischa Jonker--- toolchain/Config.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
toolchain/Config.in +1 -1
@@ -22,7 +22,7 @@ config BR2_TOOLCHAIN_EXTERNAL config BR2_TOOLCHAIN_CTNG bool "Crosstool-NG toolchain" - depends on !BR2_microblaze && !BR2_aarch64 && !BR2_xtensa + depends on !BR2_microblaze && !BR2_aarch64 && !BR2_xtensa && !BR2_arc select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS help Say 'y' if you want to generate the toolchain with crosstool-NG
Signature · 1 line
1.7.0.4
PATCH v3 5/11 arc: add gcc for ARC
In reply to Mischa JonkerARC needs a specific GCC for now, while we wait for ARC support to get upstreamed.
--- .../gcc/4.4.7-arc/fix_branch_out_of_range.patch | 30 ++++++++++++++++++++ toolchain/gcc/Config.in | 22 +++++++++----- toolchain/gcc/gcc-uclibc-4.x.mk | 2 + 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch
toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch new file +30 -0
@@ -0,0 +1,30 @@ +arc: Fix operand-out-of-range errors + +brcc_s instructions can generate operand-out-of-range errors. While a +better solution is being discussed by the compiler team, this workaround +ensures that the chances of running into this issue are low. + +Signed-off-by: Mischa Jonker <[email protected]> + +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index ff602c0..b3ca4c4 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -6565,7 +6565,7 @@ estimate required size increase). + rtx *ccp = &XEXP (XVECEXP (pat, 0, 1), 0); + + offset = branch_dest (insn) - INSN_ADDRESSES (INSN_UID (insn)); +- if ((offset >= -140 && offset < 140) ++ if ((offset >= -120 && offset < 120) + && rtx_equal_p (XEXP (op, 1), const0_rtx) + && compact_register_operand (XEXP (op, 0), VOIDmode) + && equality_comparison_operator (op, VOIDmode)) +@@ -6687,7 +6687,7 @@ estimate required size increase). + + if (op0 != cmp0) + cc_clob_rtx = gen_rtx_REG (CC_ZNmode, CC_REG); +- else if ((offset >= -140 && offset < 140) ++ else if ((offset >= -120 && offset < 120) + && rtx_equal_p (op1, const0_rtx) + && compact_register_operand (op0, VOIDmode) + && (GET_CODE (op) == EQ
toolchain/gcc/Config.in +14 -8
@@ -9,44 +9,49 @@ choice prompt "GCC compiler Version" default BR2_GCC_VERSION_4_4_X if BR2_sparc_sparchfleon || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleon || BR2_sparc_sparcsfleonv8 default BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 if BR2_avr32 + default BR2_GCC_VERSION_4_4_7_ARC if BR2_arc default BR2_GCC_VERSION_4_7_X help Select the version of gcc you wish to use. + config BR2_GCC_VERSION_4_4_7_ARC + depends on BR2_arc + bool "gcc 4.4.7-arc" + config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 depends on BR2_avr32 bool "gcc 4.2.2-avr32-2.1.5" config BR2_GCC_VERSION_4_3_X - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 bool "gcc 4.3.x" config BR2_GCC_VERSION_4_4_X - depends on !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 + depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 bool "gcc 4.4.x" config BR2_GCC_VERSION_4_5_X - depends on !BR2_avr32 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4 + depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4 select BR2_GCC_NEEDS_MPC bool "gcc 4.5.x" config BR2_GCC_VERSION_4_6_X - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 select BR2_GCC_NEEDS_MPC bool "gcc 4.6.x" config BR2_GCC_VERSION_4_7_X - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 select BR2_GCC_NEEDS_MPC bool "gcc 4.7.x" config BR2_GCC_VERSION_4_8_X - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 select BR2_GCC_NEEDS_MPC bool "gcc 4.8.x" config BR2_GCC_VERSION_SNAP - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 select BR2_GCC_NEEDS_MPC bool "gcc snapshot" endchoice
@@ -74,6 +79,7 @@ config BR2_GCC_VERSION default "4.2.2-avr32-2.1.5" if BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 default "4.3.6" if BR2_GCC_VERSION_4_3_X default "4.4.7" if BR2_GCC_VERSION_4_4_X + default "4.4.7-arc" if BR2_GCC_VERSION_4_4_7_ARC default "4.5.4" if BR2_GCC_VERSION_4_5_X default "4.6.4" if BR2_GCC_VERSION_4_6_X default "4.7.3" if BR2_GCC_VERSION_4_7_X
@@ -119,6 +125,6 @@ config BR2_GCC_ENABLE_TLS config BR2_GCC_ENABLE_OPENMP bool "Enable compiler OpenMP support" - depends on !BR2_PTHREADS_NONE && !BR2_avr32 + depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc help Enable OpenMP support for the compiler
toolchain/gcc/gcc-uclibc-4.x.mk +2 -0
@@ -29,6 +29,8 @@ ifneq ($(GCC_SNAP_DATE),) GCC_SITE:=ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/ else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) GCC_SITE:=ftp://www.at91.com/pub/buildroot/ +else ifeq ($(findstring arc,$(GCC_VERSION)),arc) + GCC_SITE:=$(BR2_ARC_SITE) else GCC_SITE:=$(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION) endif
Signature · 1 line
1.7.0.4
PATCH v3 6/11 arc: Add support for ARC-specific uClibc
In reply to Mischa Jonker--- toolchain/uClibc/Config.in | 10 ++++++++-- toolchain/uClibc/uClibc-snapshot.config | 2 ++ toolchain/uClibc/uclibc.mk | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-)
toolchain/uClibc/Config.in +8 -2
@@ -16,12 +16,16 @@ choice config BR2_UCLIBC_VERSION_0_9_32 bool "uClibc 0.9.32.x" - depends on !(BR2_avr32 || BR2_sh || BR2_xtensa) + depends on !(BR2_arc || BR2_avr32 || BR2_sh || BR2_xtensa) config BR2_UCLIBC_VERSION_0_9_33 bool "uClibc 0.9.33.x" - depends on !BR2_xtensa + depends on !(BR2_arc || BR2_xtensa) + config BR2_UCLIBC_VERSION_0_9_33_ARC + bool "uClibc 0.9.33.x-arc" + depends on BR2_arc + config BR2_UCLIBC_VERSION_SNAPSHOT bool "daily snapshot"
@@ -39,6 +43,7 @@ config BR2_UCLIBC_VERSION_STRING default 0.9.31.1 if BR2_UCLIBC_VERSION_0_9_31 default 0.9.32.1 if BR2_UCLIBC_VERSION_0_9_32 default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 + default 0.9.33-arc if BR2_UCLIBC_VERSION_0_9_33_ARC default $BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT config BR2_UCLIBC_CONFIG
@@ -46,6 +51,7 @@ config BR2_UCLIBC_CONFIG default "toolchain/uClibc/uClibc-0.9.31.config" if BR2_UCLIBC_VERSION_0_9_31 default "toolchain/uClibc/uClibc-0.9.32.config" if BR2_UCLIBC_VERSION_0_9_32 default "toolchain/uClibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33 + default "toolchain/uClibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_0_9_33_ARC default "toolchain/uClibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT help Some people may wish to use their own modified uClibc configuration
toolchain/uClibc/uClibc-snapshot.config +2 -0
@@ -4,6 +4,7 @@ # Fri Jul 9 22:31:59 2010 # # TARGET_alpha is not set +# TARGET_arc is not set # TARGET_arm is not set # TARGET_avr32 is not set # TARGET_bfin is not set
@@ -16,6 +17,7 @@ # TARGET_i960 is not set # TARGET_ia64 is not set # TARGET_m68k is not set +# TARGET_metag is not set # TARGET_microblaze is not set # TARGET_mips is not set # TARGET_nios is not set
toolchain/uClibc/uclibc.mk +4 -0
@@ -17,6 +17,9 @@ UCLIBC_VERSION:=$(call qstrip,$(BR2_UCLIBC_VERSION_STRING)) ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc +else ifeq ($(findstring arc,$(UCLIBC_VERSION)),arc) +UCLIBC_SITE:=$(BR2_ARC_SITE) +UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION) else UCLIBC_SITE:=http://www.uclibc.org/downloads UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION)
@@ -31,6 +34,7 @@ UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed \ -e 's/-.*//' \ -e 's/i.86/i386/' \ -e 's/sparc.*/sparc/' \ + -e 's/arc.*/arc/g' \ -e 's/arm.*/arm/g' \ -e 's/m68k.*/m68k/' \ -e 's/ppc/powerpc/g' \
Signature · 1 line
1.7.0.4
PATCH v3 7/11 arc: Make sure that libgcc doesn't get included when it doesn't exist yet
In reply to Mischa JonkerFor ARC, libgcc is always included, even when -nostdlib is given. This is related to some small pieces of code that are not always generated by the compiler; a call to libgcc is used in those cases instead.
During the initial stages of building the toolchain, this is a problem, as libgcc does not exist yet. The ARC compiler supports -really-nostdlib to override the default behavior.
--- toolchain/uClibc/uclibc.mk | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)
toolchain/uClibc/uclibc.mk +13 -2
@@ -404,6 +404,17 @@ ifeq ($(BR2_CCACHE),y) $(UCLIBC_DIR)/.config: | host-ccache endif +# For ARC, libgcc is always included, even when -nostdlib is given. This +# is related to some small pieces of code that are not always generated +# by the compiler; a call to libgcc is used in those cases instead. +# +# During the initial stages of building the toolchain, this is a problem, +# as libgcc does not exist yet. The ARC compiler supports -really-nostdlib +# to override the default behavior. +ifeq ($(BR2_arc),y) +REALLY_NOSTDLIB=-really-nostdlib +endif + $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.config $(Q)$(call MESSAGE,"Installing uClibc headers") $(MAKE1) -C $(UCLIBC_DIR) \
@@ -422,8 +433,8 @@ $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.confi cp -pLR $(LINUX_HEADERS_DIR)/include/* \ $(TOOLCHAIN_DIR)/uClibc_dev/usr/include/; \ fi - $(TARGET_CROSS)gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libc.so - $(TARGET_CROSS)gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libm.so + $(TARGET_CROSS)gcc -nostdlib $(REALLY_NOSTDLIB) -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libc.so + $(TARGET_CROSS)gcc -nostdlib $(REALLY_NOSTDLIB) -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libm.so cp -pLR $(UCLIBC_DIR)/lib/crt[1in].o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/ touch $@
Signature · 1 line
1.7.0.4
PATCH v3 8/11 toolchain/gcc: Only enable --with-float when it makes sense
In reply to Mischa JonkerAccording to gcc/config.gcc, only ARM, MIPS and SPARC have the "--with-float" option when configuring gcc.
--- toolchain/gcc/gcc-uclibc-4.x.mk | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
toolchain/gcc/gcc-uclibc-4.x.mk +3 -0
@@ -65,7 +65,10 @@ endif # Determine soft-float options ifeq ($(BR2_SOFT_FLOAT),y) +# only mips*-*-*, arm*-*-* and sparc*-*-* accept --with-float +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_mips)$(BR2_mipsel)$(BR2_sparc)$(BR2_mips64)$(BR2_mips64el),y) SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft +endif ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm TARGET_SOFT_FLOAT:=-mfloat-abi=soft else
Signature · 1 line
1.7.0.4
PATCH v3 9/11 toolchain/toolchain-buildroot: Disable NPTL for ARC
In reply to Mischa JonkerNPTL is not yet supported for ARC.
--- toolchain/toolchain-buildroot/Config.in.2 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
toolchain/toolchain-buildroot/Config.in.2 +1 -0
@@ -97,6 +97,7 @@ choice depends on !BR2_x86_i386 depends on !BR2_avr32 depends on !BR2_xtensa + depends on !BR2_arc endchoice config BR2_PTHREAD_DEBUG
Signature · 1 line
1.7.0.4
PATCH v3 10/11 arc: Add arc, arcbe to gnuconfig
In reply to Mischa Jonker--- support/gnuconfig/config.sub | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
support/gnuconfig/config.sub +2 -2
@@ -259,7 +259,7 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc \ + | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \
@@ -372,7 +372,7 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \
Signature · 1 line
1.7.0.4
PATCH v3 11/11 kernel-headers: Add support for ARC kernel headers
In reply to Mischa JonkerAlso make sure that older kernels are not selected for ARC.
--- Makefile | 1 + toolchain/kernel-headers/Config.in | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-)
Makefile +1 -0
@@ -238,6 +238,7 @@ ARCH:=$(call qstrip,$(BR2_ARCH)) KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arc.*/arc/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/aarch64/arm64/ \ -e s/bfin/blackfin/ \
toolchain/kernel-headers/Config.in +9 -5
@@ -17,35 +17,39 @@ choice config BR2_KERNEL_HEADERS_3_0 bool "Linux 3.0.x kernel headers" + depends on !BR2_arc config BR2_KERNEL_HEADERS_3_1 bool "Linux 3.1.x kernel headers" - depends on BR2_DEPRECATED + depends on BR2_DEPRECATED && !BR2_arc config BR2_KERNEL_HEADERS_3_2 bool "Linux 3.2.x kernel headers" + depends on !BR2_arc config BR2_KERNEL_HEADERS_3_3 bool "Linux 3.3.x kernel headers" - depends on BR2_DEPRECATED + depends on BR2_DEPRECATED && !BR2_arc config BR2_KERNEL_HEADERS_3_4 bool "Linux 3.4.x kernel headers" + depends on !BR2_arc config BR2_KERNEL_HEADERS_3_5 bool "Linux 3.5.x kernel headers" - depends on BR2_DEPRECATED + depends on BR2_DEPRECATED && !BR2_arc config BR2_KERNEL_HEADERS_3_6 bool "Linux 3.6.x kernel headers" - depends on BR2_DEPRECATED + depends on BR2_DEPRECATED && !BR2_arc config BR2_KERNEL_HEADERS_3_7 bool "Linux 3.7.x kernel headers" - depends on BR2_DEPRECATED + depends on BR2_DEPRECATED && !BR2_arc config BR2_KERNEL_HEADERS_3_8 bool "Linux 3.8.x kernel headers" + depends on !BR2_arc config BR2_KERNEL_HEADERS_3_9 bool "Linux 3.9.x kernel headers"
Signature · 1 line
1.7.0.4
v3 cover ARC port
In reply to Mischa JonkerDear Mischa Jonker,
Quoted 4 lines · Mischa Jonker
Changes in v3:
* removed GCC arch-dependency cleanup patch (should be discussed separately)
* 3.9-rc8-->3.9 kernel headers
* Added bison/flex host dependencies
Hum, what happened to the gcc changes to have the host-bison/host-flex dependencies, and the changes to make sure that $(HOST_DIR)/usr/bin is in the PATH when building gcc?
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
v3 cover ARC port
Hi Thomas,
Quoted 8 lines
Quoted 5 lines
Changes in v3:
* removed GCC arch-dependency cleanup patch (should be discussed
separately)
* 3.9-rc8-->3.9 kernel headers
* Added bison/flex host dependenciesHum, what happened to the gcc changes to have the host-bison/host-flex dependencies, and the changes to make sure that $(HOST_DIR)/usr/bin is in the PATH when building gcc?
Host-flex, host-bison dependencies for binutils squashed into patch v3 03/11, as you suggested.
I moved the host-flex, host-bison dependencies before the rest of the patches (as suggested), but now I notice that I forgot to include it in the series (doh!). Should I send it separately, or would you rather like a v4?
Thanks,
Mischa
v3 cover ARC port
Dear Mischa Jonker,
Quoted 4 lines · Mischa Jonker
Quoted 2 lines
Hum, what happened to the gcc changes to have the host-bison/host-flex dependencies, and the changes to make sure that $(HOST_DIR)/usr/bin is in the PATH when building gcc?
Host-flex, host-bison dependencies for binutils squashed into patch v3 03/11, as you suggested.
Yeah, for binutils, we're good. I was talking about the ones for gcc.
Quoted 3 lines
I moved the host-flex, host-bison dependencies before the rest of the patches (as suggested), but now I notice that I forgot to include it in the series (doh!). Should I send it separately, or would you rather like a v4?
Just send a v4, e-mails are cheap :)
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com