Skip to content

Fix linking of SDL for MiNT#952

Open
th-otto wants to merge 1 commit into
TheAssemblyArmada:vanillafrom
th-otto:PR-10
Open

Fix linking of SDL for MiNT#952
th-otto wants to merge 1 commit into
TheAssemblyArmada:vanillafrom
th-otto:PR-10

Conversation

@th-otto
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

hifi commented Mar 16, 2024

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

@th-otto
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants