All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain
@ 2013-07-20 12:52 Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults Gustavo Zacarias
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

This patchset fixes the internal blackfin toolchain build.
It's been broken for ages (never worked maybe?)
Testers wanted, it builds what's supposed to build but i lack hardware
to see if it really works.

Gustavo Zacarias (9):
  gcc/bfin: doesn't support --with-cpu defaults
  uclibc/bfin: only supports linuxthreads.old
  uclibc: make target utils optional
  gcc/bfin: 4.{6,7,8}.x are broken
  uclibc: use builtin startfiles target
  uclibc/bfin: set the appropiate binfmt in the configuration
  uclibc/bfin: don't install host utils if not FDPIC
  blackfin: set GNU_TARGET_NAME accordingly
  gcc/mudflap: disable for blackfin, it doesn't build

 package/Makefile.in        |  5 +++
 package/gcc/Config.in.host |  7 +++--
 package/gcc/gcc.mk         |  8 +++++
 package/uclibc/Config.in   | 15 ++++++++-
 package/uclibc/uclibc.mk   | 76 ++++++++++++++++++++++++++++++++++++++--------
 5 files changed, 95 insertions(+), 16 deletions(-)

--
1.8.1.5

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-21 15:35   ` Thomas Petazzoni
  2013-07-20 12:52 ` [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old Gustavo Zacarias
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gcc/gcc.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 85cd7d4..cbeaa6c 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -159,6 +159,8 @@ endif
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
 HOST_GCC_COMMON_CONF_OPT += --with-abi=$(BR2_GCC_TARGET_ABI)
 endif
+# GCC doesn't support --with-cpu for bfin
+ifeq ($(BR2_bfin),)
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
 HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
@@ -166,6 +168,7 @@ else
 HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU))
 endif
 endif
+endif
 
 GCC_TARGET_FPU = $(call qstrip,$(BR2_GCC_TARGET_FPU))
 ifneq ($(GCC_TARGET_FPU),)
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-20 12:58   ` Yann E. MORIN
  2013-07-27 14:21   ` Thomas Petazzoni
  2013-07-20 12:52 ` [Buildroot] [PATCH 3/9] uclibc: make target utils optional Gustavo Zacarias
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/uclibc/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 90aae90..f9c4956 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -104,6 +104,7 @@ choice
 
 	config BR2_PTHREADS
 		bool "linuxthreads"
+		depends on !BR2_bfin
 		depends on !BR2_xtensa
 	        select BR2_TOOLCHAIN_HAS_THREADS
 
@@ -115,9 +116,10 @@ choice
 		bool "Native POSIX Threading (NPTL)"
 		select BR2_TOOLCHAIN_HAS_THREADS
 		depends on !BR2_x86_i386
+		depends on !BR2_arc
 		depends on !BR2_avr32
+		depends on !BR2_bfin
 		depends on !BR2_xtensa
-		depends on !BR2_arc
 endchoice
 
 config BR2_PTHREAD_DEBUG
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/9] uclibc: make target utils optional
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-20 13:08   ` Yann E. MORIN
  2013-07-20 12:52 ` [Buildroot] [PATCH 4/9] gcc/bfin: 4.{6,7,8}.x are broken Gustavo Zacarias
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

These are broken for blackfin unfortunately so they're disabled.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/uclibc/Config.in | 11 +++++++++++
 package/uclibc/uclibc.mk | 16 +++++++++++-----
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index f9c4956..32289bb 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -129,6 +129,17 @@ config BR2_PTHREAD_DEBUG
 	help
 	  Build the thread library with debugging enabled.
 
+config BR2_UCLIBC_INSTALL_UTILS
+	bool "Compile and install uClibc utilities"
+	depends on !BR2_bfin
+	default y
+	help
+	  Enabling this option will compile and install the getconf,
+	  ldconfig and ldd uClibc utilities for the target.
+
+	  You can save ~32 KiB in target space by disabling them since
+	  they're normally not needed.
+
 config BR2_UCLIBC_INSTALL_TEST_SUITE
 	bool "Compile and install uClibc tests"
 	select BR2_PACKAGE_MAKE
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index cf53280..4a37fa0 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -451,6 +451,16 @@ define UCLIBC_INSTALL_TEST_SUITE
 endef
 endif
 
+ifeq ($(BR2_UCLIBC_INSTALL_UTILS),y)
+define UCLIBC_INSTALL_UTILS_TARGET
+	$(MAKE1) -C $(@D) \
+		CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \
+		ARCH="$(UCLIBC_TARGET_ARCH)" \
+		PREFIX=$(TARGET_DIR) \
+		utils install_utils
+endef
+endif
+
 define UCLIBC_INSTALL_TARGET_CMDS
 	$(MAKE1) -C $(@D) \
 		$(UCLIBC_MAKE_FLAGS) \
@@ -458,11 +468,7 @@ define UCLIBC_INSTALL_TARGET_CMDS
 		DEVEL_PREFIX=/usr/ \
 		RUNTIME_PREFIX=/ \
 		install_runtime
-	$(MAKE1) -C $(@D) \
-		CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \
-		ARCH="$(UCLIBC_TARGET_ARCH)" \
-		PREFIX=$(TARGET_DIR) \
-		utils install_utils
+	$(UCLIBC_INSTALL_UTILS_TARGET)
 	$(UCLIBC_INSTALL_TEST_SUITE)
 endef
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 4/9] gcc/bfin: 4.{6,7,8}.x are broken
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (2 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 3/9] uclibc: make target utils optional Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 5/9] uclibc: use builtin startfiles target Gustavo Zacarias
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gcc/Config.in.host | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index c49b8ed..a6acaa2 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -8,6 +8,7 @@ choice
 	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_5_X if BR2_bfin
 	default BR2_GCC_VERSION_4_7_X
 	help
 	  Select the version of gcc you wish to use.
@@ -37,17 +38,17 @@ choice
 		bool "gcc 4.5.x"
 
 	config BR2_GCC_VERSION_4_6_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
+		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
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc 4.6.x"
 
 	config BR2_GCC_VERSION_4_7_X
-		depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
+		depends on !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_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
+		depends on !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"
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 5/9] uclibc: use builtin startfiles target
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (3 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 4/9] gcc/bfin: 4.{6,7,8}.x are broken Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 6/9] uclibc/bfin: set the appropiate binfmt in the configuration Gustavo Zacarias
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Now that we've dropped 0.9.31.x we can use the startfiles /
install_startfiles targets instead of building and installing them by
hand.
Fixes internal blackfin toolchain build errors regarding crtreloc.o

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/uclibc/uclibc.mk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 4a37fa0..efe00a6 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -409,13 +409,12 @@ define UCLIBC_CONFIGURE_CMDS
 		PREFIX=$(STAGING_DIR) \
 		DEVEL_PREFIX=/usr/ \
 		RUNTIME_PREFIX=$(STAGING_DIR) \
-		headers lib/crt1.o lib/crti.o lib/crtn.o \
-		install_headers
+		headers startfiles \
+		install_headers install_startfiles
 	$(TARGET_CROSS)gcc -nostdlib \
 		-nostartfiles -shared -x c /dev/null -o $(STAGING_DIR)/usr/lib/libc.so
 	$(TARGET_CROSS)gcc -nostdlib \
 		-nostartfiles -shared -x c /dev/null -o $(STAGING_DIR)/usr/lib/libm.so
-	cp -pLR $(UCLIBC_DIR)/lib/crt[1in].o $(STAGING_DIR)/usr/lib/
 endef
 
 ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y)
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 6/9] uclibc/bfin: set the appropiate binfmt in the configuration
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (4 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 5/9] uclibc: use builtin startfiles target Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 7/9] uclibc/bfin: don't install host utils if not FDPIC Gustavo Zacarias
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/uclibc/uclibc.mk | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index efe00a6..cbc2e56 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -148,6 +148,45 @@ endef
 endif # powerpc
 
 #
+# Blackfin definitions
+#
+
+ifeq ($(UCLIBC_TARGET_ARCH),bfin)
+ifeq ($(BR2_BINFMT_FDPIC),y)
+define UCLIBC_BFIN_CONFIG
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_SHARED_FLAT,$(@D))
+	$(call UCLIBC_OPT_SET,UCLIBC_FORMAT_FDPIC_ELF,y,$(@D))
+endef
+endif
+ifeq ($(BR2_BINFMT_FLAT_ONE),y)
+define UCLIBC_BFIN_CONFIG
+	$(call UCLIBC_OPT_SET,UCLIBC_FORMAT_FLAT,y,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_SHARED_FLAT,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FDPIC_ELF,$(@D))
+endef
+endif
+ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y)
+define UCLIBC_BFIN_CONFIG
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT,$(@D))
+	$(call UCLIBC_OPT_SET,UCLIBC_FORMAT_FLAT_SEP_DATA,y,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_SHARED_FLAT,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FDPIC_ELF,$(@D))
+endef
+endif
+ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
+define UCLIBC_BFIN_CONFIG
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D))
+	$(call UCLIBC_OPT_SET,UCLIBC_FORMAT_SHARED_FLAT,y,$(@D))
+	$(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FDPIC_ELF,$(@D))
+endef
+endif
+endif # bfin
+
+#
 # AVR32 definitions
 #
 
@@ -380,6 +419,7 @@ define UCLIBC_SETUP_DOT_CONFIG
 	$(UCLIBC_SPARC_TYPE_CONFIG)
 	$(UCLIBC_POWERPC_TYPE_CONFIG)
 	$(UCLIBC_AVR32_CONFIG)
+	$(UCLIBC_BFIN_CONFIG)
 	$(UCLIBC_X86_TYPE_CONFIG)
 	$(UCLIBC_ENDIAN_CONFIG)
 	$(UCLIBC_LARGEFILE_CONFIG)
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 7/9] uclibc/bfin: don't install host utils if not FDPIC
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (5 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 6/9] uclibc/bfin: set the appropiate binfmt in the configuration Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-20 12:52 ` [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly Gustavo Zacarias
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/uclibc/uclibc.mk | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index cbc2e56..644c531 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -511,6 +511,16 @@ define UCLIBC_INSTALL_TARGET_CMDS
 	$(UCLIBC_INSTALL_TEST_SUITE)
 endef
 
+# For FLAT binfmts (static) there are no host utils
+ifeq ($(BR2_BINFMT_FLAT),)
+define UCLIBC_INSTALL_UTILS_STAGING
+	$(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd
+	ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd
+	$(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig
+	ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig
+endef
+endif
+
 define UCLIBC_INSTALL_STAGING_CMDS
 	$(MAKE1) -C $(@D) \
 		$(UCLIBC_MAKE_FLAGS) \
@@ -518,10 +528,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 		DEVEL_PREFIX=/usr/ \
 		RUNTIME_PREFIX=/ \
 		install_runtime install_dev
-	install -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd
-	ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd
-	install -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig
-	ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig
+	$(UCLIBC_INSTALL_UTILS_STAGING)
 endef
 
 uclibc-menuconfig: dirs uclibc-patch
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (6 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 7/9] uclibc/bfin: don't install host utils if not FDPIC Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-21 15:38   ` Thomas Petazzoni
  2013-07-27 14:22   ` Thomas Petazzoni
  2013-07-20 12:52 ` [Buildroot] [PATCH 9/9] gcc/mudflap: disable for blackfin, it doesn't build Gustavo Zacarias
  2013-07-27 14:23 ` [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Thomas Petazzoni
  9 siblings, 2 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Blackfin for FDPIC targets uses *-linux-*, however for FLAT targets it
needs *-uclinux-* in order for gcc to build properly.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/Makefile.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/Makefile.in b/package/Makefile.in
index a23eb41..acbc453 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -23,6 +23,11 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
 # Compute GNU_TARGET_NAME
 GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
 
+# Blackfin FLAT needs uclinux
+ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy)
+GNU_TARGET_NAME=$(ARCH)-buildroot-uclinux-$(LIBC)$(ABI)
+endif
+
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 LIBC=uclibc
 else
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 9/9] gcc/mudflap: disable for blackfin, it doesn't build
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (7 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly Gustavo Zacarias
@ 2013-07-20 12:52 ` Gustavo Zacarias
  2013-07-27 14:23 ` [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Thomas Petazzoni
  9 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-20 12:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gcc/gcc.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index cbeaa6c..cd6efed 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -202,6 +202,11 @@ ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
 HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
 endif
 
+# Blackfin doesn't do mudflap
+ifeq ($(BR2_bfin),y)
+HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
+endif
+
 # Disable mudflap and enable proper double/long double for SPE ABI
 ifeq ($(BR2_powerpc_SPE),y)
 HOST_GCC_COMMON_CONF_OPT += \
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old
  2013-07-20 12:52 ` [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old Gustavo Zacarias
@ 2013-07-20 12:58   ` Yann E. MORIN
  2013-07-27 14:21   ` Thomas Petazzoni
  1 sibling, 0 replies; 20+ messages in thread
From: Yann E. MORIN @ 2013-07-20 12:58 UTC (permalink / raw)
  To: buildroot

Gustavo, All,

On 2013-07-20 09:52 -0300, Gustavo Zacarias spake thusly:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/uclibc/Config.in | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
> index 90aae90..f9c4956 100644
> --- a/package/uclibc/Config.in
> +++ b/package/uclibc/Config.in
> @@ -104,6 +104,7 @@ choice
>  
>  	config BR2_PTHREADS
>  		bool "linuxthreads"
> +		depends on !BR2_bfin
>  		depends on !BR2_xtensa
>  	        select BR2_TOOLCHAIN_HAS_THREADS
>  
> @@ -115,9 +116,10 @@ choice
>  		bool "Native POSIX Threading (NPTL)"
>  		select BR2_TOOLCHAIN_HAS_THREADS
>  		depends on !BR2_x86_i386
> +		depends on !BR2_arc
>  		depends on !BR2_avr32
> +		depends on !BR2_bfin
>  		depends on !BR2_xtensa
> -		depends on !BR2_arc

While at re-ordering, you could have also reorderd x86_i386.
Note this in the commit log, such as:
   trivial options re-rodering at the same time.

Although I would prefer you not mix cosmetics with actual changes.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/9] uclibc: make target utils optional
  2013-07-20 12:52 ` [Buildroot] [PATCH 3/9] uclibc: make target utils optional Gustavo Zacarias
@ 2013-07-20 13:08   ` Yann E. MORIN
  0 siblings, 0 replies; 20+ messages in thread
From: Yann E. MORIN @ 2013-07-20 13:08 UTC (permalink / raw)
  To: buildroot

On 2013-07-20 09:52 -0300, Gustavo Zacarias spake thusly:
> These are broken for blackfin unfortunately so they're disabled.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

BTW, I never know if Acked-by includes Reviewed-by...

Regads,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults
  2013-07-20 12:52 ` [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults Gustavo Zacarias
@ 2013-07-21 15:35   ` Thomas Petazzoni
  2013-07-21 16:26     ` Gustavo Zacarias
  0 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2013-07-21 15:35 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Sat, 20 Jul 2013 09:52:07 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

> +# GCC doesn't support --with-cpu for bfin
> +ifeq ($(BR2_bfin),)
>  ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
>  ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
>  HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
> @@ -166,6 +168,7 @@ else
>  HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU))
>  endif
>  endif
> +endif

This looks odd because the BR2_GCC_TARGET_CPU_REVISION thing was added
by Sonic Zhang, see 66d41890ec2b76189bcd427a0cc3966ff56f9712. So it is
specifically useful on Blackfin. Maybe just with Analog Devices
toolchains, I don't know. But clearly, removing that for Blackfin seems
wrong.


-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly
  2013-07-20 12:52 ` [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly Gustavo Zacarias
@ 2013-07-21 15:38   ` Thomas Petazzoni
  2013-07-21 16:32     ` Gustavo Zacarias
  2013-07-27 14:22   ` Thomas Petazzoni
  1 sibling, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2013-07-21 15:38 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Sat, 20 Jul 2013 09:52:14 -0300, Gustavo Zacarias wrote:

> @@ -23,6 +23,11 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
>  # Compute GNU_TARGET_NAME
>  GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
>  
> +# Blackfin FLAT needs uclinux
> +ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy)
> +GNU_TARGET_NAME=$(ARCH)-buildroot-uclinux-$(LIBC)$(ABI)
> +endif

Isn't the 'uclinux' OS part something that is not specific to Blackfin?
I.e, should this rather be something like:

ifeq ($(BR2_USE_MMU),y)
OS=linux
else
OS=uclinux
endif

GNU_TARGET_NAME=$(ARCH)-buildroot-$(OS)-$(LIBC)$(ABI)

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults
  2013-07-21 15:35   ` Thomas Petazzoni
@ 2013-07-21 16:26     ` Gustavo Zacarias
  0 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-21 16:26 UTC (permalink / raw)
  To: buildroot

On 07/21/2013 12:35 PM, Thomas Petazzoni wrote:

> This looks odd because the BR2_GCC_TARGET_CPU_REVISION thing was added
> by Sonic Zhang, see 66d41890ec2b76189bcd427a0cc3966ff56f9712. So it is
> specifically useful on Blackfin. Maybe just with Analog Devices
> toolchains, I don't know. But clearly, removing that for Blackfin seems
> wrong.

Exactly, with their twisted toolchains, snip without it:

checking for clock_t... yes
checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
This target does not support --with-cpu.
Valid --with options are:
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory
`/home/gustavoz/b/fin/output/build/host-gcc-initial-4.5.4/build'
make: ***
[/home/gustavoz/b/fin/output/build/host-gcc-initial-4.5.4/.stamp_built]
Error 2

Regards.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly
  2013-07-21 15:38   ` Thomas Petazzoni
@ 2013-07-21 16:32     ` Gustavo Zacarias
  0 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-21 16:32 UTC (permalink / raw)
  To: buildroot

On 07/21/2013 12:38 PM, Thomas Petazzoni wrote:

> Isn't the 'uclinux' OS part something that is not specific to Blackfin?
> I.e, should this rather be something like:
> 
> ifeq ($(BR2_USE_MMU),y)
> OS=linux
> else
> OS=uclinux
> endif

In theory, yes.
For blackfin, doesn't seem so.
Seems (caveat: no access to blackfin.uclinux.org IF it's even
documented, bizarre patches and so on) that for blackfin being MMU-less
across the whole arch it's used to select from FDPIC and FLAT*.
Again going to the source (gcc to be precise) we see that crtreloc.o
(for FDPIC targets) is used in gcc/config/bfin/linux.h (linux tuple),
and crtlibid (for FLAT targets, internal to gcc) is used in
gcc/config/bfin/uclinux.h
crtreloc.o is generated by uClibc only when doing FDPIC, and used by
'linux', and 'uclinux' doesn't do FDPIC (no linking with crtreloc.o)
hence FLAT.
Regards.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old
  2013-07-20 12:52 ` [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old Gustavo Zacarias
  2013-07-20 12:58   ` Yann E. MORIN
@ 2013-07-27 14:21   ` Thomas Petazzoni
  1 sibling, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2013-07-27 14:21 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Sat, 20 Jul 2013 09:52:08 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/uclibc/Config.in | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
> index 90aae90..f9c4956 100644
> --- a/package/uclibc/Config.in
> +++ b/package/uclibc/Config.in
> @@ -104,6 +104,7 @@ choice
>  
>  	config BR2_PTHREADS
>  		bool "linuxthreads"
> +		depends on !BR2_bfin
>  		depends on !BR2_xtensa
>  	        select BR2_TOOLCHAIN_HAS_THREADS
>  
> @@ -115,9 +116,10 @@ choice
>  		bool "Native POSIX Threading (NPTL)"
>  		select BR2_TOOLCHAIN_HAS_THREADS
>  		depends on !BR2_x86_i386
> +		depends on !BR2_arc
>  		depends on !BR2_avr32
> +		depends on !BR2_bfin
>  		depends on !BR2_xtensa
> -		depends on !BR2_arc
>  endchoice

As suggested by Yann, I've splitted this in two patches, one adding
the !bfin dependency, another one doing the re-ordering, including
x86_i386.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly
  2013-07-20 12:52 ` [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly Gustavo Zacarias
  2013-07-21 15:38   ` Thomas Petazzoni
@ 2013-07-27 14:22   ` Thomas Petazzoni
  1 sibling, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2013-07-27 14:22 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Sat, 20 Jul 2013 09:52:14 -0300, Gustavo Zacarias wrote:
> Blackfin for FDPIC targets uses *-linux-*, however for FLAT targets it

>  # Compute GNU_TARGET_NAME
>  GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
>  
> +# Blackfin FLAT needs uclinux
> +ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy)
> +GNU_TARGET_NAME=$(ARCH)-buildroot-uclinux-$(LIBC)$(ABI)
> +endif

I've changed that to keep a single GNU_TARGET_NAME definition and to
use a new TARGET_OS variable, like the existing LIBC and ABI variables
we had.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain
  2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
                   ` (8 preceding siblings ...)
  2013-07-20 12:52 ` [Buildroot] [PATCH 9/9] gcc/mudflap: disable for blackfin, it doesn't build Gustavo Zacarias
@ 2013-07-27 14:23 ` Thomas Petazzoni
  2013-07-27 14:35   ` Gustavo Zacarias
  9 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2013-07-27 14:23 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Sat, 20 Jul 2013 09:52:06 -0300, Gustavo Zacarias wrote:
> This patchset fixes the internal blackfin toolchain build.
> It's been broken for ages (never worked maybe?)
> Testers wanted, it builds what's supposed to build but i lack hardware
> to see if it really works.
> 
> Gustavo Zacarias (9):
>   gcc/bfin: doesn't support --with-cpu defaults
>   uclibc/bfin: only supports linuxthreads.old
>   uclibc: make target utils optional
>   gcc/bfin: 4.{6,7,8}.x are broken
>   uclibc: use builtin startfiles target
>   uclibc/bfin: set the appropiate binfmt in the configuration
>   uclibc/bfin: don't install host utils if not FDPIC
>   blackfin: set GNU_TARGET_NAME accordingly
>   gcc/mudflap: disable for blackfin, it doesn't build

Committed entire series, with the minor fixes I pointed on the
individual patches.

Note that when you select FLAT format, it is still ELF binaries that
are produced in $(O)/target. Most likely related to our non-working
handling of elf2flt, as discussed recently on the list regarding ARM
noMMU platforms. So this patch series certainly improves the situation,
but doesn't fix the whole thing yet :)

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain
  2013-07-27 14:23 ` [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Thomas Petazzoni
@ 2013-07-27 14:35   ` Gustavo Zacarias
  0 siblings, 0 replies; 20+ messages in thread
From: Gustavo Zacarias @ 2013-07-27 14:35 UTC (permalink / raw)
  To: buildroot

On 07/27/2013 11:23 AM, Thomas Petazzoni wrote:
> Committed entire series, with the minor fixes I pointed on the
> individual patches.
> 
> Note that when you select FLAT format, it is still ELF binaries that
> are produced in $(O)/target. Most likely related to our non-working
> handling of elf2flt, as discussed recently on the list regarding ARM
> noMMU platforms. So this patch series certainly improves the situation,
> but doesn't fix the whole thing yet :)

Thanks.
Yes, as i've stated, it's a first patchset/try of fixing things, but
most certainly not tested :)
I've been playing a bit with fixing ARM nommu, quick notes say we need
to ditch libmudflap, change the tuple (uclinux-eabi & maybe
uclinux-elf), make host-elf2flt a hard dep (it's invoked at link time by
gcc with the appropiate tuple), probably add the mmu-less cortex
processors (M*, R4), and get someone to test the whole thing.
I've still didn't get the whole thing to build properly but it's close.
Regards.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-07-27 14:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-20 12:52 [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Gustavo Zacarias
2013-07-20 12:52 ` [Buildroot] [PATCH 1/9] gcc/bfin: doesn't support --with-cpu defaults Gustavo Zacarias
2013-07-21 15:35   ` Thomas Petazzoni
2013-07-21 16:26     ` Gustavo Zacarias
2013-07-20 12:52 ` [Buildroot] [PATCH 2/9] uclibc/bfin: only supports linuxthreads.old Gustavo Zacarias
2013-07-20 12:58   ` Yann E. MORIN
2013-07-27 14:21   ` Thomas Petazzoni
2013-07-20 12:52 ` [Buildroot] [PATCH 3/9] uclibc: make target utils optional Gustavo Zacarias
2013-07-20 13:08   ` Yann E. MORIN
2013-07-20 12:52 ` [Buildroot] [PATCH 4/9] gcc/bfin: 4.{6,7,8}.x are broken Gustavo Zacarias
2013-07-20 12:52 ` [Buildroot] [PATCH 5/9] uclibc: use builtin startfiles target Gustavo Zacarias
2013-07-20 12:52 ` [Buildroot] [PATCH 6/9] uclibc/bfin: set the appropiate binfmt in the configuration Gustavo Zacarias
2013-07-20 12:52 ` [Buildroot] [PATCH 7/9] uclibc/bfin: don't install host utils if not FDPIC Gustavo Zacarias
2013-07-20 12:52 ` [Buildroot] [PATCH 8/9] blackfin: set GNU_TARGET_NAME accordingly Gustavo Zacarias
2013-07-21 15:38   ` Thomas Petazzoni
2013-07-21 16:32     ` Gustavo Zacarias
2013-07-27 14:22   ` Thomas Petazzoni
2013-07-20 12:52 ` [Buildroot] [PATCH 9/9] gcc/mudflap: disable for blackfin, it doesn't build Gustavo Zacarias
2013-07-27 14:23 ` [Buildroot] [PATCH 0/9] Fix internal blackfin toolchain Thomas Petazzoni
2013-07-27 14:35   ` Gustavo Zacarias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.