Commit f2e03105 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Cleanups/updates

parent bffe3550
Pipeline #6175 passed with stages
in 4 minutes and 43 seconds
......@@ -80,12 +80,10 @@ ifneq (,$(findstring unix,$(platform)))
FLAGS += -DARM -march=armv8-a+crc+simd -mtune=cortex-a72
endif
endif
FLAGS += -DHAVE_MKDIR
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
SHARED := -dynamiclib
FLAGS += -DHAVE_MKDIR
ifeq ($(arch),ppc)
ENDIANNESS_DEFINES := -DMSB_FIRST
OLD_GCC := 1
......@@ -136,38 +134,16 @@ else ifeq ($(platform), qnx)
TARGET := $(TARGET_NAME)_libretro_$(platform).so
fpic := -fPIC
SHARED := -lcpp -lm -shared -Wl,--no-undefined -Wl,--version-script=link.T
FLAGS += -DHAVE_MKDIR
CC = qcc -Vgcc_ntoarmv7le
CXX = QCC -Vgcc_ntoarmv7le_cpp
AR = QCC -Vgcc_ntoarmv7le
FLAGS += -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
ENDIANNESS_DEFINES := -DMSB_FIRST
OLD_GCC := 1
FLAGS += -DHAVE_MKDIR -DARCH_POWERPC_ALTIVEC
STATIC_LINKING = 1
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
ENDIANNESS_DEFINES := -DMSB_FIRST
CXXFLAGS += -Xc+=exceptions
OLD_GCC := 1
NO_GCC := 1
FLAGS += -DHAVE_MKDIR -DARCH_POWERPC_ALTIVEC
STATIC_LINKING = 1
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
ENDIANNESS_DEFINES := -DMSB_FIRST
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
# PS2
......@@ -177,7 +153,6 @@ else ifeq ($(platform), ps2)
CXX = ee-g++$(EXE_EXT)
AR = ee-ar$(EXE_EXT)
FLAGS += -DPS2 -G0 -DABGR1555 -O3
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
# PSP
......@@ -187,7 +162,6 @@ else ifeq ($(platform), psp1)
CXX = psp-g++$(EXE_EXT)
AR = psp-ar$(EXE_EXT)
FLAGS += -DPSP -G0 -O3
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
# Vita
......@@ -196,7 +170,7 @@ else ifeq ($(platform), vita)
CC = arm-vita-eabi-gcc$(EXE_EXT)
CXX = arm-vita-eabi-g++$(EXE_EXT)
AR = arm-vita-eabi-ar$(EXE_EXT)
FLAGS += -DVITA -DHAVE_MKDIR
FLAGS += -DVITA
STATIC_LINKING = 1
else ifeq ($(platform), xenon)
......@@ -205,7 +179,6 @@ else ifeq ($(platform), xenon)
CXX = xenon-g++$(EXE_EXT)
AR = xenon-ar$(EXE_EXT)
ENDIANNESS_DEFINES += -D__LIBXENON__ -m32 -D__ppc__ -DMSB_FIRST
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
else ifeq ($(platform), ngc)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
......@@ -215,7 +188,6 @@ else ifeq ($(platform), ngc)
ENDIANNESS_DEFINES += -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST
EXTRA_INCLUDES := -I$(DEVKITPRO)/libogc/include
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
else ifeq ($(platform), wii)
......@@ -226,7 +198,6 @@ else ifeq ($(platform), wii)
ENDIANNESS_DEFINES += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST
EXTRA_INCLUDES := -I$(DEVKITPRO)/libogc/include
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
# Nintendo Switch (libnx)
......@@ -238,7 +209,6 @@ else ifeq ($(platform), libnx)
FLAGS += -D__SWITCH__ -DHAVE_LIBNX -DHAVE_GETPWUID=0 -DHAVE_GETCWD=1
FLAGS += -march=armv8-a -mtune=cortex-a57 -mtp=soft -ffast-math -mcpu=cortex-a57+crc+fp+simd -ffunction-sections
FLAGS += -Ifrontend/switch -ftree-vectorize
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
else ifeq ($(platform), wiiu)
......@@ -249,7 +219,6 @@ else ifeq ($(platform), wiiu)
ENDIANNESS_DEFINES += -DGEKKO -DWIIU -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST
EXTRA_INCLUDES := -I$(DEVKITPRO)/libogc/include
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
# Classic Platforms ####################
......@@ -274,7 +243,6 @@ else ifeq ($(platform), classic_armv7_a7)
CPPFLAGS += $(CFLAGS)
HAVE_NEON = 1
ARCH = arm
FLAGS += -DHAVE_MKDIR
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
CFLAGS += -march=armv7-a
else
......@@ -290,7 +258,6 @@ else ifeq ($(platform), rpi3)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
FLAGS += -DHAVE_MKDIR
FLAGS += -marm -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ffast-math
ASFLAGS += -mfpu=neon-fp-armv8
FLAGS += -DARM
......@@ -300,7 +267,6 @@ else ifneq (,$(findstring armv,$(platform)))
fpic := -fPIC
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
CC = gcc
FLAGS += -DHAVE_MKDIR
IS_X86 = 0
ifneq (,$(findstring cortexa8,$(platform)))
FLAGS += -marm -mcpu=cortex-a8
......@@ -335,7 +301,6 @@ else ifeq ($(platform), gcw0)
AR = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ar
fpic := -fPIC
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
FLAGS += -DHAVE_MKDIR
FLAGS += -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
# Windows MSVC 2010 x64
......@@ -344,7 +309,6 @@ else ifeq ($(platform), windows_msvc2010_x64)
CXX = cl.exe
NO_GCC := 1
FLAGS += -DHAVE_MKDIR
WINDOWS_VERSION = 1
IS_X86 = 1
......@@ -372,7 +336,6 @@ else ifeq ($(platform), windows_msvc2010_x86)
CXX = cl.exe
NO_GCC := 1
FLAGS += -DHAVE_MKDIR
WINDOWS_VERSION = 1
IS_X86 = 1
......@@ -400,7 +363,6 @@ else ifeq ($(platform), windows_msvc2005_x86)
CXX = cl.exe
NO_GCC := 1
FLAGS += -DHAVE_MKDIR
WINDOWS_VERSION = 1
IS_X86 = 1
......@@ -428,7 +390,6 @@ else ifeq ($(platform), xbox1_msvc2003)
LD = lib.exe
NO_GCC := 1
FLAGS += -DHAVE_MKDIR
WINDOWS_VERSION = 1
IS_X86 = 1
......@@ -446,7 +407,6 @@ else ifeq ($(platform), windows_msvc2003_x86)
CXX = cl.exe
NO_GCC := 1
FLAGS += -DHAVE_MKDIR
WINDOWS_VERSION = 1
IS_X86 = 1
......@@ -473,7 +433,6 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
CXXFLAGS += -DNOMINMAX
NO_GCC := 1
FLAGS += -DHAVE_MKDIR
WINDOWS_VERSION = 1
IS_X86 = 1
......@@ -572,7 +531,6 @@ else
IS_X86 = 1
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
LDFLAGS += -static-libgcc -static-libstdc++ -lwinmm
FLAGS += -DHAVE__MKDIR
endif
include Makefile.common
......
......@@ -80,15 +80,11 @@
#include <pspkernel.h>
#endif
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <cell/cell_fs.h>
#endif
#if defined(VITA)
#define FIO_S_ISDIR SCE_S_ISDIR
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
#if defined(__QNX__) || defined(PSP)
#include <unistd.h> /* stat() is defined here */
#endif
......
......@@ -69,7 +69,7 @@ extern "C" {
# endif
# endif
# else
# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CELLOS_LV2__)
# if defined(__GNUC__) && __GNUC__ >= 4
# define RETRO_API RETRO_CALLCONV __attribute__((__visibility__("default")))
# else
# define RETRO_API RETRO_CALLCONV
......
......@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdint.h>
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX)
#if defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX)
/* No mman available */
#elif defined(_WIN32) && !defined(_XBOX)
#include <windows.h>
......
......@@ -43,10 +43,6 @@
#endif
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <sys/fs_external.h>
#endif
#include <limits.h>
#ifdef _MSC_VER
......@@ -79,9 +75,7 @@ static INLINE bool bits_any_set(uint32_t* ptr, uint32_t count)
}
#ifndef PATH_MAX_LENGTH
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#define PATH_MAX_LENGTH CELL_FS_MAX_FS_PATH_LENGTH
#elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS)
#if defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS)
#define PATH_MAX_LENGTH 512
#else
#define PATH_MAX_LENGTH 4096
......
......@@ -64,16 +64,7 @@
# endif
#endif
#if defined (__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <cell/cell_fs.h>
#define O_RDONLY CELL_FS_O_RDONLY
#define O_WRONLY CELL_FS_O_WRONLY
#define O_CREAT CELL_FS_O_CREAT
#define O_TRUNC CELL_FS_O_TRUNC
#define O_RDWR CELL_FS_O_RDWR
#else
#include <fcntl.h>
#endif
/* TODO: Some things are duplicated but I'm really afraid of breaking other platforms by touching this */
#if defined(VITA)
......@@ -95,7 +86,7 @@
# include <unistd.h>
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
#if defined(__QNX__) || defined(PSP)
#include <unistd.h> /* stat() is defined here */
#endif
......@@ -139,15 +130,11 @@
#include <pspkernel.h>
#endif
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <cell/cell_fs.h>
#endif
#if defined(VITA)
#define FIO_S_ISDIR SCE_S_ISDIR
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
#if defined(__QNX__) || defined(PSP)
#include <unistd.h> /* stat() is defined here */
#endif
......@@ -922,20 +909,6 @@ int retro_vfs_stat_impl(const char *path, int32_t *size)
orbisDclose(dir_ret);
is_character_special = S_ISCHR(buf.st_mode);
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
/* CellOS Lv2 */
CellFsStat buf;
if (!path || !*path)
return 0;
if (cellFsStat(path, &buf) < 0)
return 0;
if (size)
*size = (int32_t)buf.st_size;
is_dir = ((buf.st_mode & S_IFMT) == S_IFDIR);
#elif defined(_WIN32)
/* Windows */
DWORD file_info;
......@@ -1108,10 +1081,6 @@ struct libretro_vfs_implementation_dir
#elif defined(VITA) || defined(PSP)
SceUID directory;
SceIoDirent entry;
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
CellFsErrno error;
int directory;
CellFsDirent entry;
#elif defined(ORBIS)
int directory;
struct dirent entry;
......@@ -1127,8 +1096,6 @@ static bool dirent_check_error(libretro_vfs_implementation_dir *rdir)
return (rdir->directory == INVALID_HANDLE_VALUE);
#elif defined(VITA) || defined(PSP) || defined(ORBIS)
return (rdir->directory < 0);
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
return (rdir->error != CELL_FS_SUCCEEDED);
#else
return !(rdir->directory);
#endif
......@@ -1192,8 +1159,6 @@ libretro_vfs_implementation_dir *retro_vfs_opendir_impl(
#elif defined(_3DS)
rdir->directory = !string_is_empty(name) ? opendir(name) : NULL;
rdir->entry = NULL;
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
rdir->error = cellFsOpendir(name, &rdir->directory);
#elif defined(ORBIS)
rdir->directory = orbisDopen(name);
#else
......@@ -1229,10 +1194,6 @@ bool retro_vfs_readdir_impl(libretro_vfs_implementation_dir *rdir)
return (rdir->directory != INVALID_HANDLE_VALUE);
#elif defined(VITA) || defined(PSP)
return (sceIoDread(rdir->directory, &rdir->entry) > 0);
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
uint64_t nread;
rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread);
return (nread != 0);
#elif defined(ORBIS)
return (orbisDread(rdir->directory, &rdir->entry) > 0);
#else
......@@ -1253,7 +1214,7 @@ const char *retro_vfs_dirent_get_name_impl(libretro_vfs_implementation_dir *rdir
if (name)
free(name);
return (char*)rdir->entry.cFileName;
#elif defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__) && !defined(__PSL1GHT__) || defined(ORBIS)
#elif defined(VITA) || defined(PSP) || defined(ORBIS)
return rdir->entry.d_name;
#else
if (!rdir || !rdir->entry)
......@@ -1274,9 +1235,6 @@ bool retro_vfs_dirent_is_dir_impl(libretro_vfs_implementation_dir *rdir)
#elif defined(VITA)
return SCE_S_ISDIR(entry->d_stat.st_mode);
#endif
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
CellFsDirent *entry = (CellFsDirent*)&rdir->entry;
return (entry->d_type == CELL_FS_TYPE_DIRECTORY);
#elif defined(ORBIS)
const struct dirent *entry = &rdir->entry;
if (entry->d_type == DT_DIR)
......@@ -1313,8 +1271,6 @@ int retro_vfs_closedir_impl(libretro_vfs_implementation_dir *rdir)
FindClose(rdir->directory);
#elif defined(VITA) || defined(PSP)
sceIoDclose(rdir->directory);
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
rdir->error = cellFsClosedir(rdir->directory);
#elif defined(ORBIS)
orbisDclose(rdir->directory);
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment