From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefan_seefeld@mentor.com (Stefan Seefeld) Date: Thu, 27 Mar 2014 08:58:38 -0400 Subject: [lttng-dev] arm gcc compile lttng-tool fail In-Reply-To: References: <53341C91.3040602@mentor.com> Message-ID: <5334207E.1030007@mentor.com> On 2014-03-27 08:53, loody wrote: > hi stefan: > > 2014-03-27 20:41 GMT+08:00 Stefan Seefeld : >> 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/