libsdl: config tweaks, remove sdlmain lib
This patch contains changes to the libSDL port that were needed to build the Hatari emulator using cmake. - Since SDL programs cannot use the posix library (because sdl's init function needs a way to get hold of the Genode env), the sdl_main library must be used instead of the posix library. The sdl_main code implements the Libc::Component::construct function for the final binary. However, 3rd-party build systems are not aware of this Genode-specific peculiarity and thereby create binaries that leave libsdl uninitialized. This patch adds the sdl_main to libsdl by default and thereby eliminates the need for specifying the extra sdl_main library. Customizing the Libc::Component::construct is still possible by overriding the library-provided implementation in the main program. - A few missing config definitions are added to compile Hatari successfully. - Avoid reliance on the include/SDL convention in SDL_config.h - Cmake relies on the upper-case naming of the library with no way to tweak this convention. So we install an symlink named `SDL.lib.so` when installing the library into the <build-dir>/bin/ directory. Fixes #161
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
MIRROR_FROM_REP_DIR := lib/symbols/sdl lib/import/import-sdl.mk \
|
||||
lib/mk/sdlmain.mk
|
||||
|
||||
MIRROR_FROM_LIBPORTS := lib/mk/mesa_api.mk
|
||||
|
||||
content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_LIBPORTS) src/lib/sdl include LICENSE
|
||||
content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_LIBPORTS) include LICENSE
|
||||
|
||||
$(MIRROR_FROM_REP_DIR):
|
||||
$(mirror_from_rep_dir)
|
||||
@@ -25,9 +24,5 @@ include:
|
||||
cp -r $(MESA_PORT_DIR)/include/* $@/
|
||||
cp -r $(GENODE_DIR)/repos/libports/include/EGL $@/
|
||||
|
||||
src/lib/sdl:
|
||||
mkdir -p $@
|
||||
cp -r $(REP_DIR)/src/lib/sdl/sdl_main.cc $@/
|
||||
|
||||
LICENSE:
|
||||
cp $(SDL_PORT_DIR)/src/lib/sdl/COPYING $@
|
||||
|
||||
@@ -1 +1 @@
|
||||
2018-03-18 2cdaa5c32a93a5acf0ee7159f96e9f01d67ab8d2
|
||||
2019-05-14 cb3175a6545ea045864baa9783f4ac54a3206826
|
||||
|
||||
@@ -1 +1 @@
|
||||
2019-01-02 155b546298117fca760a633abcd79080e124df6c
|
||||
2019-05-14 598e91be62c73d18bad160f5f2438a855c4f0ed1
|
||||
|
||||
Reference in New Issue
Block a user