Bug 17445 - [GTK] WebKit doesn't compile with LDFLAGS="-Wl,--as-needed"
Summary: [GTK] WebKit doesn't compile with LDFLAGS="-Wl,--as-needed"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://www.gentoo.org/proj/en/qa/asne...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 03:16 PST by Mike Auty
Modified: 2008-02-21 11:45 PST (History)
1 user (show)

See Also:


Attachments
webkitgtk-30267-as-needed.patch (2.03 KB, patch)
2008-02-20 03:21 PST, Mike Auty
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty 2008-02-20 03:16:44 PST
The GNUmakefile.am files make use of the LDFLAGS variable to include library additions such as -ljpeg etc.  Unfortunately, if these inclusions aren't made in LIBADD/LDADD variables, then they are mis-ordered during the linking.

The as-needed flag discards libraries whose functions have not been needed by earlier libraries, which therefore makes the ordering important.

I'll be attaching a patch directly after this, built against a recent nightly build.  This could potentially affect other build systems/OSes, but I've only been able to confirm that the patch fixes the build issues on linux.
Comment 1 Mike Auty 2008-02-20 03:21:57 PST
Created attachment 19224 [details]
webkitgtk-30267-as-needed.patch

This moves all -l library inclusion statements from LDFLAGS variables to LIBADD/LDADD variables.  It applies cleanly against r30267.

If you require newer versions or any further information, please just ask.  5:)
Comment 2 Alp Toker 2008-02-21 11:43:55 PST
Comment on attachment 19224 [details]
webkitgtk-30267-as-needed.patch

r=me

Sorry about the delay.

I'll clean up a few whitespace mistakes in GNUmakefile.am and write a ChangeLog entry for you this time, but in future please look into doing these in your patches.

Thanks
Comment 3 Alp Toker 2008-02-21 11:45:16 PST
Landed in r30459. I also took out an unneeded -ljpeg from the GtkLauncher flags.