-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update -psx builds to match PSYQ compiler default flags (#29)
* Update -psx builds to match PSYQ compiler default flags * Fixup flag tests for 2.8.x
- Loading branch information
Showing
12 changed files
with
224 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- config/mips/mips.h 1997-12-29 00:34:57.000000000 +0000 | ||
+++ config/mips/mips-patched.h 2023-11-14 22:29:18.785172634 +0000 | ||
@@ -1153,6 +1156,22 @@ | ||
#define ASM_OUTPUT_DESTRUCTOR(file, name) | ||
|
||
#endif /* 0 */ | ||
+ | ||
+/* A C statement to output something to the assembler file to switch to section | ||
+ NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or | ||
+ NULL_TREE. Some target formats do not support arbitrary sections. Do not | ||
+ define this macro in such cases. */ | ||
+ | ||
+#define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \ | ||
+do { \ | ||
+ extern FILE *asm_out_text_file; \ | ||
+ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ | ||
+ fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \ | ||
+ else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \ | ||
+ fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \ | ||
+ else \ | ||
+ fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \ | ||
+} while (0) | ||
|
||
/* Target machine storage layout */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
diff --color -ruN -p1 gcc-2.6.3/gcc/config/mips/psx.h gcc-2.6.3-psx/gcc/config/mips/psx.h | ||
--- gcc-2.6.3/gcc/config/mips/psx.h 1970-01-01 01:00:00.000000000 +0100 | ||
+++ gcc-2.6.3-psx/gcc/config/mips/psx.h 2023-03-26 13:52:13.400875920 +0100 | ||
@@ -0,0 +1,108 @@ | ||
+/* Definitions of target machine for GNU compiler. Iris version. | ||
+ Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc. | ||
+ | ||
+This file is part of GNU CC. | ||
+ | ||
+GNU CC is free software; you can redistribute it and/or modify | ||
+it under the terms of the GNU General Public License as published by | ||
+the Free Software Foundation; either version 2, or (at your option) | ||
+any later version. | ||
+ | ||
+GNU CC is distributed in the hope that it will be useful, | ||
+but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
+GNU General Public License for more details. | ||
+ | ||
+You should have received a copy of the GNU General Public License | ||
+along with GNU CC; see the file COPYING. If not, write to | ||
+the Free Software Foundation, 59 Temple Place - Suite 330, | ||
+Boston, MA 02111-1307, USA. */ | ||
+ | ||
+ | ||
+/* Definitions by GIL for PSX */ | ||
+ | ||
+#define TARGET_DEFAULT (MASK_GAS+MASK_SOFT_FLOAT+MASK_GPOPT+MASK_SPLIT_ADDR) | ||
+ | ||
+#define CPP_PREDEFINES "-Dmips -DMIPSEL" | ||
+ | ||
+#define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" | ||
+ | ||
+#define CPP_SPEC "\ | ||
+%{!ansi:-D__EXTENSIONS__} -D_MIPSEL \ | ||
+%{.S: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ | ||
+%{.s: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ | ||
+%{.cc: -D_LANGUAGE_C_PLUS_PLUS} \ | ||
+%{.cxx: -D_LANGUAGE_C_PLUS_PLUS} \ | ||
+%{.C: -D_LANGUAGE_C_PLUS_PLUS} \ | ||
+%{.m: -D_LANGUAGE_OBJECTIVE_C} \ | ||
+%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}} \ | ||
+%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ | ||
+%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ | ||
+%{mips3:-U__mips -D__mips=3}" | ||
+ | ||
+#define LIB_SPEC \ | ||
+ "%{!p:%{!pg:%{!static:%{!g*:-lc_s}} -lc}}%{p:-lc_p}%{pg:-lc_p} crtn.o%s" | ||
+ | ||
+#define MACHINE_TYPE "Sony Playstation" | ||
+ | ||
+#define TARGET_ENDIAN_DEFAULT 0 | ||
+ | ||
+/* A C statement to output something to the assembler file to switch to section | ||
+ NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or | ||
+ NULL_TREE. Some target formats do not support arbitrary sections. Do not | ||
+ define this macro in such cases. */ | ||
+ | ||
+#define ASM_OUTPUT_SECTION_NAME(FILE, NAME) \ | ||
+ fprintf (FILE, "\t.section %s,\"aw\",@progbits\n", (NAME)) | ||
+ | ||
+/* GIL: R3000 machine supports ISA 1 */ | ||
+#define MIPS_ISA_DEFAULT 1 | ||
+/* GIL: set to r3000 */ | ||
+#define MIPS_CPU_STRING_DEFAULT "R3000" | ||
+ | ||
+/* End of GIL for PSX */ | ||
+ | ||
+ | ||
+#define SGI_TARGET 1 /* inform other mips files this is SGI */ | ||
+ | ||
+/* Always use 1 for .file number. I [meissner@osf.org] wonder why | ||
+ IRIS needs this. */ | ||
+ | ||
+#define SET_FILE_NUMBER() ++num_source_filenames | ||
+ | ||
+/* Put out a label after a .loc. I [meissner@osf.org] wonder why | ||
+ IRIS needs this. */ | ||
+ | ||
+#define LABEL_AFTER_LOC(STREAM) fprintf (STREAM, "LM%d:\n", ++sym_lineno) | ||
+ | ||
+#define STACK_ARGS_ADJUST(SIZE) \ | ||
+{ \ | ||
+ SIZE.constant += 4; \ | ||
+ if (SIZE.constant < 32) \ | ||
+ SIZE.constant = 32; \ | ||
+} | ||
+ | ||
+/* Do not allow `$' in identifiers. */ | ||
+ | ||
+#define DOLLARS_IN_IDENTIFIERS 0 | ||
+ | ||
+/* Tell G++ not to create constructors or destructors with $'s in them. */ | ||
+ | ||
+#define NO_DOLLAR_IN_LABEL 1 | ||
+ | ||
+/* Specify wchar_t type. */ | ||
+#define WCHAR_TYPE "unsigned char" | ||
+#define WCHAR_TYPE_SIZE BITS_PER_UNIT | ||
+ | ||
+/* Generate calls to memcpy, etc., not bcopy, etc. */ | ||
+#define TARGET_MEM_FUNCTIONS | ||
+ | ||
+/* Xeeynamo: force to use little-endian */ | ||
+#define MIPSEL | ||
+#define BYTES_BIG_ENDIAN 0 | ||
+#define WORDS_BIG_ENDIAN 0 | ||
+ | ||
+/* Plain char is unsigned in the SGI compiler. */ | ||
+#define DEFAULT_SIGNED_CHAR 0 | ||
+ | ||
+#include "mips/mips.h" | ||
diff --color -ruN -p1 gcc-2.6.3/gcc/config/mips/xm-psx.h gcc-2.6.3-psx/gcc/config/mips/xm-psx.h | ||
--- gcc-2.6.3/gcc/config/mips/xm-psx.h 1970-01-01 01:00:00.000000000 +0100 | ||
+++ gcc-2.6.3-psx/gcc/config/mips/xm-psx.h 2023-03-26 13:52:13.402875923 +0100 | ||
@@ -0,0 +1,12 @@ | ||
+#define USG | ||
+ | ||
+#include "mips/xm-mips.h" | ||
+ | ||
+#define USG | ||
+#define HAVE_VPRINTF | ||
+ | ||
+/* | ||
+#define bcopy(a,b,c) memcpy (b,a,c) | ||
+#define bzero(a,b) memset (a,0,b) | ||
+#define bcmp(a,b,c) memcmp (a,b,c) | ||
+*/ | ||
\ No newline at end of file | ||
diff --color -ruN -p1 gcc-2.6.3/config.sub gcc-2.6.3-psx/config.sub | ||
--- gcc-2.6.3/config.sub 1994-10-26 18:23:05.000000000 +0000 | ||
+++ gcc-2.6.3-psx/config.sub 2023-03-26 13:53:36.046989327 +0100 | ||
@@ -420,2 +420,6 @@ case $basic_machine in | ||
;; | ||
+ psx) | ||
+ basic_machine=mips-sony | ||
+ os=-psx | ||
+ ;; | ||
rtpc | rtpc-*) | ||
@@ -636,2 +640,5 @@ case $os in | ||
;; | ||
+ -psx) | ||
+ os=-psx | ||
+ ;; | ||
-none) | ||
diff --color -ruN -p1 gcc-2.6.3/gcc/configure gcc-2.6.3-psx/gcc/configure | ||
--- gcc-2.6.3/gcc/configure 1994-11-23 22:26:27.000000000 +0000 | ||
+++ gcc-2.6.3-psx/gcc/configure 2023-03-26 13:54:03.941012094 +0100 | ||
@@ -1471,2 +1471,20 @@ for machine in $canon_build $canon_host | ||
;; | ||
+ mips-sony-psx*) # Sony Playstation | ||
+ tm_file=mips/psx.h | ||
+ xm_file=mips/xm-psx.h | ||
+ elf=yes | ||
+ gnu_ld=yes | ||
+ gas=yes | ||
+ DEFS=-Dpsx -D__psx__ -D__psx | ||
+ if [ x$gas = xyes ] | ||
+ then | ||
+ tmake_file=mips/t-mips-gas | ||
+ else | ||
+ extra_passes="mips-tfile mips-tdump" | ||
+ fi | ||
+ if [ x$gnu_ld != xyes ] | ||
+ then | ||
+ use_collect2=yes | ||
+ fi | ||
+ ;; | ||
mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters