Skip to contentSkip to conversation

Add Microblaze internal toolchain

PATCH Superseded Spenser Gilliland 3 participants 10 messages Nov 12, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add Microblaze internal toolchain

This patch series adds a Microblaze internal toolchain from the sources at
http://github.com/Xilinx .

Spenser Gilliland (5):
binutils: add microblaze internal toolchain
gcc: add microblaze internal toolchain
glibc: add microblaze internal toolchain
gdb: add microblaze internal toolchain
toolchain: enable microblaze toolchain

 package/binutils/Config.in.host                    |    2 +
 package/binutils/binutils.mk                       |    5 +
 package/gcc/4.9-microblaze/100-uclibc-conf.patch   |   15 ++
 .../4.9-microblaze/301-missing-execinfo_h.patch    |   13 ++
 package/gcc/4.9-microblaze/302-c99-snprintf.patch  |   13 ++
 .../305-libmudflap-susv3-legacy.patch              |   49 +++++++
 .../gcc/4.9-microblaze/disable_gc_sections.patch   |  145 ++++++++++++++++++++
 package/gcc/Config.in.host                         |   36 ++++--
 package/gcc/gcc.mk                                 |   12 ++-
 package/gdb/Config.in.host                         |    4 +
 package/gdb/gdb.mk                                 |    9 +-
 package/glibc/glibc.mk                             |   12 ++
 toolchain/Config.in                                |    2 +-
 toolchain/toolchain-buildroot/Config.in            |    4 +-
 14 files changed, 305 insertions(+), 16 deletions(-)
 create mode 100644 package/gcc/4.9-microblaze/100-uclibc-conf.patch
 create mode 100644 package/gcc/4.9-microblaze/301-missing-execinfo_h.patch
 create mode 100644 package/gcc/4.9-microblaze/302-c99-snprintf.patch
 create mode 100644 package/gcc/4.9-microblaze/305-libmudflap-susv3-legacy.patch
 create mode 100644 package/gcc/4.9-microblaze/disable_gc_sections.patch
#1 lore raw

PATCH v2 1/5 binutils: add microblaze internal toolchain

---
 package/binutils/Config.in.host |    2 ++
 package/binutils/binutils.mk    |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)
package/binutils/Config.in.host +2 -0
index 8f19597..e43261b 100644
@@ -3,6 +3,7 @@ comment "Binutils Options"
 choice
 	prompt "Binutils Version"
 	depends on !BR2_arc
+	depends on !BR2_microblaze
 	default BR2_BINUTILS_VERSION_2_21 if (BR2_mips || BR2_mipsel || BR2_sh)
 	default BR2_BINUTILS_VERSION_2_22
 	help
@@ -45,6 +46,7 @@ config BR2_BINUTILS_VERSION
 	string
 	default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1
 	default "2.23.2-arc"	if BR2_arc
+	default "2.24.51-microblaze" if BR2_microblaze
 	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 +5 -0
index f1723b2..0d809c1 100644
@@ -29,6 +29,11 @@ endif
 ifeq ($(BR2_arc),y)
 BINUTILS_SITE = $(BR2_ARC_SITE)
 endif
+ifeq ($(BR2_microblaze),y)
+BINUTILS_VERSION = 8351467c933d277ebea0c8d99ad2b65b5f7b6bc2
+BINUTILS_SITE = http://github.com/Xilinx/binutils/tarball/$(BINUTILS_VERSION)
+BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz
+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.1
#2 lore raw

PATCH v2 2/5 gcc: add microblaze internal toolchain

In reply to Spenser Gilliland
---
 package/gcc/4.9-microblaze/100-uclibc-conf.patch   |   15 ++
 .../4.9-microblaze/301-missing-execinfo_h.patch    |   13 ++
 package/gcc/4.9-microblaze/302-c99-snprintf.patch  |   13 ++
 .../305-libmudflap-susv3-legacy.patch              |   49 +++++++
 .../gcc/4.9-microblaze/disable_gc_sections.patch   |  145 ++++++++++++++++++++
 package/gcc/Config.in.host                         |   36 ++++--
 package/gcc/gcc.mk                                 |   12 ++-
 7 files changed, 271 insertions(+), 12 deletions(-)
 create mode 100644 package/gcc/4.9-microblaze/100-uclibc-conf.patch
 create mode 100644 package/gcc/4.9-microblaze/301-missing-execinfo_h.patch
 create mode 100644 package/gcc/4.9-microblaze/302-c99-snprintf.patch
 create mode 100644 package/gcc/4.9-microblaze/305-libmudflap-susv3-legacy.patch
 create mode 100644 package/gcc/4.9-microblaze/disable_gc_sections.patch
