Skip to contentSkip to conversation

RFC: ARC port

PATCH Superseded Mischa Jonker 4 participants 27 messages Apr 22, 2013 – Apr 24, 2013 Kbuild

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover RFC: ARC port

Hi BuildRoot developers,

In the following patch series I've added ARC support to the "master" tree of BuildRoot. As ARC support is not yet in all upstream open source packages, I've taken the freedom to add an option for an additional download site, from which ARC-specific versions of gcc, binutils, etc. can be downloaded.

ARC will be in Linux 3.9, so that would be the first package that can be removed from this ARC-specific download site.

The below patchset builds the toolchain, and a working root file system. Most simple packages build OK, but mplayer for instance does not have ARC support, and there are probably others as well.

Could you please have a look at the patches and let me know what to do to make them BuildRoot-worthy?

Thanks,

Mischa

Mischa Jonker (7):
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 specific kernel headers
arc: Add support for ARC-specific GCC
arc: Add support for ARC-specific uClibc
arc: Make sure that libgcc doesn't get included when it doesn't exist
yet

 Config.in                                          |    9 +
 Makefile                                           |    1 +
 arch/Config.in                                     |   18 ++
 arch/Config.in.arc                                 |   10 +
 package/binutils/Config.in.host                    |   17 +-
 .../300-001_ld_makefile_patch.patch                |   24 ++
 .../300-012_check_ldrunpath_length.patch           |   21 ++
 .../binutils/binutils-2.19-arc/500-sysroot.patch   |   36 +++
 package/binutils/binutils.mk                       |    3 +
 support/gnuconfig/config.sub                       |    4 +-
 toolchain/Config.in                                |    3 +-
 .../gcc/4.4.7-arc/fix_branch_out_of_range.patch    |   22 ++
 toolchain/gcc/Config.in                            |   22 +-
 toolchain/gcc/gcc-uclibc-4.x.mk                    |    4 +
 toolchain/kernel-headers/Config.in                 |   19 +-
 toolchain/kernel-headers/kernel-headers.mk         |    4 +-
 toolchain/uClibc/Config.in                         |   12 +-
 toolchain/uClibc/uClibc-0.9.33-arc.config          |  251 ++++++++++++++++++++
 toolchain/uClibc/uclibc.mk                         |   14 +-
 19 files changed, 466 insertions(+), 28 deletions(-)
 create mode 100644 arch/Config.in.arc
 create mode 100644 package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch
 create mode 100644 package/binutils/binutils-2.19-arc/300-012_check_ldrunpath_length.patch
 create mode 100644 package/binutils/binutils-2.19-arc/500-sysroot.patch
 create mode 100644 toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch
 create mode 100644 toolchain/uClibc/uClibc-0.9.33-arc.config
#1 lore raw

PATCH 1/7 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 |   10 ++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 arch/Config.in.arc
arch/Config.in +18 -0
index 795f24f..46edbab 100644
@@ -7,6 +7,20 @@ choice
 	help
 	  Select the target architecture family to build for.
 
+config BR2_arc
+	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_arc || 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 +10 -0
new file mode 100644
index 0000000..80b2dc4
@@ -0,0 +1,10 @@
+config BR2_ARCH
+	default "arc"	if BR2_arc
+	default "arceb"	if BR2_arceb
+
+config BR2_ENDIAN
+	default "LITTLE" if BR2_arc
+	default "BIG"	 if BR2_arceb
+
+config BR2_GCC_TARGET_CPU
+	default "arc700"
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 1/7 arc: Add ARC and ARC BE architecture

Dear Mischa Jonker,

Quoted 4 lines · Mischa Jonker

Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs that can be used from deeply embedded to high performance host applications.

Looks good to me.

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/7 arc: Add ARC and ARC BE architecture

In reply to Mischa Jonker

arch/Config.in choice · line 15

Quoted 6 lines · Mischa Jonker
arch/Config.in +6 -0
+config BR2_arc
+	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.

Wouldn't it make more sense to have explicit BR2_arcel and BR2_arcbe
symbols that implicitly select BR2_arc, similar to microblaze? that avoids mistakes like you made in a later patch :-)

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
#4 lore raw

PATCH 2/7 arc: Add option for ARC-specific download site

In reply to Mischa Jonker

As 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.

---
 Config.in |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Config.in +9 -0
index bbb9885..c365b38 100644
@@ -141,6 +141,15 @@ config BR2_PRIMARY_SITE
 	  NOTE: This works for all packages using the central package
 	  infrastructure (generic, autotools, cmake, ...)
 
