Opened 10 years ago

Closed 10 years ago

#3511 closed bug (fixed)

gcc-4.3.3-haiku-090129 forbids undefined symbols in shared libraries

Reported by: titer Owned by: mmlr
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc: planche2k@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

gcc4 currently adds -no-undefined unconditionally when linking, which I know is expected behavior (mmlr mentioned it in his blog post announcing the native gcc4).

This is going to cause build issues with a number of projects though, which assume the usual behavior of allowing undefined symbols in shared libraries (e.g. try building libevent), and unfortunately I don't believe we can convince everybody else to stop using this "feature".

Updating the specs to only enable -no-undefined when linking apps fixes it (same way gcc2 does it).

Attachments (1)

specs.patch (365 bytes) - added by titer 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by titer

Attachment: specs.patch added

comment:1 Changed 10 years ago by stippi

Thanks a lot, I ran into the same problem. Where is the specs file located? Your patch was made in the same folder, so I can't tell without searching for specs myself. :-) Can this patch be included in the original 4.3.3 native Haiku GCC package, or does it require rebuilding GCC? Thanks for your work!

comment:2 in reply to:  1 Changed 10 years ago by titer

Run "gcc -dumpspecs > /boot/develop/tools/gcc-4.3.3-haiku-090129/lib/gcc/i586-pc-haiku/4.3.3/specs", and then modify that file.

comment:3 Changed 10 years ago by andreasf

Cc: planche2k@… added

comment:4 Changed 10 years ago by bonefish

Owner: changed from bonefish to mmlr

comment:5 Changed 10 years ago by mmlr

Resolution: fixed
Status: newclosed

Fixed in hrev29490, will be available when the updated GCC4 package is built & uploaded.

Note: See TracTickets for help on using tickets.