Closed Bug 434501 Opened 16 years ago Closed 16 years ago

xpcom assembly should be built as position independent

Categories

(Core :: XPCOM, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

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
Closed: 16 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.

Attachment

General

Created:
Updated:
Size: