Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ jobs:
name: vitasdk-linux-arm64
path: build/*.tar.bz2
build-macos:
runs-on: macos-12
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Build
run: |
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
brew install autoconf automake libtool
mkdir build
cd build
cmake ..
make -j$(nproc) tarball
brew install autoconf automake libtool texinfo pkg-config
cmake -S . -B build -G "Unix Makefiles"
cmake --build build --target tarball
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v4
Expand Down
201 changes: 124 additions & 77 deletions CMakeLists.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c
index 7468a20bd..3496590c4 100644
--- a/gcc/config/arm/arm-c.c
+++ b/gcc/config/arm/arm-c.c
@@ -372,6 +372,8 @@ arm_cpu_cpp_builtins (struct cpp_reader * pfile)
diff --git a/gcc/config/arm/arm-c.cc b/gcc/config/arm/arm-c.cc
index 59c0d8c..6468c67 100644
--- a/gcc/config/arm/arm-c.cc
+++ b/gcc/config/arm/arm-c.cc
@@ -415,6 +415,7 @@ arm_cpu_cpp_builtins (struct cpp_reader * pfile)
builtin_assert ("cpu=arm");
builtin_assert ("machine=arm");

+ builtin_define ("__vita__");
+
arm_cpu_builtins (pfile);
}

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 30e1d6dc9..bd5f7b19c 100644
index 7d40b8b..a9b9f55 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -731,6 +731,10 @@ extern const int arm_arch_cde_coproc_bits[];
@@ -744,6 +744,10 @@ extern const int arm_arch_cde_coproc_bits[];
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#endif

Expand All @@ -26,7 +25,7 @@ index 30e1d6dc9..bd5f7b19c 100644
/* Sized for fixed-point types. */

#define SHORT_FRACT_TYPE_SIZE 8
@@ -1996,7 +2000,7 @@ enum arm_auto_incmodes
@@ -2116,7 +2120,7 @@ enum arm_auto_incmodes
/* signed 'char' is most compatible, but RISC OS wants it unsigned.
unsigned is probably best, but may break some code. */
#ifndef DEFAULT_SIGNED_CHAR
Expand All @@ -36,24 +35,24 @@ index 30e1d6dc9..bd5f7b19c 100644

/* Max number of bytes we can move from memory to memory
diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
index cd3d8e1be..523b92aa1 100644
index 3a49b51..840b2b3 100644
--- a/gcc/config/arm/arm.opt
+++ b/gcc/config/arm/arm.opt
@@ -30,6 +30,9 @@ const char *x_arm_cpu_string
TargetSave
const char *x_arm_tune_string
@@ -33,6 +33,9 @@ unsigned aarch_enable_bti = 0
TargetVariable
enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A

+pthread
+Driver
+
Enum
Name(tls_type) Type(enum arm_tls_type)
TLS dialect to use:
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9f790db0d..27a38bb02 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -673,8 +673,9 @@ proper position among the other output files. */
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 16bb07f..8c440dc 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -732,8 +732,9 @@ proper position among the other output files. */
#endif

/* config.h can define LIB_SPEC to override the default libraries. */
Expand All @@ -64,10 +63,10 @@ index 9f790db0d..27a38bb02 100644
#endif

/* When using -fsplit-stack we need to wrap pthread_create, in order
diff --git a/gcc/genconditions.c b/gcc/genconditions.c
index 3a5b85d11..3ca61913f 100644
--- a/gcc/genconditions.c
+++ b/gcc/genconditions.c
diff --git a/gcc/genconditions.cc b/gcc/genconditions.cc
index 28655fa..27cb71b 100644
--- a/gcc/genconditions.cc
+++ b/gcc/genconditions.cc
@@ -58,7 +58,7 @@ write_header (void)
/* It is necessary, but not entirely safe, to include the headers below\n\
in a generator program. As a defensive measure, don't do so when the\n\
Expand All @@ -92,14 +91,14 @@ index 3a5b85d11..3ca61913f 100644
" puts (\"(define_conditions [\");\n"
- "#if GCC_VERSION >= 3001\n"
+ "#if GCC_VERSION >= 3001 && __clang_major__ < 9\n"
" for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
" for (i = 0; i < ARRAY_SIZE (insn_conditions) - 1; i++)\n"
" {\n"
" printf (\" (%d \\\"\", insn_conditions[i].value);\n"
diff --git a/libgomp/configure b/libgomp/configure
index 5240f7e9d..de5dc96e4 100755
index fd0e337..2366415 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -15768,29 +15768,6 @@ $as_echo "#define HAVE_UNAME 1" >>confdefs.h
@@ -15552,28 +15552,6 @@ $as_echo "#define HAVE_UNAME 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

Expand All @@ -125,7 +124,19 @@ index 5240f7e9d..de5dc96e4 100755
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
# Check for getpid.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/libgomp/libgomp_f.h.in b/libgomp/libgomp_f.h.in
index d8e61c8..9d120f6 100644
--- a/libgomp/libgomp_f.h.in
+++ b/libgomp/libgomp_f.h.in
@@ -81,7 +81,7 @@ omp_check_defines (void)
|| @OMP_LOCK_KIND@ != sizeof (*(omp_lock_arg_t) 0)
|| @OMP_NEST_LOCK_KIND@ != sizeof (*(omp_nest_lock_arg_t) 0)
|| @INTPTR_T_KIND@ != sizeof (omp_allocator_handle_t)
- || 4 != sizeof (omp_alloctrait_key_t)
+ || 1 != sizeof (omp_alloctrait_key_t)
|| @INTPTR_T_KIND@ != sizeof (omp_alloctrait_value_t)
|| @INTPTR_T_KIND@ != sizeof (omp_memspace_handle_t)
|| @OMP_DEPEND_KIND@ != sizeof (omp_depend_t))
164 changes: 119 additions & 45 deletions patches/gdb.patch
Original file line number Diff line number Diff line change
@@ -1,37 +1,22 @@
From c8e88878beab01fadb2e59e0c23a37257c9bba82 Mon Sep 17 00:00:00 2001
From: Sunguk Lee <[email protected]>
Date: Sat, 6 Jun 2020 23:06:47 +0900
Subject: [PATCH] Apply vita patch

---
gdb/Makefile.in | 1 +
gdb/arm-vita-tdep.c | 54 +++++++++++++++++++++++++++++++++++++++++++++
gdb/configure.tgt | 4 ++++
gdb/defs.h | 1 +
gdb/osabi.c | 1 +
5 files changed, 61 insertions(+)
create mode 100644 gdb/arm-vita-tdep.c

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c3e074b21f..5ab1e1e999 100644
index fa7c81a0fab..258cc35ac88 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -701,6 +701,7 @@ ALL_TARGET_OBS = \
@@ -771,6 +771,7 @@ ALL_TARGET_OBS = \
arm-obsd-tdep.o \
arm-pikeos-tdep.o \
arm-symbian-tdep.o \
arm-tdep.o \
+ arm-vita-tdep.o \
arm-wince-tdep.o \
avr-tdep.o \
bfin-linux-tdep.o \
diff --git a/gdb/arm-vita-tdep.c b/gdb/arm-vita-tdep.c
new file mode 100644
index 0000000000..6dbc071fe1
index 00000000000..5fdcea08b5d
--- /dev/null
+++ b/gdb/arm-vita-tdep.c
@@ -0,0 +1,54 @@
+
+/*
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2019 David "Davee" Morgan
+
+ This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -85,44 +70,133 @@ index 0000000000..6dbc071fe1
+ arm_vita_init_abi);
+}
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index caa42be1c0..b4607a7604 100644
index e84e222ba0d..61202f9e3ae 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -185,6 +185,10 @@ arm*-*-symbianelf*)
# Target: SymbianOS/arm
gdb_target_obs="arm-symbian-tdep.o"
@@ -198,6 +198,10 @@ arm*-*-openbsd*)
# Target: OpenBSD/arm
gdb_target_obs="arm-bsd-tdep.o arm-obsd-tdep.o"
;;
+arm*-vita-eabi)
+ # Target: PS Vita
+ gdb_target_obs="arm-vita-tdep.o"
+ ;;
+ # Target: PS Vita
+ gdb_target_obs="arm-vita-tdep.o"
+ ;;
arm*-*-*)
# Target: ARM embedded system
gdb_target_obs="arm-pikeos-tdep.o"
diff --git a/gdb/defs.h b/gdb/defs.h
index 567f214b81..d795cae8bd 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -496,6 +496,7 @@ enum gdb_osabi
GDB_OSABI_NEWLIB,
GDB_OSABI_SDE,
GDB_OSABI_PIKEOS,
+ GDB_OSABI_VITA,

GDB_OSABI_INVALID /* keep this last */
};
diff --git a/gdb/osabi.c b/gdb/osabi.c
index dec1bddc4c..c07a99dd9b 100644
index d18802ac3a4..8bc8f8bbbb4 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -81,6 +81,7 @@ static const struct osabi_names gdb_osabi_names[] =
@@ -82,6 +82,7 @@ static const struct osabi_names gdb_osabi_names[] =
{ "Newlib", NULL },
{ "SDE", NULL },
{ "PikeOS", NULL },
+ { "PSVita", NULL },

{ "<invalid>", NULL }
};
--
2.27.0

diff --git a/gdb/osabi.h b/gdb/osabi.h
index 35f14ec433c..14504ce650f 100644
--- a/gdb/osabi.h
+++ b/gdb/osabi.h
@@ -46,6 +46,7 @@ enum gdb_osabi
GDB_OSABI_NEWLIB,
GDB_OSABI_SDE,
GDB_OSABI_PIKEOS,
+ GDB_OSABI_VITA,

GDB_OSABI_INVALID /* keep this last */
};
diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c
index ea0f78c9ad8..4aa270b41ac 100644
--- a/gdb/python/py-gdb-readline.c
+++ b/gdb/python/py-gdb-readline.c
@@ -52,13 +52,11 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout,
if (except.reason == RETURN_QUIT)
return NULL;

- /* The thread state is nulled during gdbpy_readline_wrapper,
- with the original value saved in the following undocumented
- variable (see Python's Parser/myreadline.c and
- Modules/readline.c). */
- PyEval_RestoreThread (_PyOS_ReadlineTState);
+
+ /* This readline callback is called without the GIL held. */
+ gdbpy_gil gil;
+
gdbpy_convert_exception (except);
- PyEval_SaveThread ();
return NULL;
}

diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index c41a43bac96..96c0008ae25 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -706,6 +706,30 @@ class gdbpy_allow_threads
PyThreadState *m_save;
};

+/* A helper class to save and restore the GIL, but without touching
+ the other globals that are handled by gdbpy_enter. */
+
+class gdbpy_gil
+{
+public:
+
+ gdbpy_gil ()
+ : m_state (PyGILState_Ensure ())
+ {
+ }
+
+ ~gdbpy_gil ()
+ {
+ PyGILState_Release (m_state);
+ }
+
+ DISABLE_COPY_AND_ASSIGN (gdbpy_gil);
+
+private:
+
+ PyGILState_STATE m_state;
+};
+
/* Use this after a TRY_EXCEPT to throw the appropriate Python
exception. */
#define GDB_PY_HANDLE_EXCEPTION(Exception) \
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 9d558119e09..4e0692abed8 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -255,30 +255,6 @@ gdbpy_enter::finalize ()
python_gdbarch = target_gdbarch ();
}

-/* A helper class to save and restore the GIL, but without touching
- the other globals that are handled by gdbpy_enter. */
-
-class gdbpy_gil
-{
-public:
-
- gdbpy_gil ()
- : m_state (PyGILState_Ensure ())
- {
- }
-
- ~gdbpy_gil ()
- {
- PyGILState_Release (m_state);
- }
-
- DISABLE_COPY_AND_ASSIGN (gdbpy_gil);
-
-private:
-
- PyGILState_STATE m_state;
-};
-
/* Set the quit flag. */

static void
File renamed without changes.
Loading
Loading