Skip to content

Commit 7561390

Browse files
committed
Import patches from ScummVM
1 parent f8e8abc commit 7561390

15 files changed

Lines changed: 4929 additions & 2465 deletions

‎.github/workflows/build.yml‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
repository_dispatch:
7+
types: [run_build]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
#os: [macos-latest, ubuntu-latest]
15+
os: [ubuntu-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Install Ubuntu requirements
21+
if: matrix.os == 'ubuntu-latest'
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python3 python-is-python3 subversion wget zlib1g-dev libtool-bin python3-dev bzip2 libgmp3-dev pkg-config
25+
26+
- name: Install macOS requirements
27+
if: matrix.os == 'macos-latest'
28+
run: |
29+
brew update
30+
brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo
31+
32+
- name: Runs all the stages in the shell
33+
run: |
34+
mkdir $PWD/ps3dev
35+
export PS3DEV=$PWD/ps3dev
36+
export PSL1GHT=$PS3DEV
37+
export PATH=$PATH:$PS3DEV/bin
38+
export PATH=$PATH:$PS3DEV/ppu/bin
39+
export PATH=$PATH:$PS3DEV/spu/bin
40+
./toolchain.sh
41+
42+
- name: Get short SHA
43+
id: slug
44+
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
45+
46+
- name: Compress ps3dev folder
47+
run: |
48+
tar -zcvf ps3dev.tar.gz ps3dev
49+
50+
- uses: actions/upload-artifact@v6
51+
with:
52+
name: ps3dev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
53+
path: ps3dev.tar.gz

‎.github/workflows/deploy.yaml‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
name: Build toolchain docker image
22

33
on:
4-
push:
5-
branches:
6-
- '*'
7-
pull_request:
8-
branches:
9-
- '*'
4+
workflow_dispatch:
105

116
jobs:
127
Docker:
Lines changed: 74 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
diff --git a/Makefile.in b/Makefile.in
2-
index b824e0a0c..5bf0da25e 100644
3-
--- a/Makefile.in
4-
+++ b/Makefile.in
1+
diff -urpN old/Makefile.in new/Makefile.in
2+
--- old/Makefile.in 2017-04-19 20:49:29.000000000 +0200
3+
+++ new/Makefile.in 2022-02-13 13:54:53.000000000 +0100
54
@@ -25734,7 +25734,6 @@ check-libiberty:
65
.PHONY: install-libiberty maybe-install-libiberty
76
maybe-install-libiberty:
@@ -10,31 +9,9 @@ index b824e0a0c..5bf0da25e 100644
109

1110
install-libiberty: installdirs
1211
@: $(MAKE); $(unstage)
13-
diff --git a/gcc/config.gcc b/gcc/config.gcc
14-
index a9196cd26..f2a94403d 100644
15-
--- a/gcc/config.gcc
16-
+++ b/gcc/config.gcc
17-
@@ -2330,6 +2330,15 @@ pdp11-*-*)
18-
# tmake_file="${tmake_file} rs6000/t-fprules"
19-
# extra_headers=
20-
# ;;
21-
+powerpc64-ps3-elf)
22-
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/default64.h"
23-
+ tm_file="rs6000/biarch64.h ${tm_file} rs6000/cell64lv2.h"
24-
+ if test x${enable_secureplt} = xyes; then
25-
+ tm_file="rs6000/secureplt.h ${tm_file}"
26-
+ fi
27-
+ extra_options="${extra_options} rs6000/sysv4.opt"
28-
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
29-
+ ;;
30-
powerpc-*-darwin*)
31-
extra_options="${extra_options} rs6000/darwin.opt"
32-
case ${target} in
33-
diff --git a/gcc/config/rs6000/cell64lv2.h b/gcc/config/rs6000/cell64lv2.h
34-
new file mode 100644
35-
index 000000000..86da868b5
36-
--- /dev/null
37-
+++ b/gcc/config/rs6000/cell64lv2.h
12+
diff -urpN old/gcc/config/rs6000/cell64lv2.h new/gcc/config/rs6000/cell64lv2.h
13+
--- old/gcc/config/rs6000/cell64lv2.h 1970-01-01 01:00:00.000000000 +0100
14+
+++ new/gcc/config/rs6000/cell64lv2.h 2022-02-13 13:54:53.000000000 +0100
3815
@@ -0,0 +1,587 @@
3916
+/* Definitions of target machine for GNU compiler,
4017
+ for 64 bit PowerPC linux.
@@ -623,11 +600,10 @@ index 000000000..86da868b5
623600
+ enabling the __float128 keyword. */
624601
+#undef TARGET_FLOAT128_ENABLE_TYPE
625602
+#define TARGET_FLOAT128_ENABLE_TYPE 1
626-
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
627-
index db9136f26..3a29d4723 100644
628-
--- a/gcc/config/rs6000/rs6000.c
629-
+++ b/gcc/config/rs6000/rs6000.c
630-
@@ -1349,6 +1349,12 @@ rtl_opt_pass *make_pass_analyze_swaps (gcc::context*);
603+
diff -urpN old/gcc/config/rs6000/rs6000.c new/gcc/config/rs6000/rs6000.c
604+
--- old/gcc/config/rs6000/rs6000.c 2019-11-01 21:30:26.000000000 +0100
605+
+++ new/gcc/config/rs6000/rs6000.c 2022-02-13 13:54:53.000000000 +0100
606+
@@ -1436,6 +1436,12 @@ rtl_opt_pass *make_pass_analyze_swaps (g
631607
static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused));
632608
static tree rs6000_fold_builtin (tree, int, tree *, bool);
633609

@@ -640,7 +616,7 @@ index db9136f26..3a29d4723 100644
640616
/* Hash table stuff for keeping track of TOC entries. */
641617

642618
struct GTY((for_user)) toc_hash_struct
643-
@@ -43333,7 +43339,19 @@ rs6000_optab_supported_p (int op, machine_mode mode1, machine_mode,
619+
@@ -43654,7 +43660,19 @@ rs6000_optab_supported_p (int op, machin
644620
return true;
645621
}
646622
}
@@ -661,11 +637,29 @@ index db9136f26..3a29d4723 100644
661637
struct gcc_target targetm = TARGET_INITIALIZER;
662638

663639
#include "gt-rs6000.h"
664-
diff --git a/gcc/configure b/gcc/configure
665-
index 50ccc2a0f..6b503988a 100755
666-
--- a/gcc/configure
667-
+++ b/gcc/configure
668-
@@ -28598,12 +28598,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" >>confdefs.h
640+
diff -urpN old/gcc/config.gcc new/gcc/config.gcc
641+
--- old/gcc/config.gcc 2019-11-01 21:20:47.000000000 +0100
642+
+++ new/gcc/config.gcc 2022-02-13 13:54:53.000000000 +0100
643+
@@ -2354,6 +2354,15 @@ pdp11-*-*)
644+
# tmake_file="${tmake_file} rs6000/t-fprules"
645+
# extra_headers=
646+
# ;;
647+
+powerpc64-ps3-elf)
648+
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/default64.h"
649+
+ tm_file="rs6000/biarch64.h ${tm_file} rs6000/cell64lv2.h"
650+
+ if test x${enable_secureplt} = xyes; then
651+
+ tm_file="rs6000/secureplt.h ${tm_file}"
652+
+ fi
653+
+ extra_options="${extra_options} rs6000/sysv4.opt"
654+
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
655+
+ ;;
656+
powerpc-*-darwin*)
657+
extra_options="${extra_options} ${cpu_type}/darwin.opt"
658+
case ${target} in
659+
diff -urpN old/gcc/configure new/gcc/configure
660+
--- old/gcc/configure 2018-06-22 23:16:41.000000000 +0200
661+
+++ new/gcc/configure 2022-02-13 13:54:54.000000000 +0100
662+
@@ -28640,12 +28640,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_L
669663
esac
670664

671665
case "$target:$tm_file" in
@@ -680,11 +674,10 @@ index 50ccc2a0f..6b503988a 100755
680674
emul_name="-melf64ppc"
681675
;;
682676
*-*-freebsd*)
683-
diff --git a/gcc/configure.ac b/gcc/configure.ac
684-
index 1d5a9d7c6..e568cb3f8 100644
685-
--- a/gcc/configure.ac
686-
+++ b/gcc/configure.ac
687-
@@ -5462,12 +5462,12 @@ EOF
677+
diff -urpN old/gcc/configure.ac new/gcc/configure.ac
678+
--- old/gcc/configure.ac 2018-06-22 23:16:41.000000000 +0200
679+
+++ new/gcc/configure.ac 2022-02-13 13:54:54.000000000 +0100
680+
@@ -5475,12 +5475,12 @@ EOF
688681
esac
689682

690683
case "$target:$tm_file" in
@@ -699,24 +692,10 @@ index 1d5a9d7c6..e568cb3f8 100644
699692
emul_name="-melf64ppc"
700693
;;
701694
*-*-freebsd*)
702-
diff --git a/libcpp/lex.c b/libcpp/lex.c
703-
index 9edd2a6af..15585ff93 100644
704-
--- a/libcpp/lex.c
705-
+++ b/libcpp/lex.c
706-
@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
707-
{
708-
vc m_nl, m_cr, m_bs, m_qm;
709-
710-
- data = *((const vc *)s);
711-
+ data = __builtin_vec_vsx_ld (0, s);
712-
s += 16;
713-
714-
m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
715-
diff --git a/libgcc/config.host b/libgcc/config.host
716-
index bedcf1017..8d6c8feff 100644
717-
--- a/libgcc/config.host
718-
+++ b/libgcc/config.host
719-
@@ -1043,6 +1043,8 @@ powerpc-*-rtems*)
695+
diff -urpN old/libgcc/config.host new/libgcc/config.host
696+
--- old/libgcc/config.host 2019-11-01 21:44:32.000000000 +0100
697+
+++ new/libgcc/config.host 2022-02-13 13:54:54.000000000 +0100
698+
@@ -1044,6 +1044,8 @@ powerpc-*-rtems*)
720699
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
721700
extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
722701
;;
@@ -725,3 +704,35 @@ index bedcf1017..8d6c8feff 100644
725704
powerpc*-*-linux*)
726705
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc"
727706
tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000"
707+
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
708+
index 976f9afae5..736b83ff0b 100644
709+
--- a/gcc/config/aarch64/aarch64.h
710+
+++ b/gcc/config/aarch64/aarch64.h
711+
@@ -1000,7 +1000,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv);
712+
#define MCPU_TO_MARCH_SPEC_FUNCTIONS \
713+
{ "rewrite_mcpu", aarch64_rewrite_mcpu },
714+
715+
-#if defined(__aarch64__)
716+
+#if defined(__aarch64__) && ! defined(__APPLE__)
717+
extern const char *host_detect_local_cpu (int argc, const char **argv);
718+
#define HAVE_LOCAL_CPU_DETECT
719+
# define EXTRA_SPEC_FUNCTIONS \
720+
diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
721+
index 8f700eec85..b737abc006 100644
722+
--- a/gcc/config/host-darwin.c
723+
+++ b/gcc/config/host-darwin.c
724+
@@ -22,6 +22,8 @@
725+
#include "coretypes.h"
726+
#include "diagnostic-core.h"
727+
#include "config/host-darwin.h"
728+
+#include "hosthooks.h"
729+
+#include "hosthooks-def.h"
730+
731+
/* Yes, this is really supposed to work. */
732+
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
733+
@@ -75,3 +77,5 @@ darwin_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off)
734+
735+
return ret;
736+
}
737+
+
738+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;

0 commit comments

Comments
 (0)