+config BR2_ARC_SITE
+	string "Download site for ARC specific packages"
+	default "http://www.synopsys.com/apps/arc-developer/"
+	depends on BR2_arc || BR2_arceb
+	help
+	  This download site is used for packages that require specific
+	  support for ARC, while this support is not yet pushed to the
+	  respective open source project.
+
 config BR2_PRIMARY_SITE_ONLY
 	bool "Only allow downloads from primary download site"
 	depends on BR2_PRIMARY_SITE != ""
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 2/7 arc: Add option for ARC-specific download site

Dear Mischa Jonker,

Config.in config BR2_PRIMARY_SITE · line 151

Quoted 8 lines · Mischa Jonker
Config.in +8 -0
+config BR2_ARC_SITE
+	string "Download site for ARC specific packages"
+	default "http://www.synopsys.com/apps/arc-developer/"
+	depends on BR2_arc || BR2_arceb
+	help
+	  This download site is used for packages that require specific
+	  support for ARC, while this support is not yet pushed to the
+	  respective open source project.

Is there some realistic case for which this URL would need to be changed by the user? I think I'd prefer to hardcode the URL in the binutils/gcc/uClibc recipes, just like we do a special casing for AVR32, unless of course there is some compelling reason for making this configurable.

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
#6 lore raw

PATCH 2/7 arc: Add option for ARC-specific download site

Quoted 4 lines · Thomas Petazzoni

Dear Mischa Jonker,

On Mon, 22 Apr 2013 13:37:26 +0200, Mischa Jonker wrote:

Quoted 13 lines
Quoted 8 lines

Config.in config BR2_PRIMARY_SITE · line 151

Quoted 8 lines
Config.in +8 -0
+config BR2_ARC_SITE
+	string "Download site for ARC specific packages"
+	default"http://www.synopsys.com/apps/arc-developer/"
+	depends on BR2_arc || BR2_arceb
+	help
+	  This download site is used for packages that require specific
+	  support for ARC, while this support is not yet pushed to the
+	  respective open source project.

Is there some realistic case for which this URL would need to be changed by the user? I think I'd prefer to hardcode the URL in the binutils/gcc/uClibc recipes, just like we do a special casing for AVR32, unless of course there is some compelling reason for making this configurable.

+1 on that.

But it may make sense to define the base URL once in some .mk file and
use it in the other locations. You probably don't need to worry about the order of .mk file inclusion because the variable will only be expanded when a rule is executed, not when the .mk files are parsed. So it should be safe to define it in e.g. the toolchain/gcc/gcc.mk and use it in binutils.

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
#7 lore raw

PATCH 3/7 arc: Add support for ARC-specific binutils

In reply to Mischa Jonker

ARC support is not upstream yet...

---
 package/binutils/Config.in.host                    |   17 ++++++---
 .../300-001_ld_makefile_patch.patch                |   24 +++++++++++++
 .../300-012_check_ldrunpath_length.patch           |   21 +++++++++++
 .../binutils/binutils-2.19-arc/500-sysroot.patch   |   36 ++++++++++++++++++++
 package/binutils/binutils.mk                       |    3 ++
 5 files changed, 95 insertions(+), 6 deletions(-)
 create mode 100644 package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch
 create mode 100644 package/binutils/binutils-2.19-arc/300-012_check_ldrunpath_length.patch
 create mode 100644 package/binutils/binutils-2.19-arc/500-sysroot.patch
package/binutils/Config.in.host +11 -6
index a61a503..b634796 100644
@@ -12,28 +12,32 @@ choice
 	       depends on BR2_avr32
 	       bool "binutils 2.18-avr32-1.0.1"
 
+	config BR2_BINUTILS_VERSION_2_19_ARC
+		depends on BR2_arc || BR2_arceb
+		bool "binutils 2.19-arc"
+
 	config BR2_BINUTILS_VERSION_2_20_1
-		depends on !BR2_avr32
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32)
 		bool "binutils 2.20.1"
 
 	config BR2_BINUTILS_VERSION_2_21
-		depends on !BR2_avr32
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32)
 		bool "binutils 2.21"
 
 	config BR2_BINUTILS_VERSION_2_21_1
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
 		bool "binutils 2.21.1"
 
 	config BR2_BINUTILS_VERSION_2_22
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
 		bool "binutils 2.22"
 
 	config BR2_BINUTILS_VERSION_2_23_1
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
 		bool "binutils 2.23.1"
 
 	config BR2_BINUTILS_VERSION_2_23_2
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
 		bool "binutils 2.23.2"
 
 endchoice
