* [Buildroot] [PATCH] Disable gcc-4.8.x + binutils-2.25 + MIPS combination
@ 2015-07-02 15:19 Vicente Olivert Riera
2015-07-02 20:55 ` Yann E. MORIN
2015-07-02 21:46 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Vicente Olivert Riera @ 2015-07-02 15:19 UTC (permalink / raw)
To: buildroot
This combination causes a compilation failure of the host-gcc-final
recipe like this one:
/br/output/host/usr/mips-buildroot-linux-gnu/bin/ld:
.libs/gload.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not
be used when making a shared object; recompile with -fPIC
The problem is the file 'libatomic/gload.c' is compiled without -fPIC
when using binutils-2.25. All gcc (with libatomic) versions below 4.9.3
are affected by this issue.
Here is a summary of affected/unaffected versions in Buildroot:
4.7.x: unaffected (doesn't have libatomic)
4.8.x: affected
4.9.x: unaffected (we have 4.9.3 which is fixed)
5.1.x: unaffected
The fix can be found here:
https://github.com/gcc-mirror/gcc/commit/57f5c0954f95cb37f995d60167ddde06c7d6e697
However, given the following reasons...
- Upstream gcc 4.8 branch is closed.
- The fix is very hard to backport from 4.9 to 4.8.
- This stuff is insanely sensitive and not working at all could be
better than looking like it works but not quite.
...I think the best choice is to disable that combination in Buildroot.
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
package/gcc/Config.in.host | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 1fc0b83..4501b32 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -60,6 +60,8 @@ choice
depends on !BR2_cortex_a12
# Broken or unsupported PPC cores
depends on !BR2_powerpc_power8
+ # gcc-4.8.x + binutils-2.25 is broken for MIPS
+ depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25)
select BR2_GCC_NEEDS_MPC
select BR2_GCC_SUPPORTS_GRAPHITE
--
2.3.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] Disable gcc-4.8.x + binutils-2.25 + MIPS combination
2015-07-02 15:19 [Buildroot] [PATCH] Disable gcc-4.8.x + binutils-2.25 + MIPS combination Vicente Olivert Riera
@ 2015-07-02 20:55 ` Yann E. MORIN
2015-07-02 21:46 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2015-07-02 20:55 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2015-07-02 17:19 +0200, Vicente Olivert Riera spake thusly:
> This combination causes a compilation failure of the host-gcc-final
> recipe like this one:
>
> /br/output/host/usr/mips-buildroot-linux-gnu/bin/ld:
> .libs/gload.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not
> be used when making a shared object; recompile with -fPIC
>
> The problem is the file 'libatomic/gload.c' is compiled without -fPIC
> when using binutils-2.25. All gcc (with libatomic) versions below 4.9.3
> are affected by this issue.
>
> Here is a summary of affected/unaffected versions in Buildroot:
>
> 4.7.x: unaffected (doesn't have libatomic)
> 4.8.x: affected
> 4.9.x: unaffected (we have 4.9.3 which is fixed)
> 5.1.x: unaffected
>
> The fix can be found here:
>
> https://github.com/gcc-mirror/gcc/commit/57f5c0954f95cb37f995d60167ddde06c7d6e697
>
> However, given the following reasons...
>
> - Upstream gcc 4.8 branch is closed.
> - The fix is very hard to backport from 4.9 to 4.8.
> - This stuff is insanely sensitive and not working at all could be
> better than looking like it works but not quite.
>
> ...I think the best choice is to disable that combination in Buildroot.
So do I.
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> package/gcc/Config.in.host | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> index 1fc0b83..4501b32 100644
> --- a/package/gcc/Config.in.host
> +++ b/package/gcc/Config.in.host
> @@ -60,6 +60,8 @@ choice
> depends on !BR2_cortex_a12
> # Broken or unsupported PPC cores
> depends on !BR2_powerpc_power8
> + # gcc-4.8.x + binutils-2.25 is broken for MIPS
> + depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25)
> select BR2_GCC_NEEDS_MPC
> select BR2_GCC_SUPPORTS_GRAPHITE
>
> --
> 2.3.6
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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] 3+ messages in thread
* [Buildroot] [PATCH] Disable gcc-4.8.x + binutils-2.25 + MIPS combination
2015-07-02 15:19 [Buildroot] [PATCH] Disable gcc-4.8.x + binutils-2.25 + MIPS combination Vicente Olivert Riera
2015-07-02 20:55 ` Yann E. MORIN
@ 2015-07-02 21:46 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2015-07-02 21:46 UTC (permalink / raw)
To: buildroot
Dear Vicente Olivert Riera,
On Thu, 2 Jul 2015 17:19:08 +0200, Vicente Olivert Riera wrote:
> This combination causes a compilation failure of the host-gcc-final
> recipe like this one:
>
> /br/output/host/usr/mips-buildroot-linux-gnu/bin/ld:
> .libs/gload.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not
> be used when making a shared object; recompile with -fPIC
>
> The problem is the file 'libatomic/gload.c' is compiled without -fPIC
> when using binutils-2.25. All gcc (with libatomic) versions below 4.9.3
> are affected by this issue.
>
> Here is a summary of affected/unaffected versions in Buildroot:
>
> 4.7.x: unaffected (doesn't have libatomic)
> 4.8.x: affected
> 4.9.x: unaffected (we have 4.9.3 which is fixed)
> 5.1.x: unaffected
>
> The fix can be found here:
>
> https://github.com/gcc-mirror/gcc/commit/57f5c0954f95cb37f995d60167ddde06c7d6e697
>
> However, given the following reasons...
>
> - Upstream gcc 4.8 branch is closed.
> - The fix is very hard to backport from 4.9 to 4.8.
> - This stuff is insanely sensitive and not working at all could be
> better than looking like it works but not quite.
>
> ...I think the best choice is to disable that combination in Buildroot.
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> package/gcc/Config.in.host | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-02 21:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 15:19 [Buildroot] [PATCH] Disable gcc-4.8.x + binutils-2.25 + MIPS combination Vicente Olivert Riera
2015-07-02 20:55 ` Yann E. MORIN
2015-07-02 21:46 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox