RFC: ARC port
v2 cover RFC: ARC port
Hi all,
Thanks for the prompt feedback that I have received on the patches. Here's a new revision of the patchset to introduce ARC support in BuildRoot; I think I have addressed all the comments received from Thomas and Arnout.
Thanks,
Mischa
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 (12):
arc: Add ARC and ARC BE architecture
arc: Add option for ARC-specific download site
arc: Add support for ARC-specific binutils
arc: Add arc, arcbe to gnuconfig
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
kernel-headers: Use ../testing URL for kernel release candidates
kernel-headers: Add 3.9-rc8 headers to make ARC work toolchain/gcc: Only enable --with-float when it makes sense toolchain/gcc: Introduce BR2_ARCH_HAS_NO_GCC_x_y
Makefile | 1 + arch/Config.in | 29 ++++++++ arch/Config.in.arc | 25 +++++++ arch/Config.in.arm | 10 +++ arch/Config.in.powerpc | 9 +++ arch/Config.in.sparc | 24 +++++++ arch/Config.in.x86 | 2 + .../binutils/2.19-arc/add-empty-info-files.patch | 72 ++++++++++++++++++++ package/binutils/Config.in.host | 2 + package/binutils/binutils.mk | 3 + 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 | 50 +++++++++++-- toolchain/gcc/gcc-uclibc-4.x.mk | 5 ++ toolchain/kernel-headers/Config.in | 18 ++++-- toolchain/kernel-headers/kernel-headers.mk | 3 + toolchain/uClibc/Config.in | 10 ++- toolchain/uClibc/uClibc-snapshot.config | 2 + toolchain/uClibc/uclibc.mk | 19 +++++- 20 files changed, 300 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 v2 1/12 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 v2 2/12 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 v2 3/12 arc: Add support for ARC-specific binutils
In reply to Mischa JonkerARC support is not upstream yet...
--- .../binutils/2.19-arc/add-empty-info-files.patch | 72 ++++++++++++++++++++ package/binutils/Config.in.host | 2 + package/binutils/binutils.mk | 3 + 3 files changed, 77 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 +3 -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)
Signature · 1 line
1.7.0.4
PATCH v2 4/12 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 v2 5/12 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 v2 6/12 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 + 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 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 + depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 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 + depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 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 + 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.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 + 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.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 v2 7/12 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 v2 8/12 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 v2 9/12 kernel-headers: Use ../testing URL for kernel release candidates
In reply to Mischa Jonker--- toolchain/kernel-headers/kernel-headers.mk | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
toolchain/kernel-headers/kernel-headers.mk +3 -0
@@ -31,6 +31,9 @@ LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR:/=)/linux/kernel/v2.6/ else LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR:/=)/linux/kernel/v3.x/ endif +ifeq ($(findstring rc,$(DEFAULT_KERNEL_HEADERS)),rc) +LINUX_HEADERS_SITE:=$(LINUX_HEADERS_SITE)testing/ +endif LINUX_HEADERS_SOURCE:=linux-$(LINUX_HEADERS_VERSION).tar.bz2 LINUX_HEADERS_CAT:=$(BZCAT) LINUX_HEADERS_UNPACK_DIR:=$(TOOLCHAIN_DIR)/linux-$(LINUX_HEADERS_VERSION)
Signature · 1 line
1.7.0.4
PATCH v2 10/12 kernel-headers: Add 3.9-rc8 headers to make ARC work
In reply to Mischa JonkerAdd 3.9 release candidate kernel, so that the ARC architecture builds. Also make sure that older kernels are not selected for ARC.
--- Makefile | 1 + toolchain/kernel-headers/Config.in | 18 +++++++++++++----- 2 files changed, 14 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 +13 -5
@@ -17,35 +17,42 @@ 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" config BR2_KERNEL_HEADERS_VERSION bool "Manually specified Linux version"
@@ -72,5 +79,6 @@ config BR2_DEFAULT_KERNEL_HEADERS default "3.6.11" if BR2_KERNEL_HEADERS_3_6 default "3.7.10" if BR2_KERNEL_HEADERS_3_7 default "3.8.8" if BR2_KERNEL_HEADERS_3_8 + default "3.9-rc8" if BR2_KERNEL_HEADERS_3_9 default "2.6" if BR2_KERNEL_HEADERS_SNAP default $BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
Signature · 1 line
1.7.0.4
PATCH v2 10/12 kernel-headers: Add 3.9-rc8 headers to make ARC work
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Mischa" == Mischa Jonker <[email protected]> writes:
Mischa> Add 3.9 release candidate kernel, so that the ARC architecture builds. Mischa> Also make sure that older kernels are not selected for ARC.
The final 3.9 is supposed to be released by the end of the week, so I would prefer to not add -rc8.
Mischa> Signed-off-by: Mischa Jonker <[email protected]> Mischa> ---
Mischa> Makefile | 1 + Mischa> toolchain/kernel-headers/Config.in | 18 +++++++++++++-----
Mischa> 2 files changed, 14 insertions(+), 5 deletions(-)
Mischa> diff --git a/Makefile b/Makefile
Mischa> index 0a91658..8fef492 100644
Mischa> --- a/Makefile
Mischa> +++ b/Makefile
Mischa> @@ -238,6 +238,7 @@ ARCH:=$(call qstrip,$(BR2_ARCH))
Mischa> KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
Mischa> -e s/i.86/i386/ -e s/sun4u/sparc64/ \
Mischa> + -e s/arc.*/arc/ \
Mischa> -e s/arm.*/arm/ -e s/sa110/arm/ \ Mischa> -e s/aarch64/arm64/ \ Mischa> -e s/bfin/blackfin/ \
Mischa> diff --git a/toolchain/kernel-headers/Config.in b/toolchain/kernel-headers/Config.in Mischa> index ec75c34..1c972f3 100644
Mischa> --- a/toolchain/kernel-headers/Config.in
Mischa> +++ b/toolchain/kernel-headers/Config.in
Mischa> @@ -17,35 +17,42 @@ choice
Mischa> config BR2_KERNEL_HEADERS_3_0
Mischa> bool "Linux 3.0.x kernel headers"
Mischa> + depends on !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_1
Mischa> bool "Linux 3.1.x kernel headers"
Mischa> - depends on BR2_DEPRECATED
Mischa> + depends on BR2_DEPRECATED && !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_2
Mischa> bool "Linux 3.2.x kernel headers"
Mischa> + depends on !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_3
Mischa> bool "Linux 3.3.x kernel headers"
Mischa> - depends on BR2_DEPRECATED
Mischa> + depends on BR2_DEPRECATED && !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_4
Mischa> bool "Linux 3.4.x kernel headers"
Mischa> + depends on !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_5
Mischa> bool "Linux 3.5.x kernel headers"
Mischa> - depends on BR2_DEPRECATED
Mischa> + depends on BR2_DEPRECATED && !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_6
Mischa> bool "Linux 3.6.x kernel headers"
Mischa> - depends on BR2_DEPRECATED
Mischa> + depends on BR2_DEPRECATED && !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_7
Mischa> bool "Linux 3.7.x kernel headers"
Mischa> - depends on BR2_DEPRECATED
Mischa> + depends on BR2_DEPRECATED && !BR2_arc
Mischa> config BR2_KERNEL_HEADERS_3_8
Mischa> bool "Linux 3.8.x kernel headers"
Mischa> + depends on !BR2_arc
Mischa> +
Mischa> + config BR2_KERNEL_HEADERS_3_9
Mischa> + bool "Linux 3.9.x kernel headers"
Mischa> config BR2_KERNEL_HEADERS_VERSION
Mischa> bool "Manually specified Linux version"
Mischa> @@ -72,5 +79,6 @@ config BR2_DEFAULT_KERNEL_HEADERS
Mischa> default "3.6.11" if BR2_KERNEL_HEADERS_3_6 Mischa> default "3.7.10" if BR2_KERNEL_HEADERS_3_7 Mischa> default "3.8.8" if BR2_KERNEL_HEADERS_3_8
Mischa> + default "3.9-rc8" if BR2_KERNEL_HEADERS_3_9
Mischa> default "2.6" if BR2_KERNEL_HEADERS_SNAP
Mischa> default $BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
Mischa> --
Mischa> 1.7.0.4
Mischa> _______________________________________________ Mischa> buildroot mailing list
Mischa> buildroot at busybox.net
Mischa> http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 11/12 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 v2 12/12 toolchain/gcc: Introduce BR2_ARCH_HAS_NO_GCC_x_y
In reply to Mischa JonkerThis patch eliminates the long "depends on" lines in toolchain/gcc/Config.in by letting architectures specify which GCC versions they do not support.
--- arch/Config.in | 11 +++++++++++ arch/Config.in.arc | 7 +++++++ arch/Config.in.arm | 10 ++++++++++ arch/Config.in.powerpc | 9 +++++++++ arch/Config.in.sparc | 24 ++++++++++++++++++++++++ arch/Config.in.x86 | 2 ++ toolchain/gcc/Config.in | 42 +++++++++++++++++++++++++++++++++++------- 7 files changed, 98 insertions(+), 7 deletions(-)
arch/Config.in +11 -0
@@ -40,6 +40,10 @@ config BR2_armeb config BR2_aarch64 bool "AArch64" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 help Aarch64 is a 64-bit architecture developed by ARM Holdings. http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
@@ -48,6 +52,13 @@ config BR2_aarch64 config BR2_avr32 bool "AVR32" select BR2_SOFT_FLOAT + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 + select BR2_ARCH_HAS_NO_GCC_4_7 + select BR2_ARCH_HAS_NO_GCC_4_8 + select BR2_ARCH_HAS_NO_GCC_SNAP help The AVR32 is a 32-bit RISC microprocessor architecture designed by Atmel.
arch/Config.in.arc +7 -0
@@ -5,6 +5,13 @@ config BR2_ARCH config BR2_arc bool default y if BR2_arcle || BR2_arceb + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 + select BR2_ARCH_HAS_NO_GCC_4_7 + select BR2_ARCH_HAS_NO_GCC_4_8 + select BR2_ARCH_HAS_NO_GCC_SNAP config BR2_ENDIAN default "LITTLE" if BR2_arcle
arch/Config.in.arm +10 -0
@@ -36,17 +36,27 @@ config BR2_arm1176jzf_s config BR2_cortex_a5 bool "cortex-A5" select BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 config BR2_cortex_a8 bool "cortex-A8" select BR2_ARM_CPU_HAS_NEON + select BR2_ARCH_HAS_NO_GCC_4_3 config BR2_cortex_a9 bool "cortex-A9" select BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARCH_HAS_NO_GCC_4_3 config BR2_cortex_a15 bool "cortex-A15" select BR2_ARM_CPU_HAS_NEON + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 + select BR2_ARCH_HAS_NO_GCC_4_5 config BR2_fa526 bool "fa526/626" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 + select BR2_ARCH_HAS_NO_GCC_4_5 config BR2_strongarm bool "strongarm sa110/sa1100" config BR2_xscale
arch/Config.in.powerpc +9 -0
@@ -20,12 +20,18 @@ config BR2_powerpc_440fp bool "440 with FPU" config BR2_powerpc_464 bool "464" + select BR2_ARCH_HAS_NO_GCC_4_3 config BR2_powerpc_464fp bool "464 with FPU" + select BR2_ARCH_HAS_NO_GCC_4_3 config BR2_powerpc_476 bool "476" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 config BR2_powerpc_476fp bool "476 with FPU" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 config BR2_powerpc_505 bool "505" config BR2_powerpc_601
@@ -66,10 +72,13 @@ config BR2_powerpc_8548 bool "8548 / e500v2" config BR2_powerpc_e300c2 bool "e300c2" + select BR2_ARCH_HAS_NO_GCC_4_3 config BR2_powerpc_e300c3 bool "e300c3" + select BR2_ARCH_HAS_NO_GCC_4_3 config BR2_powerpc_e500mc bool "e500mc" + select BR2_ARCH_HAS_NO_GCC_4_3 endchoice choice
arch/Config.in.sparc +24 -0
@@ -9,12 +9,36 @@ config BR2_sparc_v8 bool "v8" config BR2_sparc_sparchfleon bool "hfleon" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 + select BR2_ARCH_HAS_NO_GCC_4_7 + select BR2_ARCH_HAS_NO_GCC_4_8 + select BR2_ARCH_HAS_NO_GCC_SNAP config BR2_sparc_sparchfleonv8 bool "hfleonv8" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 + select BR2_ARCH_HAS_NO_GCC_4_7 + select BR2_ARCH_HAS_NO_GCC_4_8 + select BR2_ARCH_HAS_NO_GCC_SNAP config BR2_sparc_sparcsfleon bool "sfleon" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 + select BR2_ARCH_HAS_NO_GCC_4_7 + select BR2_ARCH_HAS_NO_GCC_4_8 + select BR2_ARCH_HAS_NO_GCC_SNAP config BR2_sparc_sparcsfleonv8 bool "sfleonv8" + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_5 + select BR2_ARCH_HAS_NO_GCC_4_6 + select BR2_ARCH_HAS_NO_GCC_4_7 + select BR2_ARCH_HAS_NO_GCC_4_8 + select BR2_ARCH_HAS_NO_GCC_SNAP endchoice config BR2_ARCH
arch/Config.in.x86 +2 -0
@@ -86,6 +86,8 @@ config BR2_x86_atom select BR2_X86_CPU_HAS_SSE2 select BR2_X86_CPU_HAS_SSE3 select BR2_X86_CPU_HAS_SSSE3 + select BR2_ARCH_HAS_NO_GCC_4_3 + select BR2_ARCH_HAS_NO_GCC_4_4 config BR2_x86_k6 bool "k6" select BR2_X86_CPU_HAS_MMX
toolchain/gcc/Config.in +35 -7
75 lines not on this page · raw message
Signature · 1 line
1.7.0.4
v2 cover RFC: ARC port
In reply to Mischa JonkerDear Mischa Jonker,
Quoted 4 lines · Mischa Jonker
Thanks for the prompt feedback that I have received on the patches. Here's a new revision of the patchset to introduce ARC support in BuildRoot; I think I have addressed all the comments received from Thomas and Arnout.
Thanks for the quick turnaround! This time, I actually applied and tested your patches in the autobuilders environment, and I had some issues.
The first issue is that your version of binutils require flex and bison installed on the host, so we have to add these as dependencies of binutils. The binutils.patch attached does that, but it does that unconditionally, regardless of the binutils version being chosen. Since the recent binutils versions do not require building flex and bison, I'd prefer to make this dependency conditional on which version of binutils is being built.
The second issue is that gcc 4.4.x also require flex (and maybe bison, but I haven't checked). So I've added host-flex and host-bison as gcc dependencies. Unfortunately, gcc doesn't use the package infrastructure, so it doesn't add host/usr/bin to the PATH, so I had to change the gcc makefile to use $(HOST_MAKE_ENV) and $(TARGET_MAKE_ENV) where appropriate. This is the second 'gcc.patch' attached does. Here as well, it makes the host-flex and host-bison dependency unconditional, even though the latest versions of gcc do not require this. A proper patch would have to make this dependency conditional on the version of gcc being used.
(Note: both patches are quick and dirty, they don't have any description or signed-off-by. Feel free to re-use them and apply your signed-off-by on them, I don't care about authorship on those patches.)
Note that those flex and bison issues are visible in the autobuilder environment because the build runs in a minimal chroot that has only the strict, minimal dependencies required by Buildroot. That probably explains why you haven't seen those problems until now.
Then, once this was fixed, the build went on, but failed at the gcc intermediate step, with some pthread related issue:
In file included from /home/test/outputs/arc/toolchain/uClibc_dev//usr/include/stdio.h:71,
from /home/test/outputs/arc/toolchain/gcc-4.4.7-arc/libgcc/../gcc/tsystem.h:87,
from /home/test/outputs/arc/toolchain/gcc-4.4.7-arc/libgcc/../gcc/libgcc2.c:29:/home/test/outputs/arc/toolchain/uClibc_dev//usr/include/bits/uClibc_stdio.h:207: error: expected specifier-qualifier-list before 'pthread_mutex_t'
make[3]: *** [_negdi2.o] Error 1
make[3]: *** Waiting for unfinished jobs....
The defconfig I was trying to build is very simple:
$ cat defconfig BR2_arcle=y
Do you have an idea for this pthread_mutex_t issue? Maybe ARC doesn't support NPTL or something?
Also, do you have a public repo to push your changes to? Since your patch series has become quite long, it would make it easier for us to test it as a whole.
Thanks!
Thomas
Signature · 18 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: binutils.patch Type: text/x-patch Size: 567 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130425/ab026573/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: gcc.patch Type: text/x-patch Size: 3705 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130425/ab026573/attachment-0001.bin>
v2 cover RFC: ARC port
Hi Thomas,
Quoted 1 line
(host-flex/host-bison)
Thanks for the patches! I have integrated them and added version checks. I'm not 100% certain from which version onwards the dependency has been removed, but my colleague says that he didn't encounter these dependencies with GCC 4.5, so I made it depend on 4.2,4.3,4.4.
Quoted 1 line
Do you have an idea for this
pthread_mutex_tissue? Maybe ARC doesn't support NPTL or something?
Correct, we don't have NPTL support yet. It was the initial planning to have this finished before we went out with the BuildRoot patches, but priorities shifted, and I hadn't disabled it yet. Added a patch for that.
Quoted 1 line
Also, do you have a public repo to push your changes to? Since your patch series has become quite long, it would make it easier for us to test it as a whole.
Our github site has a BuildRoot repository:
https://github.com/foss-for-synopsys-dwc-arc-processors/buildroot
I'm regularly rebasing & updating patches, and pushing them to this repo. Right now, there are two branches/tags that are relevant:
* master_arc_20130425
* master_3.9_arc_20130425
The only difference between the two is that the first relies on 3.9-rc8, and the second on 3.9. So the second branch doesn't build right now, but should build after this weekend.
BTW: would you like to repost the new set of patches on the mailing list, or would you rather have a look at it on github?
BTW2: I noticed that GNU config went from GPLv2 to GPLv3, I'm not sure what the impact would be for BuildRoot, as it is really part of BuildRoot (not downloaded).
Mischa
v2 cover RFC: ARC port
Dear Mischa Jonker,
Quoted 6 lines · Mischa Jonker
Quoted 1 line
(host-flex/host-bison)
Thanks for the patches! I have integrated them and added version checks. I'm not 100% certain from which version onwards the dependency has been removed, but my colleague says that he didn't encounter these dependencies with GCC 4.5, so I made it depend on 4.2,4.3,4.4.
Ok.
Quoted 6 lines
Quoted 2 lines
Do you have an idea for this
pthread_mutex_tissue? Maybe ARC doesn't support NPTL or something?Correct, we don't have NPTL support yet. It was the initial planning to have this finished before we went out with the BuildRoot patches, but priorities shifted, and I hadn't disabled it yet. Added a patch for that.
Good.
Quoted 6 lines
Quoted 3 lines
Also, do you have a public repo to push your changes to? Since your patch series has become quite long, it would make it easier for us to test it as a whole.
Our github site has a BuildRoot repository:
https://github.com/foss-for-synopsys-dwc-arc-processors/buildroot
Quoted 8 lines
I'm regularly rebasing & updating patches, and pushing them to this repo. Right now, there are two branches/tags that are relevant:
*master_arc_20130425
* master_3.9_arc_20130425The only difference between the two is that the first relies on 3.9-rc8, and the second on 3.9. So the second branch doesn't build right now, but should build after this weekend.
3.9 has been released now, so that should solve your problem. Could you rebase your patch series on top of master, Peter has added 3.9 as a supported kernel.
I tested your branch, and it built fine for me on the autobuilders, so in terms of basic buildability, we're good.
Quoted 5 lines
BTW: would you like to repost the new set of patches on the mailing list, or would you rather have a look at it on github? BTW2: I noticed that GNU config went from GPLv2 to GPLv3, I'm not sure what the impact would be for BuildRoot, as it is really part of BuildRoot (not downloaded).
Yes, they should be reposted, but I have a number of comments on them:
* 'toolchain/gcc: Add host-{flex,bison} dependencies for GCC 4.2,4.3,4.4' should be earlier in the series, i.e before 'arc: add gcc for ARC'.
* 'package/binutils: add host-{flex,bison} dependencies for 2.19-arc' should probably be squashed into 'arc: Add support for ARC-specific binutils'.
* I am not entirely happy with 'toolchain/gcc: Introduce BR2_ARCH_HAS_NO_GCC_x_y' using a reverted logic. I haven't thought too much about it, but wouldn't it be possible to instead do something like BR2_ARCH_NEEDS_GCC_4_6_PLUS, and then do something like depends !BR2_ARCH_NEEDS_GCC_4_6_PLUS on all gcc versions < 4.6 ? Hum, the problem is that it works with architecture that are supported starting from a given upstream gcc version, but not architecture that are supported only in 4.2-avr, or in 4.4-arc, etc.
Maybe others will have a suggestion on this point?
Other than that, it looks good to me.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
v2 cover RFC: ARC port
Quoted 10 lines · Thomas Petazzoni
* I am not entirely happy with 'toolchain/gcc: Introduce
BR2_ARCH_HAS_NO_GCC_x_y' using a reverted logic. I haven't thought too much about it, but wouldn't it be possible to instead do something likeBR2_ARCH_NEEDS_GCC_4_6_PLUS, and then do something like depends !BR2_ARCH_NEEDS_GCC_4_6_PLUS on all gcc versions < 4.6 ? Hum, the problem is that it works with architecture that are supported starting from a given upstream gcc version, but not architecture that are supported only in 4.2-avr, or in 4.4-arc, etc.Maybe others will have a suggestion on this point?
Not entirely clean either, but what about the following:
[toolchain/gcc/Config.in]
config BR2_ARCH_HAS_ALL_GCC
bool
config BR2_ARCH_HAS_GCC_4_4
bool
default y if BR2_ARCH_HAS_ALL_GCC
[arch/Config.in]
config BR2_mips
select BR2_ARCH_HAS_ALL_GCC
...
[arch/Config.in.arm]
config BR2_arm1176jzf_s
select BR2_ARCH_HAS_ALL_GCC
...
config BR2_cortex_a8
select BR2_ARCH_HAS_GCC_4_4
...
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
v2 cover RFC: ARC port
Dear Arnout Vandecappelle,
Quoted 27 lines · Arnout Vandecappelle
Quoted 10 lines · Thomas Petazzoni
* I am not entirely happy with 'toolchain/gcc: Introduce
BR2_ARCH_HAS_NO_GCC_x_y' using a reverted logic. I haven't thought too much about it, but wouldn't it be possible to instead do something likeBR2_ARCH_NEEDS_GCC_4_6_PLUS, and then do something like depends !BR2_ARCH_NEEDS_GCC_4_6_PLUS on all gcc versions < 4.6 ? Hum, the problem is that it works with architecture that are supported starting from a given upstream gcc version, but not architecture that are supported only in 4.2-avr, or in 4.4-arc, etc.Maybe others will have a suggestion on this point?
Not entirely clean either, but what about the following:
[toolchain/gcc/Config.in]
configBR2_ARCH_HAS_ALL_GCC
boolconfig
BR2_ARCH_HAS_GCC_4_4
bool
default y ifBR2_ARCH_HAS_ALL_GCC[
arch/Config.in]
configBR2_mips
selectBR2_ARCH_HAS_ALL_GCC
...
Quoted 7 lines
[
arch/Config.in.arm]
configBR2_arm1176jzf_s
selectBR2_ARCH_HAS_ALL_GCC
...
configBR2_cortex_a8select BR2_ARCH_HAS_GCC_4_4...
Could be good. That said, this problem is quite different from doing the ARC port. So maybe we could instead tell Mischa to revert back to its original solution (adding yet another set of !BR2_arc everywhere), and we can work on a solution to improve this as a follow-up patch. Of course, if Mischa is willing to work on this, that'd be great, but I don't think it's really mandatory to make this cleanup a strict requirement to get the ARC code merged. The existing set of 'depends on' for gcc versions is already ugly, it's not specifically the ARC stuff that makes it ugly.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
v2 cover RFC: ARC port
Quoted 17 lines
Quoted 1 line
Maybe others will have a suggestion on this point?
Not entirely clean either, but what about the following:
[toolchain/gcc/Config.in]
configBR2_ARCH_HAS_ALL_GCC
boolconfig
BR2_ARCH_HAS_GCC_4_4
bool
default y ifBR2_ARCH_HAS_ALL_GCC[
arch/Config.in]
configBR2_mips
selectBR2_ARCH_HAS_ALL_GCC
...
Quoted 7 lines
[
arch/Config.in.arm]
configBR2_arm1176jzf_s
selectBR2_ARCH_HAS_ALL_GCC
...
configBR2_cortex_a8select BR2_ARCH_HAS_GCC_4_4...
The problem with this is that you end up in Config.in.arm with a lot of "select BR2_ARCH_HAS_ALL_GCC" lines. It is more logical, but it adds a lot of clutter IMHO.
Unfortunately, we cannot make "BR2_ARCH_HAS_ALL_GCC" default y, because we don't have the 'deselect' keyword, so we need to add it everywhere. For ARM and x86, the architectures that aren't supported by all GCC versions are the exception, so instead of adding additional lines for just the exceptions, we end up with extra code everywhere.
I also tried to let default values depend on earlier versions:
config BR2_ARCH_HAS_GCC_4_5
bool
default y if BR2_ARCH_HAS_GCC_4_4
But this doesn't work for several architectures, such as BR2_sparc_sparcsfleon, that do have GCC 4.4, but no 4.5 for instance.
The reverse logic helps in the sense that the BR2_HAS_NO_GCC_x_y lines will go away over time when old GCC versions get deprecated.
I will send both variants later today.
Mischa
v2 cover RFC: ARC port
Dear Mischa Jonker,
On Thu, 2 May 2013 14:03:53 +0000, Mischa Jonker wrote:
[...]
Quoted 7 lines
But this doesn't work for several architectures, such as
BR2_sparc_sparcsfleon, that do have GCC 4.4, but no 4.5 for instance.The reverse logic helps in the sense that the
BR2_HAS_NO_GCC_x_ylines will go away over time when old GCC versions get deprecated.I will send both variants later today.
As I suggested in an earlier e-mail, I think you should just not care about this problem for now, and add the multiple 'depends on !BR2_arc' as you were doing in your first version of the patch set. Your patch set already has a good number of patches, so let's merge it, and improve on top of that.
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
v2 cover RFC: ARC port
Hi Thomas,
Quoted 7 lines
Quoted 1 line
I will send both variants later today.
As I suggested in an earlier e-mail, I think you should just not care about this problem for now, and add the multiple 'depends on !BR2_arc' as you were doing in your first version of the patch set. Your patch set already has a good number of patches, so let's merge it, and improve on top of that.
The v3 patch set does exactly that if I'm not mistaken. This is supposed to be the improvement part already:-)
Mischa
v2 cover RFC: ARC port
Dear Mischa Jonker,
Quoted 8 lines · Mischa Jonker
Quoted 5 lines
As I suggested in an earlier e-mail, I think you should just not care about this problem for now, and add the multiple 'depends on !BR2_arc' as you were doing in your first version of the patch set. Your patch set already has a good number of patches, so let's merge it, and improve on top of that.
The v3 patch set does exactly that if I'm not mistaken. This is supposed to be the improvement part already:-)
Yeah, seen that. I replied before I saw your v3, and the gcc patches that come after that. I'll focus on the ARC stuff for now.
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
v2 cover RFC: ARC port
In reply to Mischa JonkerQuoted 25 lines · Mischa Jonker
Quoted 17 lines
Quoted 1 line
Maybe others will have a suggestion on this point?
Not entirely clean either, but what about the following:
[toolchain/gcc/Config.in]
configBR2_ARCH_HAS_ALL_GCC
boolconfig
BR2_ARCH_HAS_GCC_4_4
bool
default y ifBR2_ARCH_HAS_ALL_GCC[
arch/Config.in]
configBR2_mips
selectBR2_ARCH_HAS_ALL_GCC
...Quoted 7 lines
[
arch/Config.in.arm]
configBR2_arm1176jzf_s
selectBR2_ARCH_HAS_ALL_GCC
...
configBR2_cortex_a8select BR2_ARCH_HAS_GCC_4_4...
Quoted 1 line
The problem with this is that you end up in Config.in.arm with a lot of "select
BR2_ARCH_HAS_ALL_GCC" lines. It is more logical, but it adds a lot of clutter IMHO.
Okay, yet another idea. I don't know if this will actually work.
[toolchain/gcc/Config.in]
config BR2_ARCH_HAS_ALL_GCC
bool default y if !(BR2_ARCH_HAS_GCC_4_4 || BR2_ARCH_HAS_GCC_4_5 ...)
config BR2_ARCH_HAS_GCC_4_4
bool
config BR2_GCC_VERSION_4_4_X
depends on BR2_ARCH_HAS_ALL_GCC || BR2_ARCH_HAS_GCC_4_4
Quoted 10 lines
Unfortunately, we cannot make "
BR2_ARCH_HAS_ALL_GCC" default y, because we don't have the 'deselect' keyword, so we need to add it everywhere. For ARM and x86, the architectures that aren't supported by all GCC versions are the exception, so instead of adding additional lines for just the exceptions, we end up with extra code everywhere.I also tried to let default values depend on earlier versions:
configBR2_ARCH_HAS_GCC_4_5
bool
default y ifBR2_ARCH_HAS_GCC_4_4But this doesn't work for several architectures, such as
BR2_sparc_sparcsfleon, that do have GCC 4.4, but no 4.5 for instance.The reverse logic helps in the sense that the
BR2_HAS_NO_GCC_x_ylines will go away over time when old GCC versions get deprecated.
Yes, looking at the alternatives, the negative logic isn't that bad...
However, the advantage of the positive logic is that it is slightly
more future-safe. When adding a new gcc version, you have to remember to also add all the negative cases. Of course, you also have to remember to add a new positive case, but it is less bad if you forget that.
Quoted 2 lines
I will send both variants later today.
As Thomas said, don't feel obliged to continue working on this refactoring.
Regards,
Arnout
Quoted 3 lines
Mischa
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F