diff --git a/src/codecs/music_flac.c b/src/codecs/music_flac.c index a94c64bbd..658f7ab2f 100644 --- a/src/codecs/music_flac.c +++ b/src/codecs/music_flac.c @@ -93,6 +93,10 @@ static flac_loader flac; #endif static int FLAC_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (flac.loaded == 0) { #ifdef FLAC_DYNAMIC diff --git a/src/codecs/music_gme.c b/src/codecs/music_gme.c index e5637a0ac..b00bcc482 100644 --- a/src/codecs/music_gme.c +++ b/src/codecs/music_gme.c @@ -61,6 +61,10 @@ static gme_loader gme; #endif static int GME_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (gme.loaded == 0) { #ifdef GME_DYNAMIC diff --git a/src/codecs/music_modplug.c b/src/codecs/music_modplug.c index fcea9374a..c20795b80 100644 --- a/src/codecs/music_modplug.c +++ b/src/codecs/music_modplug.c @@ -63,6 +63,10 @@ static ModPlug_Settings settings; #endif static int MODPLUG_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (modplug.loaded == 0) { #ifdef MODPLUG_DYNAMIC diff --git a/src/codecs/music_mpg123.c b/src/codecs/music_mpg123.c index 102d27d9d..d5baf1857 100644 --- a/src/codecs/music_mpg123.c +++ b/src/codecs/music_mpg123.c @@ -82,6 +82,10 @@ static mpg123_loader mpg123; #endif static int MPG123_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (mpg123.loaded == 0) { #ifdef MPG123_DYNAMIC diff --git a/src/codecs/music_ogg.c b/src/codecs/music_ogg.c index 1994094ff..61610cb61 100644 --- a/src/codecs/music_ogg.c +++ b/src/codecs/music_ogg.c @@ -74,6 +74,10 @@ static vorbis_loader vorbis; #endif static int OGG_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (vorbis.loaded == 0) { #ifdef OGG_DYNAMIC diff --git a/src/codecs/music_opus.c b/src/codecs/music_opus.c index dca2d6964..1ecfbe135 100644 --- a/src/codecs/music_opus.c +++ b/src/codecs/music_opus.c @@ -61,6 +61,10 @@ static opus_loader opus; #endif static int OPUS_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (opus.loaded == 0) { #ifdef OPUS_DYNAMIC diff --git a/src/codecs/music_wavpack.c b/src/codecs/music_wavpack.c index 158763659..fe38059c0 100644 --- a/src/codecs/music_wavpack.c +++ b/src/codecs/music_wavpack.c @@ -98,6 +98,10 @@ static wavpack_loader wvpk; #endif static int WAVPACK_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (wvpk.loaded == 0) { #ifdef WAVPACK_DYNAMIC diff --git a/src/codecs/music_xmp.c b/src/codecs/music_xmp.c index ec5f92a42..a0029912b 100644 --- a/src/codecs/music_xmp.c +++ b/src/codecs/music_xmp.c @@ -77,6 +77,10 @@ static xmp_loader libxmp; #endif static int XMP_Load(void) +#ifdef __APPLE__ + /* Need to turn off optimizations so weak framework load check works */ + __attribute__ ((optnone)) +#endif { if (libxmp.loaded == 0) { #ifdef XMP_DYNAMIC