Last Comment Bug 644136 - libffi fails to build on some setups
: libffi fails to build on some setups
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: js-ctypes (show other bugs)
: Trunk
: ARM Linux
: -- normal (vote)
: mozilla9
Assigned To: Siarhei Siamashka
:
Mentors:
Depends on:
Blocks: 605421
  Show dependency treegraph
 
Reported: 2011-03-23 06:51 PDT by Mike Hommey [:glandium]
Modified: 2011-08-28 13:27 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
added missing .fpu directive to fix compilation problem (472 bytes, patch)
2011-04-02 19:49 PDT, Siarhei Siamashka
benjamin: review+
Details | Diff | Review

Description Mike Hommey [:glandium] 2011-03-23 06:51:57 PDT
(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.
Comment 1 Siarhei Siamashka 2011-04-02 18:47:29 PDT
It is caused by missing .fpu directive, which is available in upstream libffi-3.0.10rc8. Looks like it just needs to be backported.
Comment 2 Siarhei Siamashka 2011-04-02 19:49:58 PDT
Created attachment 523843 [details] [diff] [review]
added missing .fpu directive to fix compilation problem

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 3 Raúl Porcel 2011-08-13 10:11:54 PDT
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 :)
Comment 4 Benjamin Smedberg [:bsmedberg] 2011-08-15 07:34:20 PDT
Comment on attachment 523843 [details] [diff] [review]
added missing .fpu directive to fix compilation problem

Should we just take an entire upstream libffi instead?
Comment 5 Mike Hommey [:glandium] 2011-08-15 07:44:24 PDT
(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.
Comment 6 Raúl Porcel 2011-08-15 08:03:17 PDT
(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
Comment 7 Mike Hommey [:glandium] 2011-08-15 08:13:07 PDT
(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.
Comment 8 Raúl Porcel 2011-08-27 08:23:38 PDT
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
Comment 9 Ed Morley [:emorley] 2011-08-28 04:08:41 PDT
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 :-)
Comment 10 Ed Morley [:emorley] 2011-08-28 13:27:36 PDT
http://hg.mozilla.org/mozilla-central/rev/0be4a94258c2

Note You need to log in before you can comment on or make changes to this bug.