xpcom assembly should be built as position independent

RESOLVED FIXED in mozilla1.9.1b2

Status

()

Core
XPCOM
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla1.9.1b2
All
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Attachment #321598 - Flags: review?(benjamin)
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 ;-)
Attachment #321598 - Flags: review?(benjamin) → review+
Assignee: nobody → mh+mozilla
Keywords: checkin-needed
Comment on attachment 321598 [details] [diff] [review]
patch
[Checkin: Comment 2]

http://hg.mozilla.org/mozilla-central/rev/7b2cf30147ca
Attachment #321598 - Attachment description: patch → patch [Checkin: Comment 2]
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
Summary: xpcom assembly should be built as position independant → xpcom assembly should be built as position independent
You need to log in before you can comment on or make changes to this bug.