@@ -41,6 +45,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_BINUTILS_VERSION_2_19_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-2.19-arc/300-001_ld_makefile_patch.patch new file +24 -0
new file mode 100644
index 0000000..5cb0f61
@@ -0,0 +1,24 @@
+diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
+--- binutils-2.17.50.0.17.oorig/ld/Makefile.am	2007-06-18 19:29:29.000000000 +0200
++++ binutils-2.17.50.0.17/ld/Makefile.am	2007-06-25 10:00:36.000000000 +0200
+@@ -18,7 +18,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ 
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in
+--- binutils-2.17.50.0.17.oorig/ld/Makefile.in	2007-06-18 19:29:29.000000000 +0200
++++ binutils-2.17.50.0.17/ld/Makefile.in	2007-06-25 10:00:36.000000000 +0200
+@@ -287,7 +287,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
package/binutils/binutils-2.19-arc/300-012_check_ldrunpath_length.patch new file +21 -0
new file mode 100644
index 0000000..6e80921
@@ -0,0 +1,21 @@
+diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em
+--- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em	2007-06-18 19:31:40.000000000 +0200
++++ binutils-2.17.50.0.17/ld/emultempl/elf32.em	2007-06-25 10:01:25.000000000 +0200
+@@ -1007,6 +1007,8 @@
+ 	      && command_line.rpath == NULL)
+ 	    {
+ 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
++	      if ((lib_path) && (strlen (lib_path) == 0))
++		  lib_path = NULL;
+ 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ 						      force))
+ 		break;
+@@ -1191,6 +1193,8 @@
+   rpath = command_line.rpath;
+   if (rpath == NULL)
+     rpath = (const char *) getenv ("LD_RUN_PATH");
++  if ((rpath) && (strlen (rpath) == 0))
++      rpath = NULL;
+   if (! (bfd_elf_size_dynamic_sections
+ 	 (output_bfd, command_line.soname, rpath,
+ 	  command_line.filter_shlib,
package/binutils/binutils-2.19-arc/500-sysroot.patch new file +36 -0
new file mode 100644
index 0000000..d21e4cb
@@ -0,0 +1,36 @@
+Signed-off-by: Sven Rebhan <[email protected]>
+
+Always try to prepend the sysroot prefix to absolute filenames first.
+
+http://bugs.gentoo.org/275666
+http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -308,18 +308,24 @@
+      directory first.  */
+   if (! entry->is_archive)
+     {
+-      if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
++      /* For absolute pathnames, try to always open the file in the
++	 sysroot first. If this fails, try to open the file at the
++	 given location. */
++      entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
++      if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
+ 	{
+ 	  char *name = concat (ld_sysroot, entry->filename,
+ 			       (const char *) NULL);
+ 	  if (ldfile_try_open_bfd (name, entry))
+ 	    {
+ 	      entry->filename = name;
++	      entry->sysrooted = TRUE;
+ 	      return TRUE;
+ 	    }
+ 	  free (name);
+ 	}
+-      else if (ldfile_try_open_bfd (entry->filename, entry))
++
++      if (ldfile_try_open_bfd (entry->filename, entry))
+ 	{
+ 	  entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
+ 	    && is_sysrooted_pathname (entry->filename, TRUE);
package/binutils/binutils.mk +3 -0
index 92e0a74..d387c27 100644
@@ -26,6 +26,9 @@ BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils
 ifeq ($(ARCH),avr32)
 BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
 endif
+ifeq ($(ARCH),arc)
+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
#8 lore raw

PATCH 3/7 arc: Add support for ARC-specific binutils

Dear Mischa Jonker,

Quoted 3 lines · Mischa Jonker

ARC support is not upstream yet...

This looks good, but it doesn't build here: it fails because 'makeinfo' is not available.

WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a .texi' or .texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy make' (AIX, DU, IRIX). You might want to install the Texinfo' package or the `GNU make' package. Grab either from any GNU archive site.
[...]
make[2]: *** [all] Error 2
make[1]: *** [/home/test/outputs/arc/build/host-binutils-2.19-arc/.stamp_built] Error 2
make: *** [all] Error 2

makeinfo is no longer a mandatory dependency of Buildroot, and therefore we've removed it from our autobuilder chroots. binutils 2.22 builds fine without it, it seems like binutils 2.19 will need a few more tricks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

PATCH 3/7 arc: Add support for ARC-specific binutils

In reply to Mischa Jonker
Quoted 19 lines · Mischa Jonker

ARC support is not upstream yet...

---
  package/binutils/Config.in.host                    |   17 ++++++---
  .../300-001_ld_makefile_patch.patch                |   24 +++++++++++++
  .../300-012_check_ldrunpath_length.patch           |   21 +++++++++++
  .../binutils/binutils-2.19-arc/500-sysroot.patch   |   36 ++++++++++++++++++++
  package/binutils/binutils.mk                       |    3 ++
  5 files changed, 95 insertions(+), 6 deletions(-)

create mode 100644 package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch create mode 100644 package/binutils/binutils-2.19-arc/300-012_check_ldrunpath_length.patch create mode 100644 package/binutils/binutils-2.19-arc/500-sysroot.patch

package/binutils/Config.in.host +0 -0
index a61a503..b634796 100644

package/binutils/Config.in.host choice · line 18

Quoted 7 lines
package/binutils/Config.in.host +4 -0
@@ -12,28 +12,32 @@ choice
  	       depends on BR2_avr32
  	       bool "binutils 2.18-avr32-1.0.1"
 
+	config BR2_BINUTILS_VERSION_2_19_ARC
+		depends on BR2_arc || BR2_arceb
+		bool "binutils 2.19-arc"
+

Do you expect that there actually will be several binutils versions for
ARC (until it's accepted upstream, obviously)? If not, then I'd prefer to make the whole choice depend on !BR2_arc and define this config outside of the choice (and without prompt). If later on there turns out to be another binutils version with ARC support, it can easily be moved inside the choice.

package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch

Quoted 44 lines
package/binutils/Config.in.host +7 -6
  	config BR2_BINUTILS_VERSION_2_20_1
-		depends on !BR2_avr32
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32)
  		bool "binutils 2.20.1"
 
  	config BR2_BINUTILS_VERSION_2_21
-		depends on !BR2_avr32
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32)
  		bool "binutils 2.21"
 
  	config BR2_BINUTILS_VERSION_2_21_1
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
  		bool "binutils 2.21.1"
 
  	config BR2_BINUTILS_VERSION_2_22
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
  		bool "binutils 2.22"
 
  	config BR2_BINUTILS_VERSION_2_23_1
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
  		bool "binutils 2.23.1"
 
  	config BR2_BINUTILS_VERSION_2_23_2
-		depends on !(BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
+		depends on !(BR2_arc || BR2_arceb || BR2_avr32 || BR2_UCLIBC_VERSION_0_9_31)
  		bool "binutils 2.23.2"
 
  endchoice
@@ -41,6 +45,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_BINUTILS_VERSION_2_19_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-2.19-arc/300-001_ld_makefile_patch.patch new file +0 -0
new file mode 100644
index 0000000..5cb0f61

Please add the equivalent of a commit message to the patches: single
line short description, blank line, extended explanation, blank line, Signed-off-by line. See docs/manual/patch-policy.txt

package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch line 3

Quoted 4 lines
package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch new file +3 -0
@@ -0,0 +1,24 @@
+diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
+--- binutils-2.17.50.0.17.oorig/ld/Makefile.am	2007-06-18 19:29:29.000000000 +0200
++++ binutils-2.17.50.0.17/ld/Makefile.am	2007-06-25 10:00:36.000000000 +0200

^^ This doesn't seem right...

package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch line 12

Quoted 9 lines
package/binutils/binutils-2.19-arc/300-001_ld_makefile_patch.patch new file +9 -0
+@@ -18,7 +18,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@

Otherwise, looks good.

Regards,
Arnout

[snip]

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
#10 lore raw

PATCH 3/7 arc: Add support for ARC-specific binutils

In reply to Mischa Jonker

On 22/04/13 13:37, Mischa Jonker wrote:
[snip]

package/binutils/binutils.mk BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils · line 29

Quoted 9 lines
package/binutils/binutils.mk +1 -0
index 92e0a74..d387c27 100644
@@ -26,6 +26,9 @@ BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils
  ifeq ($(ARCH),avr32)
  BINUTILS_SITE =ftp://www.at91.com/pub/buildroot
  endif
+ifeq ($(ARCH),arc)

What about arceb?

Regards,
Arnout

Quoted 5 lines
package/binutils/binutils.mk +2 -0
+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 · 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
#11 lore raw

PATCH 4/7 arc: Add ARC specific kernel headers

In reply to Mischa Jonker

ARC architecture will be on kernel.org from 3.9 onwards. For now we still need to use a out-of-tree kernel tarball.

---
 Makefile                                   |    1 +
 toolchain/kernel-headers/Config.in         |   19 ++++++++++++++-----
 toolchain/kernel-headers/kernel-headers.mk |    4 +++-
 3 files changed, 18 insertions(+), 6 deletions(-)
Makefile +1 -0
index 0a91658..8fef492 100644
@@ -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 +14 -5
index ec75c34..7db815b 100644
@@ -7,6 +7,7 @@ comment "Kernel Header Options"
 choice
 	prompt "Kernel Headers"
 	default BR2_KERNEL_HEADERS_3_8
+	default BR2_KERNEL_HEADERS_3_8_ARC	if (BR2_arc || BR2_arceb)
 	help
 	  Select the version of kernel header files you wish to use.
 	  You must select the correct set of header files to match
@@ -17,35 +18,42 @@ choice
 
 	config BR2_KERNEL_HEADERS_3_0
 		bool "Linux 3.0.x kernel headers"
+		depends on !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_1
 		bool "Linux 3.1.x kernel headers"
-		depends on BR2_DEPRECATED
+		depends on BR2_DEPRECATED && !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_2
 		bool "Linux 3.2.x kernel headers"
+		depends on !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_3
 		bool "Linux 3.3.x kernel headers"
-		depends on BR2_DEPRECATED
+		depends on BR2_DEPRECATED && !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_4
 		bool "Linux 3.4.x kernel headers"
+		depends on !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_5
 		bool "Linux 3.5.x kernel headers"
-		depends on BR2_DEPRECATED
+		depends on BR2_DEPRECATED && !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_6
 		bool "Linux 3.6.x kernel headers"
-		depends on BR2_DEPRECATED
+		depends on BR2_DEPRECATED && !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_7
 		bool "Linux 3.7.x kernel headers"
-		depends on BR2_DEPRECATED
+		depends on BR2_DEPRECATED && !(BR2_arc || BR2_arceb)
 
 	config BR2_KERNEL_HEADERS_3_8
 		bool "Linux 3.8.x kernel headers"
+		depends on !(BR2_arc || BR2_arceb)
+	
+	config BR2_KERNEL_HEADERS_3_8_ARC
+		bool "Linux 3.8-arc kernel headers"
 
 	config BR2_KERNEL_HEADERS_VERSION
 		bool "Manually specified Linux version"
@@ -72,5 +80,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.8-arc"	if BR2_KERNEL_HEADERS_3_8_ARC
 	default "2.6"		if BR2_KERNEL_HEADERS_SNAP
 	default $BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
toolchain/kernel-headers/kernel-headers.mk +3 -1
index adf7bc4..7c4910f 100644
@@ -26,7 +26,9 @@ SUBLEVEL:=$(if $(SUBLEVEL),.$(SUBLEVEL),)
 EXTRAVERSION:=$(if $(EXTRAVERSION),.$(EXTRAVERSION),)
 
 LINUX_HEADERS_VERSION:=$(VERSION).$(PATCHLEVEL)$(SUBLEVEL)$(EXTRAVERSION)
-ifeq ($(findstring x2.6.,x$(DEFAULT_KERNEL_HEADERS)),x2.6.)
+ifeq ($(findstring arc,x$(DEFAULT_KERNEL_HEADERS)),arc)
+LINUX_HEADERS_SITE:=$(BR2_ARC_SITE)
+else ifeq ($(findstring x2.6.,x$(DEFAULT_KERNEL_HEADERS)),x2.6.)
 LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR:/=)/linux/kernel/v2.6/
 else
 LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR:/=)/linux/kernel/v3.x/
Signature · 1 line
1.7.0.4
#12 lore raw

PATCH 4/7 arc: Add ARC specific kernel headers

Dear Mischa Jonker,

Quoted 4 lines · Mischa Jonker

ARC architecture will be on kernel.org from 3.9 onwards. For now we still need to use a out-of-tree kernel tarball.

We managed to avoid architecture-specific versions of the kernel until now, but seems like in this case it's unavoidable until 3.9 is released... which should happen next week. Maybe we could already replace this by a patch that adds 3.9, currently pointing to 3.9-rc8, and that we would change once the final 3.9 is out?

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
#13 lore raw

PATCH 5/7 arc: Add support for ARC-specific GCC

In reply to Mischa Jonker

ARC support in GCC is not upstream yet...

---
 support/gnuconfig/config.sub                       |    4 +-
 toolchain/Config.in                                |    3 +-
 .../gcc/4.4.7-arc/fix_branch_out_of_range.patch    |   22 ++++++++++++++++++++
 toolchain/gcc/Config.in                            |   22 ++++++++++++-------
 toolchain/gcc/gcc-uclibc-4.x.mk                    |    4 +++
 5 files changed, 44 insertions(+), 11 deletions(-)
 create mode 100644 toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch
support/gnuconfig/config.sub +2 -2
index 8509813..b2958ad 100755
@@ -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-* \
toolchain/Config.in +2 -1
index fa78cf4..5d1c592 100644
@@ -22,7 +22,8 @@ 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 && !BR2_arceb
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	help
 	  Say 'y' if you want to generate the toolchain with crosstool-NG
toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch new file +22 -0
new file mode 100644
index 0000000..f042a71
@@ -0,0 +1,22 @@
+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
index d7e8715..2396e8e 100644
@@ -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 || BR2_arceb
 	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 || BR2_arceb
+		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_arceb && !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_arceb && !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_arceb && !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_arceb && !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_arceb && !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_arceb && !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_arceb && !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 && !BR2_arceb
 	help
 	  Enable OpenMP support for the compiler
toolchain/gcc/gcc-uclibc-4.x.mk +4 -0
index fc11ad4..31afd48 100644
@@ -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
@@ -63,7 +65,9 @@ endif
 
 # Determine soft-float options
 ifeq ($(BR2_SOFT_FLOAT),y)
+ifeq ($(BR2_arc)$(BR2_arceb),)
 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
#14 lore raw

PATCH 5/7 arc: Add support for ARC-specific GCC

Dear Mischa Jonker,

Quoted 26 lines · Mischa Jonker

ARC support in GCC is not upstream yet...

---
 support/gnuconfig/config.sub                       |    4 +-
 toolchain/Config.in                                |    3 +-
 .../gcc/4.4.7-arc/fix_branch_out_of_range.patch    |   22 ++++++++++++++++++++
 toolchain/gcc/Config.in                            |   22 ++++++++++++-------
 toolchain/gcc/gcc-uclibc-4.x.mk                    |    4 +++
 5 files changed, 44 insertions(+), 11 deletions(-)
 create mode 100644 toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch
support/gnuconfig/config.sub +1 -1
index 8509813..b2958ad 100755
@@ -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 \

support/gnuconfig/config.sub case $basic_machine in · line 378

Quoted 8 lines
support/gnuconfig/config.sub +1 -1
@@ -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-* \

This should be in a separate patch. Is this change upstream in the gnuconfig project. We from time to time sync up with the upstream variant, so if you want those changes to be preserved over time, they need to be upstreamed.

Quoted 5 lines
toolchain/Config.in +0 -0
index fa78cf4..5d1c592 100644

toolchain/Config.in config BR2_TOOLCHAIN_EXTERNAL · line 29

Quoted 9 lines
toolchain/Config.in +2 -1
@@ -22,7 +22,8 @@ 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 && !BR2_arceb
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	help
 	  Say 'y' if you want to generate the toolchain with crosstool-NG

This should also be part of a separate patch, ideally.

Quoted 18 lines
toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch new file +12 -0
new file mode 100644
index 0000000..f042a71
@@ -0,0 +1,22 @@
+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)

toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch line 22

Quoted 10 lines
toolchain/gcc/4.4.7-arc/fix_branch_out_of_range.patch new file +10 -0
+ 		  && 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

Patch lacks a description + Signed-off-by.

Quoted 50 lines
toolchain/gcc/Config.in +10 -5
index d7e8715..2396e8e 100644
@@ -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 || BR2_arceb
 	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 || BR2_arceb
+		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_arceb && !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_arceb && !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_arceb && !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_arceb && !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_arceb && !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

toolchain/gcc/Config.in choice · line 56

Quoted 10 lines
toolchain/gcc/Config.in +2 -2
-		depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
+		depends on !BR2_arc && !BR2_arceb && !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_arceb && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc snapshot"

Hum, not really nice. Maybe it's time to split the lines. Or even to have something like "BR2_ARCH_HAS_GCC_4_8", "BR2_ARCH_HAS_GCC_4_5", etc. But maybe that can be as follow-up cleanups.

Quoted 31 lines
toolchain/gcc/Config.in +2 -1
 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 && !BR2_arceb
 	help
 	  Enable OpenMP support for the compiler
toolchain/gcc/gcc-uclibc-4.x.mk +2 -0
index fc11ad4..31afd48 100644
@@ -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

toolchain/gcc/gcc-uclibc-4.x.mk endif · line 70

Quoted 6 lines
toolchain/gcc/gcc-uclibc-4.x.mk +2 -0
@@ -63,7 +65,9 @@ endif
 
 # Determine soft-float options
 ifeq ($(BR2_SOFT_FLOAT),y)
+ifeq ($(BR2_arc)$(BR2_arceb),)
 SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+endif

Hum. Maybe this --with-float=soft should instead only be passed for the architectures for which it makes sense (ARM? PowerPC?).

toolchain/gcc/gcc-uclibc-4.x.mk endif · line 73

Quoted 3 lines
toolchain/gcc/gcc-uclibc-4.x.mk +0 -0
 ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm
 TARGET_SOFT_FLOAT:=-mfloat-abi=soft
 else

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#15 lore raw

PATCH 5/7 arc: Add support for ARC-specific GCC

Quoted 6 lines

support/gnuconfig/config.sub case $basic_machine in · line 262

Quoted 4 lines
(quoted diff) +0 -0

b/support/gnuconfig/config.sub index 8509813..b2958ad 100755

support/gnuconfig/config.sub +1 -1
-	| arc \
+	| arc | arceb \

This should be in a separate patch. Is this change upstream in the gnuconfig project. We from time to time sync up with the upstream variant, so if you want those changes to be preserved over time, they need to be upstreamed.

The change is in the upstream project now. Would you like me to change the gnuconfig patch in BuildRoot from 'add ARC to gnuconfig' to 'update gnuconfig from upstream'?

Mischa

#16 lore raw

PATCH 5/7 arc: Add support for ARC-specific GCC

Dear Mischa Jonker,

Quoted 8 lines · Mischa Jonker
Quoted 4 lines

This should be in a separate patch. Is this change upstream in the gnuconfig project. We from time to time sync up with the upstream variant, so if you want those changes to be preserved over time, they need to be upstreamed.

The change is in the upstream project now. Would you like me to change the gnuconfig patch in BuildRoot from 'add ARC to gnuconfig' to 'update gnuconfig from upstream'?

Yes, that'd be great.

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
#17 lore raw

PATCH 5/7 arc: Add support for ARC-specific GCC

Hi Thomas,

Quoted 5 lines
Quoted 3 lines

The change is in the upstream project now. Would you like me to change the gnuconfig patch in BuildRoot from 'add ARC to gnuconfig' to 'update gnuconfig from upstream'?

Yes, that'd be great.

There are some patches with your name on it in support/gnuconfig/patches. These patches seem to be applied already on support/gnuconfig/*. I have updated these patches so that they apply cleanly on top of the new gnuconfig (+small ARC-specific addition), but they still have your Signed-off-by tag.

What's the proper procedure for signing off patches within a patch?

Mischa

#18 lore raw

PATCH 5/7 arc: Add support for ARC-specific GCC

Mischa, All,

Quoted 6 lines · Mischa Jonker

There are some patches with your name on it in support/gnuconfig/patches. These patches seem to be applied already on support/gnuconfig/*. I have updated these patches so that they apply cleanly on top of the new gnuconfig (+small ARC-specific addition), but they still have your Signed-off-by tag.

What's the proper procedure for signing off patches within a patch?

Two options:
- update the patch, add your SoB-line
- add a new patch with only your SoB-line

If your change adds a new semantic change (which is the case: add a new architecture), then I'd favour the second option.

If your change is an addition (as a fix, or for completeness), then go for option 1.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#19 lore raw

PATCH 6/7 arc: Add support for ARC-specific uClibc

In reply to Mischa Jonker
---
 toolchain/uClibc/Config.in                |   12 +-
 toolchain/uClibc/uClibc-0.9.33-arc.config |  251 +++++++++++++++++++++++++++++
 toolchain/uClibc/uclibc.mk                |    4 +
 3 files changed, 264 insertions(+), 3 deletions(-)
 create mode 100644 toolchain/uClibc/uClibc-0.9.33-arc.config
toolchain/uClibc/Config.in +9 -3
index b98e2e8..6e85fdd 100644
@@ -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_arceb || 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_arceb || BR2_xtensa)
+	
+	config BR2_UCLIBC_VERSION_0_9_33_ARC
+		bool "uClibc 0.9.33.x-arc"
+		depends on (BR2_arc || BR2_arceb)
+	
 	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-0.9.33-arc.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-0.9.33-arc.config new file +251 -0

251 lines not on this page · raw message

toolchain/uClibc/uclibc.mk +4 -0
index 2249651..1629e76 100644
@@ -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
#20 lore raw

PATCH 6/7 arc: Add support for ARC-specific uClibc

Dear Mischa Jonker,

Quoted 4 lines · Mischa Jonker
---
 toolchain/uClibc/Config.in                |   12 +-
 toolchain/uClibc/uClibc-0.9.33-arc.config |  251 +++++++++++++++++++++++++++++

Do you really need a separate uClibc-<something>.config? I think we really would like to avoid that if possible.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#21 lore raw

PATCH 7/7 arc: Make sure that libgcc doesn't get included when it doesn't exist yet

In reply to Mischa Jonker

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.

---
 toolchain/uClibc/uclibc.mk |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
toolchain/uClibc/uclibc.mk +8 -2
index 1629e76..14083a9 100644
@@ -404,6 +404,12 @@ ifeq ($(BR2_CCACHE),y)
 $(UCLIBC_DIR)/.config: | host-ccache
 endif
 
+ifeq ($(BR2_arc)$(BR2_arceb),)
+REALLY_NOSTDLIB=
+else
+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 +428,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
#22 lore raw

PATCH 7/7 arc: Make sure that libgcc doesn't get included when it doesn't exist yet

Dear Mischa Jonker,

Quoted 18 lines · Mischa Jonker

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.

---
 toolchain/uClibc/uclibc.mk |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
toolchain/uClibc/uclibc.mk +0 -0
index 1629e76..14083a9 100644

toolchain/uClibc/uclibc.mk ifeq ($(BR2_CCACHE),y) · line 411

Quoted 8 lines
toolchain/uClibc/uclibc.mk +5 -0
@@ -404,6 +404,12 @@ ifeq ($(BR2_CCACHE),y)
 $(UCLIBC_DIR)/.config: | host-ccache
 endif
 
+ifeq ($(BR2_arc)$(BR2_arceb),)
+REALLY_NOSTDLIB=
+else
+REALLY_NOSTDLIB=-really-nostdlib
+endif

Could you copy/paste parts of your commit log as a comment above this piece of code? This would make it easier to understand. Also, you could write it this way:

ifeq ($(BR2_arc)$(BR2_arceb),y)
REALLY_NOSTDLIB=-really-nostdlib
endif

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#23 lore raw

cover RFC: ARC port

In reply to Mischa Jonker

Dear Mischa Jonker,

Quoted 8 lines · Mischa Jonker

In the following patch series I've added ARC support to the "master" tree of BuildRoot. As ARC support is not yet in all upstream open source packages, I've taken the freedom to add an option for an additional download site, from which ARC-specific versions of gcc, binutils, etc. can be downloaded.

ARC will be in Linux 3.9, so that would be the first package that can be removed from this ARC-specific download site.

Quoted 6 lines

The below patchset builds the toolchain, and a working root file system. Most simple packages build OK, but mplayer for instance does not have ARC support, and there are probably others as well.

Could you please have a look at the patches and let me know what to do to make them BuildRoot-worthy?

Thanks for sending out all those patches! I'm going to reply to them individually for comments.

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
#24 lore raw

[Buildroot] Plan of libffi support?

In reply to Mischa Jonker

Dear Mischa Jonker,

Quoted 8 lines · Mischa Jonker

In the following patch series I've added ARC support to the "master" tree of BuildRoot. As ARC support is not yet in all upstream open source packages, I've taken the freedom to add an option for an additional download site, from which ARC-specific versions of gcc, binutils, etc. can be downloaded.

ARC will be in Linux 3.9, so that would be the first package that can be removed from this ARC-specific download site.

Quoted 6 lines

The below patchset builds the toolchain, and a working root file system. Most simple packages build OK, but mplayer for instance does not have ARC support, and there are probably others as well.

Could you please have a look at the patches and let me know what to do to make them BuildRoot-worthy?

Do you have plans to get ARC support in libffi
<http://sourceware.org/libffi/> ? This library requires some architecture-specific bits, and is used as a dependency for the Python interpreter, but also more importantly for the glib library from the Gtk world. And this glib library is used as a dependency in gazillions of packages: Gtk+, GStreamer, Bluez-utils, Connman, and many, many more things. For this reason, having an architecture supported in Buildroot that doesn't have libffi support is a big pain, because we have to add the "depends on !BR2_arc && !BR2_arceb" on all the packages that have Glib as a dependency in their dependency chain.

So, we can live for a while without libffi support, but it would be good to know if libffi support is somewhere in your plans in the future.

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
#25 lore raw

[Buildroot] Plan of libffi support?

Hello Thomas, Arnout, mailinglist,

First of all many thanks for your quick review, I'm preparing a v2 set of patches which should be ready later today.

Regarding your remark on libffi:

Quoted 6 lines

Do you have plans to get ARC support in libffi <http://sourceware.org/libffi/> ? This library requires some architecture-specific bits, and is used as a dependency for the Python interpreter, but also more importantly for the glib library from the Gtk world. And this glib library is used as a dependency in gazillions of packages: Gtk+, GStreamer, Bluez-utils, Connman, and many, many more things.

So, we can live for a while without libffi support, but it would be good to know if libffi support is somewhere in your plans in the future.

Yes, it makes perfect sense to add support for ARC here. So this is something that we are definitely planning to do in the coming weeks. In fact, if you have other suggestions of packages that would require specific ARC support, please let me know, so that we can plan for these as well (if it makes sense).

Thanks again,

Mischa

#26 lore raw

[Buildroot] Plan of libffi support?

Dear Mischa Jonker,

Quoted 2 lines · Mischa Jonker

Yes, it makes perfect sense to add support for ARC here. So this is something that we are definitely planning to do in the coming weeks.

Excellent!

Quoted 3 lines

In fact, if you have other suggestions of packages that would require specific ARC support, please let me know, so that we can plan for these as well (if it makes sense).

From a Buildroot perspective, libffi is really the most annoying architecture-specific part because it has many, many reverse dependencies that would all have to be disabled specifically for ARC. And also because adding a new architecture support in libffi is not just a matter of adding a few additional defines, it requires a fairly intimate knowledge of the instruction set and the calling conventions.

The other packages that I can think of that are probably useful when you start a new architecture are things like strace and ltrace.

But anyway, once the ARC port is in mainline Buildroot, I'll add an ARC configuration to our autobuilders, and we'll quickly see where the problems are :-)

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