* [Buildroot] [PATCH v3 2/3] toolchain: add bfin support
@ 2016-06-03 4:05 Waldemar Brodkorb
2016-07-04 9:02 ` Thomas Petazzoni
2016-07-04 9:08 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Waldemar Brodkorb @ 2016-06-03 4:05 UTC (permalink / raw)
To: buildroot
With gcc 6.1.0 and binutils 2.26 internal bfin toolchain
can be used. A gcc patch is required, which was reported upstream.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
v2 -> v3:
- keep BR2_GCC_TARGET_CPU
v1 -> v2:
- remove conditional patch requested by Thomas Petazzoni
- do not enable BR2_GCC_TARGET_CPU, may be we can use
BR2_TARGET_CPU later for passing -mcpu= via CFLAGS
---
package/binutils/Config.in.host | 6 ++++--
package/gcc/6.1.0/892-disable-dwarf-bfin.patch | 24 ++++++++++++++++++++++++
package/gcc/Config.in.host | 8 ++++----
package/uclibc/Config.in | 1 +
toolchain/Config.in | 1 -
5 files changed, 33 insertions(+), 7 deletions(-)
create mode 100644 package/gcc/6.1.0/892-disable-dwarf-bfin.patch
diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index efdc840..d96fab2 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -8,8 +8,8 @@ choice
Select the version of binutils you wish to use.
config BR2_BINUTILS_VERSION_2_24_X
- # supported, but broken on Nios-II and powerpc64le
- depends on !BR2_nios2 && !BR2_powerpc64le
+ # supported, but broken on Nios-II, Blackfin and powerpc64le
+ depends on !BR2_nios2 && !BR2_powerpc64le && !BR2_bfin
# Unsupported for MIPS R6
depends on !BR2_mips_32r6 && !BR2_mips_64r6
# Unsupported ARM cores
@@ -18,6 +18,8 @@ choice
config BR2_BINUTILS_VERSION_2_25_X
bool "binutils 2.25.1"
+ # supported but broken on Blackfin
+ depends on !BR2_bfin
config BR2_BINUTILS_VERSION_2_26_X
bool "binutils 2.26"
diff --git a/package/gcc/6.1.0/892-disable-dwarf-bfin.patch b/package/gcc/6.1.0/892-disable-dwarf-bfin.patch
new file mode 100644
index 0000000..81acde7
--- /dev/null
+++ b/package/gcc/6.1.0/892-disable-dwarf-bfin.patch
@@ -0,0 +1,24 @@
+Dwarf support does not compile
+
+Reported upstream:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68468
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-6.1.0.orig/libgcc/config.host gcc-6.1.0/libgcc/config.host
+--- gcc-6.1.0.orig/libgcc/config.host 2016-02-26 21:02:28.000000000 +0100
++++ gcc-6.1.0/libgcc/config.host 2016-05-12 19:26:30.973350274 +0200
+@@ -230,6 +230,13 @@
+ ;;
+ esac
+ ;;
++bfin-*-*linux*)
++ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
++ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
++ if test x$enable_vtable_verify = xyes; then
++ extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
++ fi
++ ;;
+ *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index cfb0958..b4e7a7b 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -18,7 +18,7 @@ choice
depends on BR2_DEPRECATED_SINCE_2016_05
# Broken or unsupported architectures
depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc \
- && !BR2_powerpc64le && !BR2_nios2
+ && !BR2_powerpc64le && !BR2_nios2 && !BR2_bfin
# Broken or unsupported ARM cores
depends on !BR2_cortex_a12 && !BR2_pj4 && !BR2_cortex_a17
# Broken or unsupported PPC cores
@@ -37,7 +37,7 @@ choice
bool "gcc 4.8.x"
# Broken or unsupported architectures
depends on !BR2_microblaze && !BR2_arc \
- && !BR2_powerpc64le && !BR2_nios2
+ && !BR2_powerpc64le && !BR2_nios2 && !BR2_bfin
# Broken or unsupported ARM cores
depends on !BR2_cortex_a12 && !BR2_cortex_a17
# Broken or unsupported PPC cores
@@ -61,7 +61,7 @@ choice
config BR2_GCC_VERSION_4_9_X
bool "gcc 4.9.x"
# Broken or unsupported architectures
- depends on !BR2_arc
+ depends on !BR2_arc && !BR2_bfin
# Broken or unsupported ARM cores
depends on !BR2_cortex_a17
# Unsupported for MIPS R6
@@ -74,7 +74,7 @@ choice
config BR2_GCC_VERSION_5_X
bool "gcc 5.x"
# Broken or unsupported architectures
- depends on !BR2_arc
+ depends on !BR2_arc && !BR2_bfin
select BR2_GCC_NEEDS_MPC
select BR2_GCC_SUPPORTS_GRAPHITE
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 1aad9a0..6e611db 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -120,6 +120,7 @@ config BR2_UCLIBC_TARGET_ARCH
string
default "arc" if BR2_arcle || BR2_arceb
default "arm" if BR2_arm || BR2_armeb
+ default "bfin" if BR2_bfin
default "m68k" if BR2_m68k
default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
default "powerpc" if BR2_powerpc
diff --git a/toolchain/Config.in b/toolchain/Config.in
index e0044c1..a725556 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -38,7 +38,6 @@ choice
config BR2_TOOLCHAIN_BUILDROOT
bool "Buildroot toolchain"
- depends on !BR2_bfin
select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
config BR2_TOOLCHAIN_EXTERNAL
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/3] toolchain: add bfin support
2016-06-03 4:05 [Buildroot] [PATCH v3 2/3] toolchain: add bfin support Waldemar Brodkorb
@ 2016-07-04 9:02 ` Thomas Petazzoni
2016-07-04 9:08 ` Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-04 9:02 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 3 Jun 2016 06:05:31 +0200, Waldemar Brodkorb wrote:
> With gcc 6.1.0 and binutils 2.26 internal bfin toolchain
> can be used. A gcc patch is required, which was reported upstream.
>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
> v2 -> v3:
> - keep BR2_GCC_TARGET_CPU
> v1 -> v2:
> - remove conditional patch requested by Thomas Petazzoni
> - do not enable BR2_GCC_TARGET_CPU, may be we can use
> BR2_TARGET_CPU later for passing -mcpu= via CFLAGS
> ---
> package/binutils/Config.in.host | 6 ++++--
> package/gcc/6.1.0/892-disable-dwarf-bfin.patch | 24 ++++++++++++++++++++++++
> package/gcc/Config.in.host | 8 ++++----
> package/uclibc/Config.in | 1 +
> toolchain/Config.in | 1 -
> 5 files changed, 33 insertions(+), 7 deletions(-)
> create mode 100644 package/gcc/6.1.0/892-disable-dwarf-bfin.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/3] toolchain: add bfin support
2016-06-03 4:05 [Buildroot] [PATCH v3 2/3] toolchain: add bfin support Waldemar Brodkorb
2016-07-04 9:02 ` Thomas Petazzoni
@ 2016-07-04 9:08 ` Thomas Petazzoni
2016-07-04 15:48 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-04 9:08 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 3 Jun 2016 06:05:31 +0200, Waldemar Brodkorb wrote:
> config BR2_TOOLCHAIN_BUILDROOT
> bool "Buildroot toolchain"
> - depends on !BR2_bfin
> select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
BTW, uClibc-ng has linuxthreads support for Blackfin, but this patch
series does not enable it. I tried to enable it, but it fails to build.
Do you plan on enabling thread support on Blackfin at some point ?
If we have good enough Blackfin support in the internal toolchain
backend, this would ultimately allow us to get rid of the old Analog
Devices external toolchains for Blackfin (they use gcc 4.3, a
prehistoric version of uClibc, etc.), so getting rid of them would
really be nice.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/3] toolchain: add bfin support
2016-07-04 9:08 ` Thomas Petazzoni
@ 2016-07-04 15:48 ` Thomas Petazzoni
2016-07-05 17:27 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-04 15:48 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 4 Jul 2016 11:08:49 +0200, Thomas Petazzoni wrote:
> BTW, uClibc-ng has linuxthreads support for Blackfin, but this patch
> series does not enable it. I tried to enable it, but it fails to build.
>
> Do you plan on enabling thread support on Blackfin at some point ?
>
> If we have good enough Blackfin support in the internal toolchain
> backend, this would ultimately allow us to get rid of the old Analog
> Devices external toolchains for Blackfin (they use gcc 4.3, a
> prehistoric version of uClibc, etc.), so getting rid of them would
> really be nice.
Also, the default Blackfin core in Buildroot is bf609, and there's no
support for it in the upstream gcc, which causes a build failure when
building uClibc-ng because -mcpu=bf609 is not valid.
It looks like we will need to:
1/ Change the default Blackfin core to something that the internal
toolchain backend support
2/ Make the internal toolchain backend only available if the selected
Blackfin core is supported
Could you work on this?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 2/3] toolchain: add bfin support
2016-07-04 15:48 ` Thomas Petazzoni
@ 2016-07-05 17:27 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-05 17:27 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 4 Jul 2016 17:48:53 +0200, Thomas Petazzoni wrote:
> Also, the default Blackfin core in Buildroot is bf609, and there's no
> support for it in the upstream gcc, which causes a build failure when
> building uClibc-ng because -mcpu=bf609 is not valid.
>
> It looks like we will need to:
>
> 1/ Change the default Blackfin core to something that the internal
> toolchain backend support
>
> 2/ Make the internal toolchain backend only available if the selected
> Blackfin core is supported
Another problem:
CC utils/ldconfig
In file included from ../ldso/include/dl-defs.h:78:0,
from ../utils/porting.h:41,
from ../utils/ldconfig.c:29:
../ldso/ldso/bfin/dl-sysdep.h: In function 'elf_machine_relative':
../ldso/ldso/bfin/dl-sysdep.h:96:9: warning: 'return' with a value, in function returning void
return 0;
^
../ldso/ldso/bfin/dl-sysdep.h:93:1: note: declared here
elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
^~~~~~~~~~~~~~~~~~~~
This is due to:
config BR2_UCLIBC_INSTALL_UTILS
bool "Compile and install uClibc utilities"
default y
Before 6b0baf14cefd19d3902b43db0ab58709ef70e641, we had a dependency
on !BR2_bfin for this option. I'm not sure !BR2_bfin is the best
solution. Isn't it something like "supports shared library" or
something like that?
Could you have a look ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-05 17:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03 4:05 [Buildroot] [PATCH v3 2/3] toolchain: add bfin support Waldemar Brodkorb
2016-07-04 9:02 ` Thomas Petazzoni
2016-07-04 9:08 ` Thomas Petazzoni
2016-07-04 15:48 ` Thomas Petazzoni
2016-07-05 17:27 ` Thomas Petazzoni
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.