package/gcc/4.9-microblaze/100-uclibc-conf.patch new file +15 -0
new file mode 100644
index 0000000..d56bf0a
@@ -0,0 +1,15 @@
+Index: gcc-4.8.0/contrib/regression/objs-gcc.sh
+===================================================================
+--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh	2009-04-09 17:00:19.000000000 +0200
++++ gcc-4.8.0/contrib/regression/objs-gcc.sh	2013-03-23 17:39:04.000000000 +0100
+@@ -106,6 +106,10 @@
+  then
+   make all-gdb all-dejagnu all-ld || exit 1
+   make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++  make all-gdb all-dejagnu all-ld || exit 1
++  make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+   make bootstrap || exit 1
+   make install || exit 1
package/gcc/4.9-microblaze/301-missing-execinfo_h.patch new file +13 -0
new file mode 100644
index 0000000..00efda2
@@ -0,0 +1,13 @@
+Index: gcc-4.8.0/boehm-gc/include/gc.h
+===================================================================
+--- gcc-4.8.0.orig/boehm-gc/include/gc.h	2007-04-23 23:10:09.000000000 +0200
++++ gcc-4.8.0/boehm-gc/include/gc.h	2013-03-23 17:39:20.000000000 +0100
+@@ -503,7 +503,7 @@
+ #if defined(__linux__) || defined(__GLIBC__)
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+-     && !defined(__ia64__)
++     && !defined(__ia64__) && !defined(__UCLIBC__)
+ #   ifndef GC_HAVE_BUILTIN_BACKTRACE
+ #     define GC_HAVE_BUILTIN_BACKTRACE
+ #   endif
package/gcc/4.9-microblaze/302-c99-snprintf.patch new file +13 -0
new file mode 100644
index 0000000..cd4d2cc
@@ -0,0 +1,13 @@
+Index: gcc-4.8.0/libstdc++-v3/include/c_global/cstdio
+===================================================================
+--- gcc-4.8.0.orig/libstdc++-v3/include/c_global/cstdio	2013-02-03 18:54:05.000000000 +0100
++++ gcc-4.8.0/libstdc++-v3/include/c_global/cstdio	2013-03-23 17:39:32.000000000 +0100
+@@ -138,7 +138,7 @@
+   using ::vsprintf;
+ } // namespace
+ 
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
+ 
+ #undef snprintf
+ #undef vfscanf
package/gcc/4.9-microblaze/305-libmudflap-susv3-legacy.patch new file +49 -0

49 lines not on this page · raw message

package/gcc/4.9-microblaze/disable_gc_sections.patch new file +145 -0

145 lines not on this page · raw message

package/gcc/Config.in.host +27 -9
index 41c1213..1c8beba 100644
@@ -3,11 +3,18 @@ comment "GCC Options"
 config BR2_GCC_NEEDS_MPC
 	bool
 
+# Until gcc 4.7, a three stage build process was needed when using
+# NPTL. This hidden option tells whether gcc is a version that
+# requires this three stage build process.
+config BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
+	bool
+
 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_8_ARC if BR2_arc
+	default BR2_GCC_VERSION_4_9_MICROBLAZE if BR2_microblaze
 	default BR2_GCC_VERSION_4_5_X if BR2_bfin
 	default BR2_GCC_VERSION_4_7_X
 	help
@@ -16,39 +23,44 @@ choice
 	config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
 		depends on BR2_avr32
 		bool "gcc 4.2.2-avr32-2.1.5"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_3_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
+		depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
 		depends on !BR2_ARM_EABIHF
 		bool "gcc 4.3.x"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_4_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
+		depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
 		bool "gcc 4.4.x"
 		# ARM EABIhf support appeared in gcc 4.6
 		depends on !BR2_ARM_EABIHF
 		# VFPv4 support appeared in gcc 4.5
 		depends on !BR2_ARM_FPU_VFPV4 && !BR2_ARM_FPU_VFPV4D16
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_5_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4
+		depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4
 		select BR2_GCC_NEEDS_MPC
 		# ARM EABIhf support appeared in gcc 4.6
 		depends on !BR2_ARM_EABIHF
 		bool "gcc 4.5.x"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_6_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
