From: notaz Date: Sat, 9 Jul 2016 23:09:08 +0000 (+0300) Subject: libretro: try to prevent bad builds X-Git-Tag: r24l~850 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=4e0771f57fdc6d3410a11c7731d9e8dbc3c026f6;hp=7e89e240045b5c4145f24387ae993c87e32640fb;p=pcsx_rearmed.git libretro: try to prevent bad builds --- diff --git a/Makefile.libretro b/Makefile.libretro index 2abe7112..26ee336c 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -267,6 +267,17 @@ endif MAIN_LDFLAGS += -shared MAIN_LDLIBS += $(LIBM) $(LIBZ) +# try to autodetect stuff for the lazy +ifndef ARCH +ARCH = $(shell $(CC) -dumpmachine | awk -F- '{print $$1}') +endif +ifndef HAVE_NEON +HAVE_NEON = $(shell $(CC) -E -dD - < /dev/null 2> /dev/null | grep -q __ARM_NEON__ && echo 1 || echo 0) +endif +ifeq ($(shell ld -v 2> /dev/null | awk '{print $$1}'),GNU) +MAIN_LDFLAGS += -Wl,--no-undefined +endif + TARGET ?= libretro.so PLATFORM = libretro BUILTIN_GPU ?= peops