We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 625

Summary: SDL_STATIC_LIBS should include EXTRA_LDFLAGS
Product: SDL Reporter: Gregory Smith <wolfy>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: 1.2.13Keywords: target-1.2.14
Hardware: x86   
OS: Windows (All)   
Attachments: win-static-libs.diff

Description Gregory Smith 2008-09-13 10:09:26 UTC
I seem to need to add EXTRA_LDFLAGS to SDL_STATIC_LIBS to get programs to compile with my --disable-shared SDL build in mingw32.
Comment 1 Gregory Smith 2008-09-13 10:10:49 UTC
Created attachment 277 [details]
win-static-libs.diff

This patch allows me to build programs with --disable-shared using mingw. It might be appropriate to have EXTRA_LDFLAGS always be in SDL_STATIC_LIBS, but I'm not sure so I only put it in for win32) in this patch.
Comment 2 Ryan C. Gordon 2009-09-13 16:33:24 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 3 Sam Lantinga 2009-09-26 22:35:59 UTC
Static linking isn't recommended, as it violates the LGPL if you're not creating an open source application.
Comment 4 Gregory Smith 2009-09-27 13:25:45 UTC
May I suggest removing --static-libs from sdl-config, then? In my opinion, it should either list the correct libraries, or not be a valid option. FWIW I'm statically linking with a GPL application.
Comment 5 Ryan C. Gordon 2009-09-27 22:03:16 UTC
Actually, I'm adding this to my bug list to apply this patch.

(discussed with Sam outside of Bugzilla, got his blessing.)

--ryan.
Comment 6 Ryan C. Gordon 2009-09-28 13:30:46 UTC
It looks like we already fixed this in the default case (svn revision #3511, for Bug #531), so we don't need a win32-specific case now. So this will be fixed for 1.2.14 anyhow.

--ryan.