From 565cdc04b529a738c370dd0024c1f3d6d760ca0c Mon Sep 17 00:00:00 2001 From: Crow-bar Date: Fri, 26 Jan 2024 20:51:56 +0300 Subject: [PATCH] allegrex-psp: Disable use of GP-relative addressing --- config/mt-allegrex-psp | 3 +++ configure | 3 +++ configure.ac | 3 +++ newlib/configure.host | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 config/mt-allegrex-psp diff --git a/config/mt-allegrex-psp b/config/mt-allegrex-psp new file mode 100644 index 000000000..34d52a18b --- /dev/null +++ b/config/mt-allegrex-psp @@ -0,0 +1,3 @@ +# Disable use of GP-relative addressing +CFLAGS_FOR_TARGET += -mno-gpopt +CXXFLAGS_FOR_TARGET += -mno-gpopt diff --git a/configure b/configure index fea819e0c..523277720 100755 --- a/configure +++ b/configure @@ -7026,6 +7026,9 @@ case "${target}" in extra_arflags_for_target=" -X32_64" extra_nmflags_for_target=" -B -X32_64" ;; + mipsallegrex*-psp-elf*) + target_makefile_frag="config/mt-allegrex-psp" + ;; esac alphaieee_frag=/dev/null diff --git a/configure.ac b/configure.ac index f1bb72100..3e4e920b8 100644 --- a/configure.ac +++ b/configure.ac @@ -2565,6 +2565,9 @@ case "${target}" in extra_arflags_for_target=" -X32_64" extra_nmflags_for_target=" -B -X32_64" ;; + mipsallegrex*-psp-elf*) + target_makefile_frag="config/mt-allegrex-psp" + ;; esac alphaieee_frag=/dev/null diff --git a/newlib/configure.host b/newlib/configure.host index 80e78606b..830d2d69f 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -247,7 +247,7 @@ case "${host_cpu}" in ;; mipsallegrex*) machine_dir=mips - newlib_cflags="${newlib_cflags} -G0 -DMALLOC_ALIGNMENT=16" + newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=16" ;; mips*) machine_dir=mips