Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] arm gcc compile lttng-tool fail
@ 2014-03-27 12:26 loody
  2014-03-27 12:41 ` Stefan Seefeld
  0 siblings, 1 reply; 6+ messages in thread
From: loody @ 2014-03-27 12:26 UTC (permalink / raw)


hi all:
I try to compile lttng-tool for arm platform but get below message

  CC     kernel-consumer.lo
kernel-consumer.c: In function 'lttng_kconsumer_snapshot_
channel':
kernel-consumer.c:324:1: internal compiler error: in gen_movsi, at
config/arm/arm.md:5680

after ask gcc for help, they said this will be fixed in gcc 4.9.0
http://gcc.gnu.org/ml/gcc-help/2014-03/msg00107.html

the stable release version of gcc is 4.8.2.
Could I get the conclusion that no one can compile it for arm platform before?


thanks for your help,



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

* [lttng-dev] arm gcc compile lttng-tool fail
  2014-03-27 12:26 [lttng-dev] arm gcc compile lttng-tool fail loody
@ 2014-03-27 12:41 ` Stefan Seefeld
  2014-03-27 12:53   ` loody
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Seefeld @ 2014-03-27 12:41 UTC (permalink / raw)


On 2014-03-27 08:26, loody wrote:
> hi all:
> I try to compile lttng-tool for arm platform but get below message
>
>   CC     kernel-consumer.lo
> kernel-consumer.c: In function 'lttng_kconsumer_snapshot_
> channel':
> kernel-consumer.c:324:1: internal compiler error: in gen_movsi, at
> config/arm/arm.md:5680
>
> after ask gcc for help, they said this will be fixed in gcc 4.9.0
> http://gcc.gnu.org/ml/gcc-help/2014-03/msg00107.html
>
> the stable release version of gcc is 4.8.2.
> Could I get the conclusion that no one can compile it for arm platform before?

We have been working around this GCC 4.8 bug by disabling optimization
on individual compilation units.

    Stefan


-- 
Stefan Seefeld
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software/




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

* [lttng-dev] arm gcc compile lttng-tool fail
  2014-03-27 12:41 ` Stefan Seefeld
@ 2014-03-27 12:53   ` loody
  2014-03-27 12:58     ` Stefan Seefeld
  0 siblings, 1 reply; 6+ messages in thread
From: loody @ 2014-03-27 12:53 UTC (permalink / raw)


hi stefan:

2014-03-27 20:41 GMT+08:00 Stefan Seefeld <stefan_seefeld at mentor.com>:
> On 2014-03-27 08:26, loody wrote:
>> hi all:
>> I try to compile lttng-tool for arm platform but get below message
>>
>>   CC     kernel-consumer.lo
>> kernel-consumer.c: In function 'lttng_kconsumer_snapshot_
>> channel':
>> kernel-consumer.c:324:1: internal compiler error: in gen_movsi, at
>> config/arm/arm.md:5680
>>
>> after ask gcc for help, they said this will be fixed in gcc 4.9.0
>> http://gcc.gnu.org/ml/gcc-help/2014-03/msg00107.html
>>
>> the stable release version of gcc is 4.8.2.
>> Could I get the conclusion that no one can compile it for arm platform before?
>
> We have been working around this GCC 4.8 bug by disabling optimization
> on individual compilation units.

Would you please give us a hand about how to "disabling optimization
on individual compilation units."
any configure option we can use?
or pass "-O1" instead of default "-O2" in CFLAGS?

appreciate your help,



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

* [lttng-dev] arm gcc compile lttng-tool fail
  2014-03-27 12:53   ` loody
@ 2014-03-27 12:58     ` Stefan Seefeld
  2014-03-27 13:09       ` loody
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Seefeld @ 2014-03-27 12:58 UTC (permalink / raw)


On 2014-03-27 08:53, loody wrote:
> hi stefan:
>
> 2014-03-27 20:41 GMT+08:00 Stefan Seefeld <stefan_seefeld at mentor.com>:
>> On 2014-03-27 08:26, loody wrote:
>>> hi all:
>>> I try to compile lttng-tool for arm platform but get below message
>>>
>>>   CC     kernel-consumer.lo
>>> kernel-consumer.c: In function 'lttng_kconsumer_snapshot_
>>> channel':
>>> kernel-consumer.c:324:1: internal compiler error: in gen_movsi, at
>>> config/arm/arm.md:5680
>>>
>>> after ask gcc for help, they said this will be fixed in gcc 4.9.0
>>> http://gcc.gnu.org/ml/gcc-help/2014-03/msg00107.html
>>>
>>> the stable release version of gcc is 4.8.2.
>>> Could I get the conclusion that no one can compile it for arm platform before?
>> We have been working around this GCC 4.8 bug by disabling optimization
>> on individual compilation units.
> Would you please give us a hand about how to "disabling optimization
> on individual compilation units."
> any configure option we can use?
> or pass "-O1" instead of default "-O2" in CFLAGS?

Exactly. Compiling src/common/consumer.c,
src/common/kernel-consumer/kernel-consumer.c, and
src/common/ust-consumer/ust-consumer.c with -O1 instead of -O2 worked
for us. And if you are afraid to mess with the build system, you can
also inject

  #pragma GCC optimize ("O1")

on top of those files to override the command-line optimization option.

        Stefan

-- 
Stefan Seefeld
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software/




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

* [lttng-dev] arm gcc compile lttng-tool fail
  2014-03-27 12:58     ` Stefan Seefeld
