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 953

Summary: What about using cross prefix for sdl-config?
Product: SDL Reporter: Miro Kropacek <miro.kropacek>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: HG 2.1   
Hardware: x86   
OS: Linux   

Description Miro Kropacek 2010-02-16 02:54:20 UTC
Currently, there's no clean way how to use both native sdl-config along with SDL for cross environment. For example, my libSDL is from distro package:

/usr/bin/sdl-config
/usr/lib/libSDL.so
:
:
etc. My cross tools are let's say in /usr/m68k-atari-mint so the sdl-config for m68k-atari-mint will go to /usr/m68k-atari-mint/bin if I give --prefix=/usr/m68k-atari-mint when ./configuring.

Now, what should poor developer do when he wants to cross-compile SDL applications?

1. He can leave system as it is and bad (native) sdl-config will be called (from /usr/bin)
2. He can add /usr/m68k-atari-mint/bin to his PATH but guess what? Compilation of native SDL application will fail (because they will run /usr/m68k-atari-mint/bin/sdl-config)
3. He can use some sort of hack, I prepend /usr/m68k-atari-mint/bin to PATH only for the ./configure when cross compiling but it's not very well either.

I propose simple change -- as the ./configure script of SDL library knows if it's cross compiling or not, in case of cross compilation just prepend this cross prefix to 'sdl-config' so the name will become '<cross_prefix>-sdl-config'. You can even make 'sdl-config' symlink for backward compatibility as option if needed.

Of course, this wont work automatically as with gcc/binutils case (where 99% of configure scripts knows it should look for cross prefixed binaries if --host and/or --target switch is specified) but there will be at least an option to cleanly write ./configure scripts for SDL application developers...
Comment 1 Sam Lantinga 2010-07-18 01:23:06 UTC
I'll check this out in my Mac OS X cross-compiling environment.

Thanks!
Comment 2 Ryan C. Gordon 2018-08-06 21:20:21 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.