Skip to content

Commit

Permalink
more makefile updates
Browse files Browse the repository at this point in the history
-fwhole-program can't work for .so
SHARED is unused
  • Loading branch information
notaz committed Oct 18, 2023
1 parent 7af838c commit 81a5a20
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 29 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y make git sed zip
sudo apt-get install -y make git bc sed zip
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
sudo apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
- uses: actions/checkout@v4
Expand All @@ -26,17 +26,16 @@ jobs:
env:
MAKEFLAGS: -j$(nproc)
run: |
GITVER=`git rev-parse --short libretro`
.github/build-libretro-zip.sh arm64 CortexA73_G12B GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm32 rpi1 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm32 rpi2 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm32 rpi3 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm64 rpi3_64 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm32 rpi4 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm64 rpi4_64 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm32 classic_armv7_a7 GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm32 classic_armv8_a35 GIT_VERSION=${GITVER}
#.github/build-libretro-zip.sh arm32 miyoo GIT_VERSION=${GITVER}
.github/build-libretro-zip.sh arm64 CortexA73_G12B
.github/build-libretro-zip.sh arm32 rpi1
.github/build-libretro-zip.sh arm32 rpi2
.github/build-libretro-zip.sh arm32 rpi3
.github/build-libretro-zip.sh arm64 rpi3_64
.github/build-libretro-zip.sh arm32 rpi4
.github/build-libretro-zip.sh arm64 rpi4_64
.github/build-libretro-zip.sh arm32 classic_armv7_a7
.github/build-libretro-zip.sh arm32 classic_armv8_a35
.github/build-libretro-zip.sh arm32 miyoo CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
- uses: "marvinpinto/action-automatic-releases@v1.2.1"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -53,3 +52,4 @@ jobs:
pcsx_rearmed_libretro_arm64_rpi4_64.zip
pcsx_rearmed_libretro_arm32_classic_armv7_a7.zip
pcsx_rearmed_libretro_arm32_classic_armv8_a35.zip
pcsx_rearmed_libretro_arm32_miyoo.zip
28 changes: 11 additions & 17 deletions Makefile.libretro
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ endif
else ifneq (,$(findstring CortexA73_G12B,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,-version-script=link.T
ARCH = arm64
BUILTIN_GPU = neon
HAVE_NEON = 1
Expand All @@ -136,7 +135,6 @@ else ifneq (,$(findstring CortexA73_G12B,$(platform)))
else ifneq (,$(findstring h5,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,-version-script=link.T
ARCH = arm64
BUILTIN_GPU = neon
HAVE_NEON = 1
Expand Down Expand Up @@ -449,8 +447,7 @@ else ifeq ($(platform), classic_armv7_a7)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
CFLAGS += -Ofast \
-flto=4 -fwhole-program -fuse-linker-plugin \
-fdata-sections -ffunction-sections -Wl,--gc-sections \
-flto=auto -fuse-linker-plugin \
-fno-stack-protector -fno-ident -fomit-frame-pointer \
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
Expand Down Expand Up @@ -480,7 +477,8 @@ else ifeq ($(platform), classic_armv8_a35)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
CFLAGS += -Ofast \
-fmerge-all-constants -fno-math-errno -march=armv8-a \
-fmerge-all-constants -fno-math-errno \
-fno-stack-protector -fomit-frame-pointer \
-marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
HAVE_NEON = 1
HAVE_NEON_ASM = 1
Expand Down Expand Up @@ -540,7 +538,6 @@ else ifeq ($(platform), miyoo)
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
fpic := -fPIC
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
CFLAGS += -DNO_DYLIB
DYNAREC =
STATIC_LINKING = 1
Expand Down Expand Up @@ -581,7 +578,13 @@ ifndef HAVE_NEON_ASM
HAVE_NEON_ASM = $(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h | grep -q HAVE_NEON32 && echo 1 || echo 0)
endif
ifeq ($(NO_UNDEF_CHECK)$(shell $(LD) -v 2> /dev/null | awk '{print $$1}'),GNU)
MAIN_LDFLAGS += -Wl,--no-undefined
ifeq (,$(findstring $(platform),win32))
MAIN_LDFLAGS += -Wl,-version-script=frontend/link.T
endif
ifneq ($(STATIC_LINKING), 1)
CFLAGS += -ffunction-sections -fdata-sections
endif
MAIN_LDFLAGS += -Wl,--gc-sections -Wl,--no-undefined
endif
ifdef ALLOW_LIGHTREC_ON_ARM
CFLAGS += -DALLOW_LIGHTREC_ON_ARM
Expand All @@ -603,21 +606,12 @@ SOUND_DRIVERS = libretro
PLUGINS =
NO_CONFIG_MAK = yes

# what does this do
#libretro_all: all
#ifeq ($(platform),ios)
#ifeq ($(DYNAREC),1)
# make -f Makefile.libretro DYNAREC=0 platform=$(platform) clean
# make -f Makefile.libretro DYNAREC=0 platform=$(platform)
#endif
#endif

$(info TARGET: $(TARGET))
$(info platform: $(platform))
$(info ARCH: $(ARCH))
$(info DYNAREC: $(DYNAREC))
$(info BUILTIN_GPU: $(BUILTIN_GPU))
$(info CC: $(CC))
$(info CC: $(CC) : $(shell $(CC) --version | head -1))
$(info CFLAGS: $(CFLAGS))
$(info MAIN_LDLIBS: $(MAIN_LDLIBS))
$(info )
Expand Down

0 comments on commit 81a5a20

Please sign in to comment.