Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linking of SDL for MiNT #952

Open
wants to merge 1 commit into
base: vanilla
Choose a base branch
from

Conversation

th-otto
Copy link
Contributor

@th-otto th-otto commented Mar 16, 2024

Brain-damaged cmake's find_package macro was always linking to lib/libSDL.a regardless of cpu

Brain-damaged cmake's find_package macro was always linking to
lib/libSDL.a regardless of cpu
@hifi
Copy link
Collaborator

hifi commented Mar 16, 2024

What hardware is this for? Can a 68k actually run C&C?

@th-otto
Copy link
Contributor Author

th-otto commented Mar 16, 2024

A "better" 68k like 68040 or 68060 probably can. But i'm testing it currently in an emulator (Aranym).

@OmniBlade
Copy link
Contributor

Does the find actually fail or does it just find the wrong files? I feel this should either be fixed in the find module or if we are going to hard code it into the CMake, do so at the point the libraries are found and manually popular the SDL_xxx variables with the appropriate content.

@th-otto
Copy link
Contributor Author

th-otto commented Apr 3, 2024

It finds the wrong files. Our target uses a multi-lib configuration where cpu-specific libraries are in subdirs of /usr/lib. But the find_library makro of cmake only looks in /usr/lib, and passes the absolute path to the compiler, thus using a library for the wrong cpu.

Its a general nuisance of cmake, not only when cross-compiling. Changing the module does not work, because that is a general version of the host system, not something that our toolchain provides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants