From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefan_seefeld@mentor.com (Stefan Seefeld) Date: Thu, 27 Mar 2014 09:20:15 -0400 Subject: [lttng-dev] arm gcc compile lttng-tool fail In-Reply-To: References: <53341C91.3040602@mentor.com> <5334207E.1030007@mentor.com> Message-ID: <5334258F.80706@mentor.com> 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/