Hi All,
I use gentoo(-pandora) linux on the beagleboard, with native gcc
4.3.3-r2 on it. It's the same version that OE on my desktop uses for
Angstrom builds and the set of patches applied when building this
compiler is almost the same in gentoo and OE. There are a few
differences, but they didn't look like arm/neon related to me.
The compiler works fine in most cases, I could build a gnome desktop,
firefox, pidgin with it, but when it comes to neon I'm not sure it
works right. For example pixman 0.16.2 compiled, saying all arm
optimizations are enabled, but the xserver crashed as soon as I
started a GTK app (xterm was ok). With a really old pixman (0.10.x, no
neon at all), everything was ok.
I also tried ffmpeg (svn), passing --cpu=cortex-a8 to the config
script but the test programs failed, and no neon, no vfp was enabled.
So my questions are:
- Is there an easy (fool-proof) way to figure out if the compiler is
broken? I mean some test: "compile this, assembly list should look
like this, and program output should be this" Unfortunately I'm too
new to arm and neon, and can't determine these on sight.
- Do I need some magic to build ffmpeg with neon? I was wondering if
I'm simply missing some ./config options, env vars. I know this is not
the ffmpeg list, but I know some experts are here.
Almost forgot: the binutils package is different from OE, I use 2.19.1
with some patches, I haven't reviewed them yet.
Regards,
Gyorgy
I had ffmpeg test program results like this:
check_asm neon "vadd.i16 q0, q0, q0"
check_as
BEGIN /tmp/ffconf.rfSJ7sky.c
1 void foo(void){ __asm__ volatile("vadd.i16 q0, q0, q0"); }
END /tmp/ffconf.rfSJ7sky.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -mcpu=cortex-a8 -c -o /tmp/ffconf.k0U9yBVk.o
/tmp/ffconf.rfSJ7sky.c
/tmp/ccvfAIyD.s: Assembler messages:
/tmp/ccvfAIyD.s:24: Error: bad instruction `vadd.i16 q0,q0,q0'
check_asm armvfp "fadds s0, s0, s0"
check_as
BEGIN /tmp/ffconf.rfSJ7sky.c
1 void foo(void){ __asm__ volatile("fadds s0, s0, s0"); }
END /tmp/ffconf.rfSJ7sky.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -mcpu=cortex-a8 -c -o /tmp/ffconf.k0U9yBVk.o
/tmp/ffconf.rfSJ7sky.c
/tmp/ccvw5GSe.s: Assembler messages:
/tmp/ccvw5GSe.s:24: Error: selected processor does not support `fadds s0,s0,s0'
check_cc
BEGIN /tmp/ffconf.rfSJ7sky.c
1 __asm__ (".eabi_attribute 28, 1");
2 int main(void) { return 0; }
END /tmp/ffconf.rfSJ7sky.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -mcpu=cortex-a8 -std=c99 -fomit-frame-pointer -c
-o /tmp/ffconf.k0U9yBVk.o /tmp/ffconf.rfSJ7sky.c
gcc -o /tmp/ffconf.SX32O7xj /tmp/ffconf.k0U9yBVk.o
/usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.3.3/../../../../armv7a-softfloat-linux-gnueabi/bin/ld:
ERROR: /tmp/ffconf.k0U9yBVk.o uses VFP register arguments,
/tmp/ffconf.SX32O7xj does not
/usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.3.3/../../../../armv7a-softfloat-linux-gnueabi/bin/ld:
failed to merge target specific data of file /tmp/ffconf.k0U9yBVk.o
collect2: ld returned 1 exit status
env:
CFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-fomit-frame-pointer -Os -pipe"
CXXFLAGS <same>
CHOST="armv7a-softfloat-linux-gnueabi"