+		depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc 4.6.x"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_7_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
+		depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc 4.7.x"
 
 	config BR2_GCC_VERSION_4_8_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
+		depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc 4.8.x"
 
@@ -57,8 +69,13 @@ choice
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc 4.8-arc"
 
+	config BR2_GCC_VERSION_4_9_MICROBLAZE
+		depends on BR2_microblaze
+		select BR2_GCC_NEEDS_MPC
+		bool "gcc 4.9-microblaze"
+
 	config BR2_GCC_VERSION_SNAP
-		depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
+		depends on !BR2_microblaze && !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
@@ -89,8 +106,9 @@ config BR2_GCC_VERSION
 	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
-	default "4.8.2"     if BR2_GCC_VERSION_4_8_X
+	default "4.8.1"     if BR2_GCC_VERSION_4_8_X
 	default "4.8-arc"   if BR2_GCC_VERSION_4_8_ARC
+	default "4.9-microblaze" if BR2_GCC_VERSION_4_9_MICROBLAZE
 	default BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP
 
 config BR2_EXTRA_GCC_CONFIG_OPTIONS
@@ -143,7 +161,7 @@ config BR2_GCC_ENABLE_TLS
 
 config BR2_GCC_ENABLE_OPENMP
 	bool "Enable compiler OpenMP support"
-	depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc
+	depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc && !BR2_microblaze
 	help
 	  Enable OpenMP support for the compiler
 
package/gcc/gcc.mk +9 -3
index 41600ef..7414d6d 100644
@@ -17,15 +17,21 @@ endif
 
 ifneq ($(GCC_SNAP_DATE),)
 GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
 else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
 GCC_SITE = ftp://www.at91.com/pub/buildroot/
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
 else ifeq ($(findstring arc,$(GCC_VERSION)),arc)
 GCC_SITE = $(BR2_ARC_SITE)
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+else ifeq ($(findstring microblaze,$(GCC_VERSION)),microblaze)
+MBGCC_VERSION = b93bb009e021aba64dd4b8cdb0bbc5a176c55543
+GCC_SITE = http://github.com/Xilinx/gcc/tarball/$(MBGCC_VERSION)
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
 GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION)
-endif
-
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+endif
 
 #
 # Xtensa special hook
@@ -60,7 +66,7 @@ endef
 #
 
 define HOST_GCC_EXTRACT_CMDS
-	$(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \
+	$(call suitable-extractor,$(GCC_SOURCE),$(BZCAT)) $(DL_DIR)/$(GCC_SOURCE) | \
 		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \
 		--exclude='libjava/*' \
 		--exclude='libgo/*' \
Signature · 1 line
1.7.1
#3 lore raw

PATCH v2 2/5 gcc: add microblaze internal toolchain

Dear Spenser Gilliland,

package/gcc/Config.in.host comment "GCC Options" · line 10

Quoted 5 lines · Spenser Gilliland
package/gcc/Config.in.host +5 -0
+# Until gcc 4.7, a three stage build process was needed when using
+# NPTL. This hidden option tells whether gcc is a version that
+# requires this three stage build process.
+config BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
+	bool

Hum, is this really meant to be part of your patch? :-)

package/gcc/Config.in.host choice · line 26

Quoted 5 lines
package/gcc/Config.in.host +1 -0
@@ -16,39 +23,44 @@ choice
 	config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
 		depends on BR2_avr32
 		bool "gcc 4.2.2-avr32-2.1.5"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD

and this (and all the other occurrences).

package/gcc/gcc.mk endif · line 28

Quoted 3 lines
package/gcc/gcc.mk +3 -0
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+else ifeq ($(findstring microblaze,$(GCC_VERSION)),microblaze)
+MBGCC_VERSION = b93bb009e021aba64dd4b8cdb0bbc5a176c55543

MBGCC_VERSION ?

Quoted 12 lines
package/gcc/gcc.mk +3 -2
+GCC_SITE = http://github.com/Xilinx/gcc/tarball/$(MBGCC_VERSION)
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
 GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION)
-endif
-
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+endif
 
 #
 # Xtensa special hook

package/gcc/gcc.mk endef · line 69

Quoted 5 lines
package/gcc/gcc.mk +1 -1
@@ -60,7 +66,7 @@ endef
 #
 
 define HOST_GCC_EXTRACT_CMDS
-	$(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \
+	$(call suitable-extractor,$(GCC_SOURCE),$(BZCAT)) $(DL_DIR)/$(GCC_SOURCE) | \

The suitable-extractor macro doesn't take a second argument, so the ,$(BZCAT) here is useless.

package/gcc/gcc.mk endef · line 72

Quoted 3 lines
package/gcc/gcc.mk +0 -0
 		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \
 		--exclude='libjava/*' \
 		--exclude='libgo/*' \

Another issue is that this series is going to conflict quite badly with the series posted by Mischa to add specific binutils/gcc/gdb/uClibc versions for ARC.

It would probably be good if you could sync up on these two series.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v2 2/5 gcc: add microblaze internal toolchain

Quoted 13 lines

Review

Quoted 5 lines

define HOST_GCC_EXTRACT_CMDS

(quoted diff) +2 -1
-	$(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \
+	$(call suitable-extractor,$(GCC_SOURCE),$(BZCAT))
+$(DL_DIR)/$(GCC_SOURCE) | \

The suitable-extractor macro doesn't take a second argument, so the ,$(BZCAT) here is useless.

package/gcc/gcc.mk endef · line 72

Quoted 3 lines
package/gcc/gcc.mk +0 -0
 		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \
 		--exclude='libjava/*' \
 		--exclude='libgo/*' \
Quoted 6 lines

Another issue is that this series is going to conflict quite badly with the series posted by Mischa to add specific binutils/gcc/gdb/uClibc versions for ARC.

It would probably be good if you could sync up on these two series.

I wasn't aware of this suitable-extractor macro. If it supports .tar.gz, it should work fine for me (and I will update my patch accordingly, or better yet: leave it out of my patch completely). I will need to update my patch anyway with full commit ID's, and maybe I take a look at implementing this github helper too.

Mischa

#5 lore raw

PATCH v2 2/5 gcc: add microblaze internal toolchain

In reply to Thomas Petazzoni
Quoted 56 lines · Thomas Petazzoni

Dear Spenser Gilliland,

package/gcc/Config.in.host comment "GCC Options" · line 10

Quoted 5 lines · Spenser Gilliland
package/gcc/Config.in.host +5 -0
+# Until gcc 4.7, a three stage build process was needed when using
+# NPTL. This hidden option tells whether gcc is a version that
+# requires this three stage build process.
+config BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
+	bool

Hum, is this really meant to be part of your patch? :-)

package/gcc/Config.in.host choice · line 26

Quoted 5 lines
package/gcc/Config.in.host +1 -0
@@ -16,39 +23,44 @@ choice
 	config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
 		depends on BR2_avr32
 		bool "gcc 4.2.2-avr32-2.1.5"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD

and this (and all the other occurrences).

package/gcc/gcc.mk endif · line 28

Quoted 3 lines
package/gcc/gcc.mk +3 -0
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+else ifeq ($(findstring microblaze,$(GCC_VERSION)),microblaze)
+MBGCC_VERSION = b93bb009e021aba64dd4b8cdb0bbc5a176c55543

MBGCC_VERSION ?

Quoted 12 lines
package/gcc/gcc.mk +3 -2
+GCC_SITE = http://github.com/Xilinx/gcc/tarball/$(MBGCC_VERSION)
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
 GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION)
-endif
-
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+endif
 
 #
 # Xtensa special hook

package/gcc/gcc.mk endef · line 69

Quoted 5 lines
package/gcc/gcc.mk +1 -1
@@ -60,7 +66,7 @@ endef
 #
 
 define HOST_GCC_EXTRACT_CMDS
-	$(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \
+	$(call suitable-extractor,$(GCC_SOURCE),$(BZCAT)) $(DL_DIR)/$(GCC_SOURCE) | \

The suitable-extractor macro doesn't take a second argument, so the ,$(BZCAT) here is useless.

package/gcc/gcc.mk endef · line 72

Quoted 3 lines
package/gcc/gcc.mk +0 -0
 		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \
 		--exclude='libjava/*' \
 		--exclude='libgo/*' \

Another issue is that this series is going to conflict quite badly with the series posted by Mischa to add specific binutils/gcc/gdb/uClibc versions for ARC.

Quoted 5 lines

It would probably be good if you could sync up on these two series.

Thanks!

Thomas

Thomas,

Thanks for the review. I must have miss merged when rebasing onto master. I'll fix it up and resubmit.

I'll look into how to better sync my code into Mischa's.

Thanks,
Spenser

Signature · 10 lines
Spenser Gilliland
Computer Engineer
IIT ECASP Lab
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131112/90743992/attachment.asc>
#6 lore raw

PATCH v2 2/5 gcc: add microblaze internal toolchain

In reply to Thomas Petazzoni
Quoted 3 lines · Thomas Petazzoni

Dear Spenser Gilliland,

On Tue, 12 Nov 2013 11:31:42 -0600, Spenser Gilliland wrote:

Oops, forgot to respond to the review comments. See inline.

Quoted 7 lines

package/gcc/Config.in.host comment "GCC Options" · line 10

Quoted 5 lines
package/gcc/Config.in.host +5 -0
+# Until gcc 4.7, a three stage build process was needed when using
+# NPTL. This hidden option tells whether gcc is a version that
+# requires this three stage build process.
+config BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
+	bool

Hum, is this really meant to be part of your patch? :-)

No, will fix.

Quoted 8 lines

package/gcc/Config.in.host choice · line 26

Quoted 6 lines
package/gcc/Config.in.host +1 -0
@@ -16,39 +23,44 @@ choice
 	config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
 		depends on BR2_avr32
 		bool "gcc 4.2.2-avr32-2.1.5"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD

and this (and all the other occurrences).

Same.

Quoted 5 lines

package/gcc/gcc.mk endif · line 28

Quoted 3 lines
package/gcc/gcc.mk +3 -0
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+else ifeq ($(findstring microblaze,$(GCC_VERSION)),microblaze)
+MBGCC_VERSION = b93bb009e021aba64dd4b8cdb0bbc5a176c55543

MBGCC_VERSION ?

When initially doing this I felt that the git refs were to opaque. However, I now realize that was a bad decision.

Quoted 15 lines
Quoted 15 lines
package/gcc/gcc.mk +3 -2
+GCC_SITE = http://github.com/Xilinx/gcc/tarball/$(MBGCC_VERSION)
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
 GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION)
-endif
-
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
+endif
 
 #
 # Xtensa special hook
@@ -60,7 +66,7 @@ endef
 #
 
Quoted 6 lines

package/gcc/gcc.mk endef · line 69

Quoted 3 lines
package/gcc/gcc.mk +1 -1
 define HOST_GCC_EXTRACT_CMDS
-	$(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \
+	$(call suitable-extractor,$(GCC_SOURCE),$(BZCAT)) $(DL_DIR)/$(GCC_SOURCE) | \

The suitable-extractor macro doesn't take a second argument, so the ,$(BZCAT) here is useless.

Will fix.

Quoted 13 lines

package/gcc/gcc.mk endef · line 72

Quoted 3 lines
package/gcc/gcc.mk +0 -0
 		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \
 		--exclude='libjava/*' \
 		--exclude='libgo/*' \

Another issue is that this series is going to conflict quite badly with the series posted by Mischa to add specific binutils/gcc/gdb/uClibc versions for ARC.

It would probably be good if you could sync up on these two series.

Thanks!

Thomas

Signature · 10 lines
Spenser Gilliland
Computer Engineer
IIT ECASP Lab
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131112/e80818fd/attachment.asc>
#7 lore raw

PATCH v2 3/5 glibc: add microblaze internal toolchain

In reply to Spenser Gilliland
---
 package/glibc/glibc.mk |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
package/glibc/glibc.mk +12 -0
index 2e7fe82..91ad29e 100644
@@ -4,6 +4,17 @@
 #
 ################################################################################
 
+ifeq ($(BR2_microblaze),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y)
+GLIBC_VERSION = 7f0bcce417c47aefad06ddfec7cd4ced3a4e10ff
+GLIBC_SITE = http://github.com/Xilinx/eglibc/tarball/$(GLIBC_VERSION)
+GLIBC_SRC_SUBDIR = .
+else
+GLIBC_VERSION = b86835ca92a1942ed08d8b5ee47498e711feaddb
+GLIBC_SITE = http://github.com/Xilinx/glibc/tarball/$(GLIBC_VERSION)
+GLIBC_SRC_SUBDIR = .
+endif
+else
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y)
 GLIBC_VERSION = 2.17-svnr22064
 GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc/
@@ -15,6 +26,7 @@ GLIBC_SITE = $(BR2_GNU_MIRROR)/libc
 GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz
 GLIBC_SRC_SUBDIR = .
 endif
+endif
 
 GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library)
 GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES)
Signature · 1 line
1.7.1
#8 lore raw

PATCH v2 4/5 gdb: add microblaze internal toolchain

In reply to Spenser Gilliland
---
 package/gdb/Config.in.host |    4 ++++
 package/gdb/gdb.mk         |    9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
package/gdb/Config.in.host +4 -0
index 128aed9..aae0109 100644
@@ -18,6 +18,7 @@ choice
 	depends on !BR2_arc
 	default BR2_GDB_VERSION_6_6 if BR2_bfin
 	default BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 if BR2_avr32
+	default BR2_GDB_VERSION_7_6_MICROBLAZE if BR2_microblaze
 	default BR2_GDB_VERSION_7_5
 	help
 	  Select the version of gdb you wish to use.
@@ -48,6 +49,8 @@ choice
 		bool "gdb 7.5.x"
 		depends on !BR2_bfin
 
+	config BR2_GDB_VERSION_7_6_MICROBLAZE
+		bool "gdb 7.6-microblaze"
 endchoice
 
 config BR2_GDB_VERSION
@@ -59,5 +62,6 @@ config BR2_GDB_VERSION
 	default "7.4.1"    if BR2_GDB_VERSION_7_4
 	default "7.5.1"    if BR2_GDB_VERSION_7_5
 	default "7.5.1-arc" if BR2_arc
+	default "7.6-microblaze" if BR2_microblaze
 
 endif
package/gdb/gdb.mk +8 -1
index 9cf90e3..65485da 100644
@@ -21,15 +21,22 @@ GDB_VERSION = 7.5.1
 endif
 endif
 
+GDB_SOURCE = gdb-$(GDB_VERSION).tar.bz2
+
 ifeq ($(BR2_arc),y)
 GDB_SITE = $(BR2_ARC_SITE)
 endif
 
+ifeq ($(BR2_microblaze),y)
+GDB_VERSION = 6be65fb56ea6694a9260733a536a023a1e2d4d57
+GDB_SITE = http://github.com/Xilinx/gdb/tarball/$(GDB_VERSION)
+GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
+endif
+
 ifeq ($(GDB_VERSION),6.7.1-avr32-2.1.5)
 GDB_SITE = ftp://www.at91.com/pub/buildroot/
 endif
 
-GDB_SOURCE = gdb-$(GDB_VERSION).tar.bz2
 GDB_LICENSE = GPLv2+ LGPLv2+ GPLv3+ LGPLv3+
 GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
 
Signature · 1 line
1.7.1
#9 lore raw

PATCH v2 5/5 toolchain: enable microblaze toolchain

In reply to Spenser Gilliland
---
 toolchain/Config.in                     |    2 +-
 toolchain/toolchain-buildroot/Config.in |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
toolchain/Config.in +1 -1
index 3980d79..bbfd367 100644
@@ -35,7 +35,7 @@ choice
 
 config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
-	depends on !BR2_microblaze && !BR2_aarch64 && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_nios2
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 
 config BR2_TOOLCHAIN_EXTERNAL
toolchain/toolchain-buildroot/Config.in +2 -2
index 8b37127..1529004 100644
@@ -21,7 +21,7 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
 		   BR2_i386   || BR2_mips     || BR2_mipsel  || \
 		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
 		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
-		   BR2_x86_64
+		   BR2_x86_64 || BR2_microblaze
 	depends on BR2_USE_MMU
 	depends on !BR2_PREFER_STATIC_LIB
 	select BR2_TOOLCHAIN_USES_GLIBC
@@ -42,7 +42,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 		   BR2_i386   || BR2_mips     || BR2_mipsel  || \
 		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
 		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
-		   BR2_x86_64
+		   BR2_x86_64 || BR2_microblaze
 	select BR2_TOOLCHAIN_USES_GLIBC
 	depends on !BR2_PREFER_STATIC_LIB
 	# our glibc.mk enables RPC support
Signature · 1 line
1.7.1