Bug 4851 (int-130536)

Summary: libosso assumes that all ARM platforms has VFP instructions.
Product: [Maemo Official Platform] Desktop platform Reporter: Carsten Munk <carsten.munk>
Component: libossoAssignee: Kimmo Hämäläinen <kimmo.hamalainen>
Status: RESOLVED FIXED QA Contact: libosso-bugs
Severity: normal    
Priority: Low CC: andre_klapper
Version: 5.0/(2.2009.51-1)   
Target Milestone: 5.0/(10.2010.19-1)   
Hardware: All   
OS: All   

Description Carsten Munk (reporter) maemo.org 2009-07-29 13:57:31 UTC
SOFTWARE VERSION:
5.0-beta2

STEPS TO REPRODUCE THE PROBLEM:
Compile libosso towards ARMv4t such as debian armel.

EXPECTED OUTCOME:

Ability to compile libosso.

ACTUAL OUTCOME:

/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-DPREFIX=\"/usr\" -DOSSO_CTRLPANELPLUGINDIR=\"/usr/lib/hildon-control-panel\"
-g -ansi -D_BSD_SOURCE -D_GNU_SOURCE -O2 -rdynamic -Wall -Wmissing-prototypes
-std=c99 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I.. -I../src -g -O2 -Wall -g -ansi -Wshadow -O2 -c
-o osso-fpu.lo osso-fpu.c
gcc -DHAVE_CONFIG_H -I. -I.. -DPREFIX=\"/usr\"
-DOSSO_CTRLPANELPLUGINDIR=\"/usr/lib/hildon-control-panel\" -g -ansi
-D_BSD_SOURCE -D_GNU_SOURCE -O2 -rdynamic -Wall -Wmissing-prototypes -std=c99
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I.. -I../src -g -O2 -Wall -g -ansi -Wshadow -O2 -c osso-fpu.c -fPIC -DPIC -o
.libs/osso-fpu.o
/tmp/ccWUAh9f.s: Assembler messages:
/tmp/ccWUAh9f.s:72: Error: selected processor does not support `fmrx r3,fpscr'
/tmp/ccWUAh9f.s:75: Error: selected processor does not support `fmxr fpscr,r3'
/tmp/ccWUAh9f.s:89: Error: selected processor does not support `fmrx r3,fpscr'
/tmp/ccWUAh9f.s:93: Error: selected processor does not support `fmxr fpscr,r3'
make[3]: *** [osso-fpu.lo] Error 1

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:

The assumption can be seen in src/osso-fpu.c and osso_fpu_set_mode(), which is
guarded by a #ifdef __arm__. Ideally this should be a guard based on if the
target is VFP-capable, if possible.

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
Comment 1 Andre Klapper maemo.org 2009-07-29 17:55:12 UTC
Valid request -> importing.
Comment 2 Carsten Munk (reporter) maemo.org 2009-08-06 21:55:50 UTC
According to http://wiki.debian.org/ArmEabiPort the right way to wrap the asm
code with VFP instructions would be #if defined(__VFP_FP__) &&
!defined(__SOFTFP__))
Comment 3 Carsten Munk (reporter) maemo.org 2009-09-28 22:26:50 UTC
This problem also seems to be the case for hildon-desktop (see src/main.c)
Comment 4 Andre Klapper maemo.org 2009-12-04 21:53:46 UTC
http://maemo.gitorious.org/fremantle-hildon-desktop/libosso/merge_requests/2249

Going to close this ticket after internally released.
Comment 5 Andre Klapper maemo.org 2009-12-10 15:12:53 UTC
This has been fixed in package
libosso 2.27-1+0m5
which is part of the internal build version
2009.50-5
(Note that 2009 is the year and the number after is the week.)

Any public update released with or after this build version will include the
fix.
Please verify that the new version fixes the bug by marking this bug report as
VERIFIED after the public update has been released and if you have some time.
For your information, Nokia does not announce release dates of updates in
advance.
Comment 6 Andre Klapper maemo.org 2010-01-14 13:41:54 UTC
(Fix not included in today's 2.2009.51-1 update => updating Version field)
Comment 7 Andre Klapper maemo.org 2010-03-15 20:53:32 UTC
Setting explicit PR1.2 milestone (so it's clearer in which public release the
fix will be available to users).

Sorry for the bugmail noise (you can filter on this message).