ARM Linux GCC 4.1.0 broken optimization?
Mon Jun 5 14:48:00 GMT 2006
I use ARM Linux GCC 4.1.0 built with crosstool 0.42 with
eval `cat arm.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest
to build Linux kernel 2.6.17-rc5 for embedded OMAP target. I
use it since several weeks and everything looks quite good,
kernel is booting, everything like expected.
However, only thing which doesn't work is playing mp3 using
madplay. With help of OMAP mailing list I tried using
madplay binary which works for others, using other kernel
config, using other mp3s etc. With this, I found that
switching back to my old GCC 3.4.1 and using it for kernel
compilation, mp3 works. So looks like a toolchain issue
compiling the sound modules.
Now, I took again gcc 4.1.0 and recompiled the sound modules
using different optimization levels. Everything else stays
the same (kernel config, kernel itself, mp3, madplay etc.).
-Os -> mp3 playback fails
-O2 -> mp3 playback fails
-O0 -> building of some modules fails
-O1 -> mp3 playback works!
Looks to me that there is an issue with optimization in
kernel's sound code. Really not sure, but may be anything
(with inlining?) in include/sound/pcm_params.h?. Adding some
printks it looked to me that I get -EINVAL error in
snd_mask_refine() in this file while compiling with -O1
everything is okay.
Is this a known issue? Any idea regarding this? Do I missed
a patch to apply to gcc while building?
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc