* [Buildroot] [PATCH] package/gcc: disable libitm for sparc <v9
@ 2015-01-15 0:29 Gustavo Zacarias
2015-01-15 8:37 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Zacarias @ 2015-01-15 0:29 UTC (permalink / raw)
To: buildroot
libitm (transactional memory) needs SPARC V9+ ISA, otherwise when
enabling C++ the toolchain fails to build:
/tmp/cclQ6hrD.s: Assembler messages:
/tmp/cclQ6hrD.s:1261: Error: Architecture mismatch on "rd".
/tmp/cclQ6hrD.s:1261: (Requires v9|v9a|v9b; requested architecture is
v8.)
Makefile:517: recipe for target 'beginend.lo' failed
make[5]: *** [beginend.lo] Error 1
So disable it for our current (v8, leon3) support.
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 cdd71aa..2e8b412 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -110,6 +110,11 @@ else
HOST_GCC_COMMON_CONF_OPTS += --enable-target-optspace
endif
+# libitm needs sparc V9+
+ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
+HOST_GCC_COMMON_CONF_OPTS += --disable-libitm
+endif
+
# gcc 4.6.x quadmath requires wchar
ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
--
2.0.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/gcc: disable libitm for sparc <v9
2015-01-15 0:29 [Buildroot] [PATCH] package/gcc: disable libitm for sparc <v9 Gustavo Zacarias
@ 2015-01-15 8:37 ` Thomas Petazzoni
2015-01-15 10:37 ` Gustavo Zacarias
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-01-15 8:37 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Wed, 14 Jan 2015 21:29:44 -0300, Gustavo Zacarias wrote:
> libitm (transactional memory) needs SPARC V9+ ISA, otherwise when
> enabling C++ the toolchain fails to build:
>
> /tmp/cclQ6hrD.s: Assembler messages:
> /tmp/cclQ6hrD.s:1261: Error: Architecture mismatch on "rd".
> /tmp/cclQ6hrD.s:1261: (Requires v9|v9a|v9b; requested architecture is
> v8.)
> Makefile:517: recipe for target 'beginend.lo' failed
> make[5]: *** [beginend.lo] Error 1
>
> So disable it for our current (v8, leon3) support.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Applied, thanks. Is it only SPARCv8 that doesn't have libitm support,
or could other architectures be affected? If other architectures are
affected, we may want to introduce a BR2_ARCH_HAS_LIBITM or some other
similar thing.
Another weird thing: we're not enabling libitm, so why is gcc enabling
it by itself, if it knows that the architecture cannot support it?
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
* [Buildroot] [PATCH] package/gcc: disable libitm for sparc <v9
2015-01-15 8:37 ` Thomas Petazzoni
@ 2015-01-15 10:37 ` Gustavo Zacarias
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2015-01-15 10:37 UTC (permalink / raw)
To: buildroot
On 01/15/2015 05:37 AM, Thomas Petazzoni wrote:
> Applied, thanks. Is it only SPARCv8 that doesn't have libitm support,
> or could other architectures be affected? If other architectures are
> affected, we may want to introduce a BR2_ARCH_HAS_LIBITM or some other
> similar thing.
>
> Another weird thing: we're not enabling libitm, so why is gcc enabling
> it by itself, if it knows that the architecture cannot support it?
There are other architectures that could be affected, most notably old
processors/cores.
I don't think we need to do anything more special about it, most of the
time gcc will detect and enable it if the architecture supports it,
which basically boils down to your second question, it's failing to
realize sparc v8 can't handle it.
It probably has to do with the sparc tuple being used for sparc64 as
well (64 bit kernel 32 bit userland) and sparc v8 being terribly old and
hardly used outside of LEON (V9 dates from 1993!).
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-15 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 0:29 [Buildroot] [PATCH] package/gcc: disable libitm for sparc <v9 Gustavo Zacarias
2015-01-15 8:37 ` Thomas Petazzoni
2015-01-15 10:37 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox