Large file support is not enabled in `Makefile.libretro`, therefore when loading
large PBP files you might get "Value too large" errors in some 32-bits systems
such as the Raspberry Pi. For example:
Could't open 'Final Fantasy VIII (USA).pbp' for reading: Value too large
for defined data type
Error opening CD-ROM plugin!
MAIN_LDFLAGS += -shared
MAIN_LDLIBS += $(LIBPTHREAD) $(LIBM) $(LIBDL) $(LIBZ)
+# enable large file support if available
+ifeq ($(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h | grep __SIZEOF_LONG__ | awk '{print $$3}'),4)
+CFLAGS += -D_FILE_OFFSET_BITS=64
+endif
+
# try to autodetect stuff for the lazy
ifndef ARCH
ARCH = $(shell $(CC) -dumpmachine | awk -F- '{print $$1}')