Skip to content

Commit

Permalink
Merge pull request gcc-mirror#6 from Crow-bar/allegrex-v13.2.0
Browse files Browse the repository at this point in the history
Disable use of GP-relative addressing
  • Loading branch information
diamant3 authored Jan 31, 2024
2 parents 46ad477 + d3b14f6 commit cbd5840
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions config/mt-allegrex-psp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Disable use of GP-relative addressing
CFLAGS_FOR_TARGET += -mno-gpopt
CXXFLAGS_FOR_TARGET += -mno-gpopt
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -9578,6 +9578,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
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2739,6 +2739,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
Expand Down
4 changes: 2 additions & 2 deletions gcc/config.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -2719,9 +2719,9 @@ mipstx39-*-elf* | mipstx39el-*-elf*)
;;
mipsallegrex-*-elf* | mipsallegrexel-*-elf*)
tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
tmake_file="mips/t-elf"
tmake_file="${tmake_file} mips/t-elf"
target_cpu_default="MASK_SINGLE_FLOAT|MASK_DIVIDE_BREAKS"
tm_defines="MIPS_ISA_DEFAULT=2 MIPS_CPU_STRING_DEFAULT=\\\"allegrex\\\" MIPS_ABI_DEFAULT=ABI_EABI"
tm_defines="${tm_defines} MIPS_ISA_DEFAULT=2 MIPS_CPU_STRING_DEFAULT=\\\"allegrex\\\" MIPS_ABI_DEFAULT=ABI_EABI"
case ${target} in
mipsallegrex*-psp-elf*)
tm_file="${tm_file} mips/psp.h"
Expand Down
6 changes: 2 additions & 4 deletions libgcc/config.host
Original file line number Diff line number Diff line change
Expand Up @@ -1087,10 +1087,8 @@ mips-wrs-vxworks)
mipstx39-*-elf* | mipstx39el-*-elf*)
tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
;;
mips*-psp*)
tmake_file="${tmake_file} mips/t-elf mips/t-crtstuff"
target_cpu_default="MASK_SINGLE_FLOAT|MASK_DIVIDE_BREAKS"
tm_file="${tm_file}"
mipsallegrex*-psp*)
tmake_file="$tmake_file mips/t-allegrex-psp"
extra_parts="$extra_parts crti.o crtn.o"
;;
mmix-knuth-mmixware)
Expand Down
2 changes: 2 additions & 0 deletions libgcc/config/mips/t-allegrex-psp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Disable use of GP-relative addressing in startup code.
CRTSTUFF_T_CFLAGS += -mno-gpopt

0 comments on commit cbd5840

Please sign in to comment.