Last Comment Bug 434501 - xpcom assembly should be built as position independent
: xpcom assembly should be built as position independent
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All Linux
: -- normal (vote)
: mozilla1.9.1b2
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-19 06:41 PDT by Mike Hommey [:glandium]
Modified: 2008-10-20 05:20 PDT (History)
1 user (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch [Checkin: Comment 2] (422 bytes, patch)
2008-05-19 06:41 PDT, Mike Hommey [:glandium]
benjamin: review+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2008-05-19 06:41:00 PDT
Created attachment 321598 [details] [diff] [review]
patch
[Checkin: Comment 2]

We've had an issue on debian with the mips xpcom stubs because gcc 4.3 changed its default from PIC to non-PIC. While the whole c++ code is built as PIC code, the xptc stubs assembly ends up built as non-PIC.

It would be safer to build the assembly with -fPIC when C++ is built with -fPIC, to avoid future possible problems with gcc changing its default again on some random architecture. The attached patch does it for linux, but it might be necessary to do the same on other architectures.
Comment 1 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2008-05-20 06:29:29 PDT
Comment on attachment 321598 [details] [diff] [review]
patch
[Checkin: Comment 2]

Pedantically this is incorrect because it sets -fPIC for all assembly and not just assembly that needs to end up in a DSO. But practically we only compile assembly into a DSO, so I'm not going to be pedantic ;-)
Comment 2 Serge Gautherie (:sgautherie) 2008-10-20 05:19:14 PDT
Comment on attachment 321598 [details] [diff] [review]
patch
[Checkin: Comment 2]

http://hg.mozilla.org/mozilla-central/rev/7b2cf30147ca

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