Closed Bug 644136 Opened 13 years ago Closed 13 years ago

libffi fails to build on some setups

Categories

(Core :: js-ctypes, defect)

ARM
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: glandium, Assigned: siarhei.siamashka)

References

Details

Attachments

(1 file)

(this was reported on dev.build by John O'Donnell)

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude
-I./src -I. -I./include -Iinclude -I./src -MT src/arm/sysv.lo -MD -MP
-MF src/arm/.deps/sysv.Tpo -c src/arm/sysv.S  -fPIC -DPIC -o
src/arm/sysv.o
src/arm/sysv.S: Assembler messages:
src/arm/sysv.S:266: Error: selected processor does not support ARM
mode `flddle d0,[ip]'
src/arm/sysv.S:267: Error: selected processor does not support ARM
mode `fldmiadgt ip,{d0-d7}'
src/arm/sysv.S:307: Error: selected processor does not support ARM
mode `fstseq s0,[r2]'
src/arm/sysv.S:311: Error: selected processor does not support ARM
mode `fstdeq d0,[r2]'
src/arm/sysv.S:316: Error: selected processor does not support ARM
mode `fstmiadeq r2,{d0-d3}'
src/arm/sysv.S:400: Error: selected processor does not support ARM
mode `fstmfdd sp!,{d0-d7}'
src/arm/sysv.S:438: Error: selected processor does not support ARM mode `flds s0
,[sp]'
src/arm/sysv.S:441: Error: selected processor does not support ARM
mode `fldd d0,[sp]'
src/arm/sysv.S:450: Error: selected processor does not support ARM
mode `fldmiad sp,{d0-d1}'
src/arm/sysv.S:453: Error: selected processor does not support ARM
mode `fldmiad sp,{d0-d3}'
make[6]: *** [src/arm/sysv.lo] Error 1
make[6]: Leaving directory `/root/firefox/mozilla-2.0/js/src/ctypes/libffi'


It looks like a lack of proper #ifdefs in bug 605421 is to blame.
It is caused by missing .fpu directive, which is available in upstream libffi-3.0.10rc8. Looks like it just needs to be backported.
A patch with .fpu directive taken from upstream libffi is attached. Without this patch compilation fails for me on ARM hardfloat system (gentoo linux).
Comment on attachment 523843 [details] [diff] [review]
added missing .fpu directive to fix compilation problem

Review of attachment 523843 [details] [diff] [review]:
-----------------------------------------------------------------

Let's see if i remember how to do the review thing correctly :)
Attachment #523843 - Flags: review?(benjamin)
Comment on attachment 523843 [details] [diff] [review]
added missing .fpu directive to fix compilation problem

Should we just take an entire upstream libffi instead?
Attachment #523843 - Flags: review?(benjamin) → review+
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #4)
> Comment on attachment 523843 [details] [diff] [review]
> added missing .fpu directive to fix compilation problem
> 
> Should we just take an entire upstream libffi instead?

There hasn't been a libffi release after the one we have in the tree, yet.
(In reply to Mike Hommey [:glandium] from comment #5)
> (In reply to Benjamin Smedberg  [:bsmedberg] from comment #4)
> > Comment on attachment 523843 [details] [diff] [review]
> > added missing .fpu directive to fix compilation problem
> > 
> > Should we just take an entire upstream libffi instead?
> 
> There hasn't been a libffi release after the one we have in the tree, yet.

Well, looking at the log, the libffi tree in ctypes isn't from a released version of libffi but from git: http://hg.mozilla.org/mozilla-central/rev/e2265b714a02
(In reply to Raúl Porcel from comment #6)
> Well, looking at the log, the libffi tree in ctypes isn't from a released
> version of libffi but from git:
> http://hg.mozilla.org/mozilla-central/rev/e2265b714a02

Mmmm I thought it was 3.0.9 + cherry-picked patches.
Well, i'd say this change doesn't hurt, but i'll leave to dwitte to decide if its better to get a new checkout
Keywords: checkin-needed
Assignee: nobody → siarhei.siamashka
http://hg.mozilla.org/integration/mozilla-inbound/rev/0be4a94258c2

Siarhei, to save time for future patches, could you set your hgrc to include the author automatically & also add a commit message, along the lines of:
http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed

Thanks :-)
Status: NEW → ASSIGNED
Keywords: checkin-needed
Target Milestone: --- → mozilla9
http://hg.mozilla.org/mozilla-central/rev/0be4a94258c2
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: