Fix undefined symbols when compiling libretro core as debug build

When building with `cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_LIBRETRO=1`
the resulting lib has undefined symbols that cause issues when loading
the core in GDB.

Functionality is being ifdefed out with the define MINIMAL_CORE, but
still in a few places those symbols are used.

$ ldd -r mgba_libretro.so
undefined symbol: GBAVideoProxyRendererCreate (./mgba_libretro.so)
undefined symbol: GBAVideoProxyRendererUnshim (./mgba_libretro.so)
undefined symbol: GBAVideoProxyRendererShim (./mgba_libretro.so)
undefined symbol: GBVideoProxyRendererCreate (./mgba_libretro.so)
undefined symbol: GBVideoProxyRendererUnshim (./mgba_libretro.so)
undefined symbol: GBVideoProxyRendererShim (./mgba_libretro.so)
undefined symbol: mVideoLogContextInitialState (./mgba_libretro.so)
undefined symbol: mVideoLoggerAddChannel (./mgba_libretro.so)
undefined symbol: mVideoLoggerAttachChannel (./mgba_libretro.so)
undefined symbol: mVideoLoggerRendererCreate (./mgba_libretro.so)
This commit is contained in:
Christian Fetzer 2017-11-29 20:50:04 +01:00 committed by endrift
parent 8bc6e7e0b9
commit 9cedf74b77
2 changed files with 4 additions and 0 deletions

View File

@ -746,6 +746,7 @@ static void _GBCoreEnableAudioChannel(struct mCore* core, size_t id, bool enable
}
}
#ifndef MINIMAL_CORE
static void _GBCoreStartVideoLog(struct mCore* core, struct mVideoLogContext* context) {
struct GBCore* gbcore = (struct GBCore*) core;
struct GB* gb = core->board;
@ -768,6 +769,7 @@ static void _GBCoreEndVideoLog(struct mCore* core) {
free(gbcore->proxyRenderer.logger);
gbcore->proxyRenderer.logger = NULL;
}
#endif
struct mCore* GBCoreCreate(void) {
struct GBCore* gbcore = malloc(sizeof(*gbcore));

View File

@ -803,6 +803,7 @@ static void _GBACoreEnableAudioChannel(struct mCore* core, size_t id, bool enabl
}
}
#ifndef MINIMAL_CORE
static void _GBACoreStartVideoLog(struct mCore* core, struct mVideoLogContext* context) {
struct GBACore* gbacore = (struct GBACore*) core;
struct GBA* gba = core->board;
@ -829,6 +830,7 @@ static void _GBACoreEndVideoLog(struct mCore* core) {
free(gbacore->proxyRenderer.logger);
gbacore->proxyRenderer.logger = NULL;
}
#endif
struct mCore* GBACoreCreate(void) {
struct GBACore* gbacore = malloc(sizeof(*gbacore));