@ 2014-03-27 13:09       ` loody
  2014-03-27 13:20         ` Stefan Seefeld
  0 siblings, 1 reply; 6+ messages in thread
From: loody @ 2014-03-27 13:09 UTC (permalink / raw)


hi Stefan:


>
> Exactly. Compiling src/common/consumer.c,
> src/common/kernel-consumer/kernel-consumer.c, and
> src/common/ust-consumer/ust-consumer.c with -O1 instead of -O2 worked
> for us. And if you are afraid to mess with the build system, you can
> also inject
>
>   #pragma GCC optimize ("O1")
>
> on top of those files to override the command-line optimization option.
>
I use CFLAGS="-O1" while executing configure
But I get below message
  CCLD   lttng-consumerd
/media/sdb2/toolchain/arm/arm-v7a8v4r3-20131011/bin/../lib/gcc/arm-v7a8v4r3-linux-gnueabi/4.7.4/../../../../arm-v7a8v4r3-linux-gnueabi/bin/ld:
health_state: TLS reference in
../../../src/common/.libs/libconsumer.a(consumer.o) mismatches non-TLS
reference in ../../../src/common/.libs/libconsumer.a(consumer-timer.o)
../../../src/common/.libs/libconsumer.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [lttng-consumerd] Error 1

is that related to optimization?

appreciate your help,



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

* [lttng-dev] arm gcc compile lttng-tool fail
  2014-03-27 13:09       ` loody
@ 2014-03-27 13:20         ` Stefan Seefeld
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Seefeld @ 2014-03-27 13:20 UTC (permalink / raw)


On 2014-03-27 09:09, loody wrote:
> hi Stefan:
> 
> 
>>
>> Exactly. Compiling src/common/consumer.c,
>> src/common/kernel-consumer/kernel-consumer.c, and
>> src/common/ust-consumer/ust-consumer.c with -O1 instead of -O2 worked
>> for us. And if you are afraid to mess with the build system, you can
>> also inject
>>
>>   #pragma GCC optimize ("O1")
>>
>> on top of those files to override the command-line optimization option.
>>
> I use CFLAGS="-O1" while executing configure
> But I get below message
>   CCLD   lttng-consumerd
> /media/sdb2/toolchain/arm/arm-v7a8v4r3-20131011/bin/../lib/gcc/arm-v7a8v4r3-linux-gnueabi/4.7.4/../../../../arm-v7a8v4r3-linux-gnueabi/bin/ld:
> health_state: TLS reference in
> ../../../src/common/.libs/libconsumer.a(consumer.o) mismatches non-TLS
> reference in ../../../src/common/.libs/libconsumer.a(consumer-timer.o)
> ../../../src/common/.libs/libconsumer.a: could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[3]: *** [lttng-consumerd] Error 1
> 
> is that related to optimization?

I haven't seen that error before. Did you run 'make clean' before ?
Perhaps your link command is now picking up object files compiled before
and after your reconfiguration, and there are other changes introduced
that are incompatible. The optimization flag alone shouldn't cause any
incompatibility.

	Stefan


-- 
Stefan Seefeld
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software/



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

end of thread, other threads:[~2014-03-27 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-27 12:26 [lttng-dev] arm gcc compile lttng-tool fail loody
2014-03-27 12:41 ` Stefan Seefeld
2014-03-27 12:53   ` loody
2014-03-27 12:58     ` Stefan Seefeld
2014-03-27 13:09       ` loody
2014-03-27 13:20         ` Stefan Seefeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox