aboutsummaryrefslogtreecommitdiff
path: root/Makefile.libretro
diff options
context:
space:
mode:
authorHugo Hromic2019-04-09 10:23:39 +0100
committerHugo Hromic2019-04-09 10:23:39 +0100
commit99a5a3364ebe6722805802f1861b6a5f6c6d4624 (patch)
tree325a38badd595e1021c0b7832d0234939a5c3d4c /Makefile.libretro
parenta9422018bae26b5f1dd65a25d1adef80b0bec99d (diff)
downloadpcsx_rearmed-99a5a3364ebe6722805802f1861b6a5f6c6d4624.tar.gz
pcsx_rearmed-99a5a3364ebe6722805802f1861b6a5f6c6d4624.tar.bz2
pcsx_rearmed-99a5a3364ebe6722805802f1861b6a5f6c6d4624.zip
Backport large file support from configure script
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!
Diffstat (limited to 'Makefile.libretro')
-rw-r--r--Makefile.libretro5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile.libretro b/Makefile.libretro
index e4a102a..5a59aea 100644
--- a/Makefile.libretro
+++ b/Makefile.libretro
@@ -334,6 +334,11 @@ CFLAGS += $(fpic)
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}')