From 1a930c00ae28f20fbacca20c50540023e95e1fff Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 22:16:09 -0300 Subject: [PATCH 001/136] add gcc-ppu-spu v13.2.0 --- ...c-7.2.0-PS3.patch => gcc-13.2.0-PS3.patch} | 135 +++++++----------- scripts/002-gcc-newlib-PPU.sh | 4 +- scripts/006-gcc-newlib-SPU.sh | 8 +- 3 files changed, 51 insertions(+), 96 deletions(-) rename patches/{gcc-7.2.0-PS3.patch => gcc-13.2.0-PS3.patch} (87%) diff --git a/patches/gcc-7.2.0-PS3.patch b/patches/gcc-13.2.0-PS3.patch similarity index 87% rename from patches/gcc-7.2.0-PS3.patch rename to patches/gcc-13.2.0-PS3.patch index 28be00208..2bc8eeb59 100644 --- a/patches/gcc-7.2.0-PS3.patch +++ b/patches/gcc-13.2.0-PS3.patch @@ -1,8 +1,11 @@ +# Original from https://github.com/ps3dev/ps3toolchain +# Updated to gcc 9.5.0 by Darjan Krijan [https://disc-kuraudo.eu] +# Updated to gcc 13.2.0 by luizfernandonb diff --git a/Makefile.in b/Makefile.in -index b824e0a0c..5bf0da25e 100644 +index 06a9398e172..7419f7ed67a 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -25734,7 +25734,6 @@ check-libiberty: +@@ -28118,7 +28118,6 @@ check-libiberty: .PHONY: install-libiberty maybe-install-libiberty maybe-install-libiberty: @if libiberty @@ -11,15 +14,15 @@ index b824e0a0c..5bf0da25e 100644 install-libiberty: installdirs @: $(MAKE); $(unstage) diff --git a/gcc/config.gcc b/gcc/config.gcc -index a9196cd26..f2a94403d 100644 +index 648b3dc2110..650d65fe28d 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -2330,6 +2330,15 @@ pdp11-*-*) +@@ -2863,6 +2863,15 @@ pdp11-*-*) # tmake_file="${tmake_file} rs6000/t-fprules" # extra_headers= # ;; +powerpc64-ps3-elf) -+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/default64.h" ++ tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/default64.h" + tm_file="rs6000/biarch64.h ${tm_file} rs6000/cell64lv2.h" + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" @@ -28,14 +31,14 @@ index a9196cd26..f2a94403d 100644 + tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" + ;; powerpc-*-darwin*) - extra_options="${extra_options} rs6000/darwin.opt" + extra_options="${extra_options} ${cpu_type}/darwin.opt" case ${target} in diff --git a/gcc/config/rs6000/cell64lv2.h b/gcc/config/rs6000/cell64lv2.h new file mode 100644 -index 000000000..86da868b5 +index 00000000000..79a09605757 --- /dev/null +++ b/gcc/config/rs6000/cell64lv2.h -@@ -0,0 +1,587 @@ +@@ -0,0 +1,583 @@ +/* Definitions of target machine for GNU compiler, + for 64 bit PowerPC linux. + Copyright (C) 2000-2017 Free Software Foundation, Inc. @@ -330,11 +333,9 @@ index 000000000..86da868b5 +/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */ +#undef ADJUST_FIELD_ALIGN +#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \ -+ (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \ -+ ? 128 \ -+ : (TARGET_64BIT \ -+ && TARGET_ALIGN_NATURAL == 0 \ -+ && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \ ++ ((TARGET_64BIT \ ++ && TARGET_ALIGN_NATURAL == 0 \ ++ && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \ + ? MIN ((COMPUTED), 32) \ + : (COMPUTED)) + @@ -377,7 +378,7 @@ index 000000000..86da868b5 + registers and memory. FIRST is nonzero if this is the only + element. */ +#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ -+ (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE)) ++ (!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE)) + +/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit + process. */ @@ -596,8 +597,6 @@ index 000000000..86da868b5 +#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) +#endif + -+#define POWERPC_CELL64LV2 -+ +#define POINTERS_EXTEND_UNSIGNED 1 + +/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */ @@ -623,54 +622,48 @@ index 000000000..86da868b5 + enabling the __float128 keyword. */ +#undef TARGET_FLOAT128_ENABLE_TYPE +#define TARGET_FLOAT128_ENABLE_TYPE 1 -diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c -index db9136f26..3a29d4723 100644 ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -1349,6 +1349,12 @@ rtl_opt_pass *make_pass_analyze_swaps (gcc::context*); - static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused)); - static tree rs6000_fold_builtin (tree, int, tree *, bool); - -+#ifdef POWERPC_CELL64LV2 -+ -+static bool rs6000_cell64lv2_valid_pointer_mode(enum machine_mode); -+ -+#endif -+ - /* Hash table stuff for keeping track of TOC entries. */ +\ No newline at end of file +diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc +index e5ceff3a61b..152b1191490 100644 +--- a/gcc/config/rs6000/rs6000.cc ++++ b/gcc/config/rs6000/rs6000.cc +@@ -1762,6 +1762,17 @@ static const struct attribute_spec rs6000_attribute_table[] = + #define TARGET_UPDATE_IPA_FN_TARGET_INFO rs6000_update_ipa_fn_target_info + - struct GTY((for_user)) toc_hash_struct -@@ -43333,7 +43339,19 @@ rs6000_optab_supported_p (int op, machine_mode mode1, machine_mode, - return true; - } - } -- -+ -+#ifdef POWERPC_CELL64LV2 ++static bool rs6000_cell64lv2_valid_pointer_mode(scalar_int_mode); + -+#undef TARGET_VALID_POINTER_MODE -+#define TARGET_VALID_POINTER_MODE rs6000_cell64lv2_valid_pointer_mode -+ -+static bool rs6000_cell64lv2_valid_pointer_mode(enum machine_mode mode) ++static bool ++rs6000_cell64lv2_valid_pointer_mode(scalar_int_mode mode) +{ -+ return (mode == SImode || (TARGET_64BIT && mode == DImode) || mode == ptr_mode || mode == Pmode); ++ return (mode == SImode || (TARGET_64BIT && mode == DImode) || mode == ptr_mode || mode == Pmode); +} + -+#endif ++#undef TARGET_VALID_POINTER_MODE ++#define TARGET_VALID_POINTER_MODE rs6000_cell64lv2_valid_pointer_mode + - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-rs6000.h" + /* Processor table. */ + struct rs6000_ptt + { +@@ -3491,7 +3502,7 @@ rs6000_linux64_override_options () + { + if (TARGET_PROFILE_KERNEL) + { +- profile_kernel = 0; ++ //profile_kernel = 0; Why??? + error (INVALID_32BIT, "profile-kernel"); + } + if (OPTION_SET_P (rs6000_current_cmodel)) diff --git a/gcc/configure b/gcc/configure -index 50ccc2a0f..6b503988a 100755 +index dec2eca1a45..bcfdcffb950 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -28598,12 +28598,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" >>confdefs.h +@@ -30853,12 +30853,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" >>confdefs.h esac case "$target:$tm_file" in -- powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) -+ powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) +- powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) ++ powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) case "$target" in *le-*-linux*) emul_name="-melf64lppc" @@ -679,44 +672,12 @@ index 50ccc2a0f..6b503988a 100755 + *-*-linux* | *-ps3-elf*) emul_name="-melf64ppc" ;; - *-*-freebsd*) -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 1d5a9d7c6..e568cb3f8 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5462,12 +5462,12 @@ EOF - esac - - case "$target:$tm_file" in -- powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) -+ powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) - case "$target" in - *le-*-linux*) - emul_name="-melf64lppc" - ;; -- *-*-linux*) -+ *-*-linux* | *-ps3-elf*) - emul_name="-melf64ppc" - ;; - *-*-freebsd*) -diff --git a/libcpp/lex.c b/libcpp/lex.c -index 9edd2a6af..15585ff93 100644 ---- a/libcpp/lex.c -+++ b/libcpp/lex.c -@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) - { - vc m_nl, m_cr, m_bs, m_qm; - -- data = *((const vc *)s); -+ data = __builtin_vec_vsx_ld (0, s); - s += 16; - - m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); + *le-*-freebsd*) diff --git a/libgcc/config.host b/libgcc/config.host -index bedcf1017..8d6c8feff 100644 +index 9d7212028d0..c2b3bb8ac28 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -1043,6 +1043,8 @@ powerpc-*-rtems*) +@@ -1224,6 +1224,8 @@ powerpc-*-rtems*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit" extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" ;; diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index b63da30d2..4b1dc90b4 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # gcc-newlib-PPU.sh by Naomi Peori (naomi@peori.ca) -GCC="gcc-7.2.0" +GCC="gcc-13.2.0" NEWLIB="newlib-1.20.0" if [ ! -d ${GCC} ]; then @@ -58,8 +58,6 @@ cd ${GCC}/build-ppu --enable-threads \ --with-cpu="cell" \ --with-newlib \ - --enable-newlib-multithread \ - --enable-newlib-hw-fp \ --with-system-zlib ## Compile and install. diff --git a/scripts/006-gcc-newlib-SPU.sh b/scripts/006-gcc-newlib-SPU.sh index c51f73786..ef21f3b61 100755 --- a/scripts/006-gcc-newlib-SPU.sh +++ b/scripts/006-gcc-newlib-SPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # gcc-newlib-SPU.sh by Naomi Peori (naomi@peori.ca) -GCC="gcc-7.2.0" +GCC="gcc-13.2.0" NEWLIB="newlib-1.20.0" if [ ! -d ${GCC} ]; then @@ -44,7 +44,6 @@ fi cd ${GCC}/build-spu ## Configure the build. -CFLAGS_FOR_TARGET="-Os -fpic -ffast-math -ftree-vectorize -funroll-loops -fschedule-insns -mdual-nops -mwarn-reloc" \ ../configure --prefix="$PS3DEV/spu" --target="spu" \ --disable-dependency-tracking \ --disable-libcc1 \ @@ -56,10 +55,7 @@ CFLAGS_FOR_TARGET="-Os -fpic -ffast-math -ftree-vectorize -funroll-loops -fsched --enable-languages="c,c++" \ --enable-lto \ --enable-threads \ - --with-newlib \ - --enable-newlib-multithread \ - --enable-newlib-hw-fp \ - --with-pic + --with-newlib ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? From 868e7f8041ed98541747820102675b9472da0f53 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 22:18:21 -0300 Subject: [PATCH 002/136] ignore mac .DS_Store --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ae20c71b3..c9f22d9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build/ .idea/** +.DS_Store From d044950c66ebf6ff54c3117026b345e1f98dc9ad Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 22:26:17 -0300 Subject: [PATCH 003/136] [fix] github actions --- .github/workflows/deploy.yaml | 124 ++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 57 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 42302dcda..df08445ad 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,68 +1,78 @@ -name: Build toolchain docker image +name: CI on: push: - branches: - - '*' pull_request: - branches: - - '*' + repository_dispatch: + types: [run_build] jobs: - Docker: - runs-on: ubuntu-latest + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 - persist-credentials: false - - name: Set up Docker Buildx - if: success() - id: buildx - uses: crazy-max/ghaction-docker-buildx@v3 - with: - buildx-version: latest - qemu-version: latest - - name: Prepare - if: success() - id: prepare - run: | - echo ::set-output name=docker_platforms::linux/amd64,linux/386 - echo ::set-output name=docker_username::miigotu - echo ::set-output name=github_image::docker.pkg.github.com/${GITHUB_REPOSITORY,,}/ps3dev - VERSION_TAG=${GITHUB_REF#refs/*/} - echo ::set-output name=version::${VERSION_TAG%/merge} - - name: Available platforms - if: success() - run: echo ${{ steps.buildx.outputs.platforms }} - - name: Docker Login and set build command - if: success() - id: login - env: - GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + + - name: Install Ubuntu requirements + if: matrix.os == 'ubuntu-latest' run: | - echo "${GITHUB_PASSWORD}" | docker login --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin docker.pkg.github.com - echo ::set-output name=buildx::$(echo docker buildx build --output type=image,name=${{ steps.prepare.outputs.github_image }},push=true \ - --platform ${{ steps.prepare.outputs.docker_platforms }} --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" \ - --tag "${{ steps.prepare.outputs.github_image }}:${{ steps.prepare.outputs.version }}") - - name: Cache Docker layers - uses: actions/cache@v2 - id: cache - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ steps.prepare.outputs.version }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Run Buildx (master) - if: success() && steps.prepare.outputs.version == 'master' && github.event_name != 'pull_request' + sudo apt-get update + sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python subversion wget zlib1g-dev libtool-bin python-dev bzip2 libgmp3-dev pkg-config + + - name: Install macOS requirements + if: matrix.os == 'macos-latest' run: | - ${{ steps.login.outputs.buildx }} --tag "${{ steps.prepare.outputs.github_image }}:latest" --file Dockerfile . - - name: Run Buildx (non-master) - if: success() && steps.prepare.outputs.version != 'master' && github.event_name != 'pull_request' + brew update + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config + + - name: Runs all the stages in the shell run: | - ${{ steps.login.outputs.buildx }} --file Dockerfile . - - name: Clear - if: always() + mkdir $PWD/ps3dev + export PS3DEV=$PWD/ps3dev + export PSL1GHT=$PS3DEV + export PATH=$PATH:$PS3DEV/bin + export PATH=$PATH:$PS3DEV/ppu/bin + export PATH=$PATH:$PS3DEV/spu/bin + ./toolchain.sh + + - name: Get short SHA + id: slug + run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + + - name: Compress ps3dev folder run: | - rm -rf ${HOME}/.docker/config.json + tar -zcvf ps3dev.tar.gz ps3dev + +# - uses: actions/upload-artifact@v2 +# with: +# name: ps3dev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}} +# path: ps3dev.tar.gz + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{matrix.os}}-${{ steps.slug.outputs.sha8 }} + release_name: ps3dev ${{matrix.os}} (${{steps.date.outputs.date}}) + draft: false + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./ps3dev.tar.gz + asset_name: ps3dev-${{matrix.os}}-${{steps.date.outputs.date}}.tar.gz + asset_content_type: application/gzip \ No newline at end of file From b237a9a497173e9f6559d2a5c5fc447bb0d38e1e Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 22:32:16 -0300 Subject: [PATCH 004/136] [gha] python dependency name fixed for ubuntu-latest --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index df08445ad..95a8c6ce9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,7 +20,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python subversion wget zlib1g-dev libtool-bin python-dev bzip2 libgmp3-dev pkg-config + sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python2 subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config - name: Install macOS requirements if: matrix.os == 'macos-latest' From 57d3d7a59d4f619711a8a512ed66229bd2a762a2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 22:40:19 -0300 Subject: [PATCH 005/136] [gha] install python2 manually --- .github/workflows/deploy.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 95a8c6ce9..579749319 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -27,6 +27,9 @@ jobs: run: | brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config + # python2 + curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg + installer -pkg python-2.7.18-macosx10.9.pkg -target / - name: Runs all the stages in the shell run: | From de37a375b7293b60c5dd7b23e900f89b31a34f44 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 22:41:52 -0300 Subject: [PATCH 006/136] [gha] sudo required --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 579749319..0df625b71 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -29,7 +29,7 @@ jobs: brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config # python2 curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg - installer -pkg python-2.7.18-macosx10.9.pkg -target / + sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / - name: Runs all the stages in the shell run: | From eac7e4fc090bd07ea6cea2a0f9adb3989c6305c3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 23:18:15 -0300 Subject: [PATCH 007/136] [gha] add g++ with c11 support --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0df625b71..407086e8c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,7 +20,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python2 subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config + sudo apt-get -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2 subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config - name: Install macOS requirements if: matrix.os == 'macos-latest' From 2f2633fa1df28825e1447af1116618f53d8e5f3a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 00:12:15 -0300 Subject: [PATCH 008/136] specific patch file for gcc ppu --- ...2.0-PS3.patch => gcc-13.2.0-PS3-PPU.patch} | 0 scripts/002-gcc-newlib-PPU.sh | 35 +++++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) rename patches/{gcc-13.2.0-PS3.patch => gcc-13.2.0-PS3-PPU.patch} (100%) diff --git a/patches/gcc-13.2.0-PS3.patch b/patches/gcc-13.2.0-PS3-PPU.patch similarity index 100% rename from patches/gcc-13.2.0-PS3.patch rename to patches/gcc-13.2.0-PS3-PPU.patch diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index 4b1dc90b4..942ac8904 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -15,7 +15,7 @@ if [ ! -d ${GCC} ]; then rm -Rf ${NEWLIB} && tar xfvz ${NEWLIB}.tar.gz ## Patch the source code. - cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC} + cat ../patches/${GCC}-PS3-PPU.patch | patch -p1 -d ${GCC} cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB} ## Enter the source code directory. @@ -44,21 +44,26 @@ fi cd ${GCC}/build-ppu ## Configure the build. + +# Avoid breakage +CFLAGS="$CFLAGS -Werror=format-security" +CXXFLAGS="$CXXFLAGS -Werror=format-security" ../configure --prefix="$PS3DEV/ppu" --target="powerpc64-ps3-elf" \ - --disable-dependency-tracking \ - --disable-libcc1 \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-nls \ - --disable-shared \ - --disable-win32-registry \ - --enable-languages="c,c++" \ - --enable-long-double-128 \ - --enable-lto \ - --enable-threads \ - --with-cpu="cell" \ - --with-newlib \ - --with-system-zlib + --with-cpu="cell" \ + --with-newlib \ + --with-system-zlib \ + --enable-languages="c,c++" \ + --enable-long-double-128 \ + --enable-lto \ + --enable-threads \ + --enable-newlib-multithread \ + --enable-newlib-hw-fp \ + --disable-dependency-tracking \ + --disable-libcc1 \ + --disable-multilib \ + --disable-nls \ + --disable-shared \ + --disable-win32-registry ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? From afb604ffa8128115a34e41f026feae5353b09f70 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 00:13:04 -0300 Subject: [PATCH 009/136] [gha] unnecessary -get --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 407086e8c..3e3e68a21 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -19,8 +19,8 @@ jobs: - name: Install Ubuntu requirements if: matrix.os == 'ubuntu-latest' run: | - sudo apt-get update - sudo apt-get -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2 subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config + sudo apt update + sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2 subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config - name: Install macOS requirements if: matrix.os == 'macos-latest' From 66979e99f1ebf383b072082488cbf9a39282fa46 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 00:18:28 -0300 Subject: [PATCH 010/136] gcc 9.5.0 for spu --- patches/gcc-9.5.0-PS3-SPU.patch | 705 ++++++++++++++++++++++++++++++++ scripts/006-gcc-newlib-SPU.sh | 29 +- 2 files changed, 721 insertions(+), 13 deletions(-) create mode 100644 patches/gcc-9.5.0-PS3-SPU.patch diff --git a/patches/gcc-9.5.0-PS3-SPU.patch b/patches/gcc-9.5.0-PS3-SPU.patch new file mode 100644 index 000000000..1292e356d --- /dev/null +++ b/patches/gcc-9.5.0-PS3-SPU.patch @@ -0,0 +1,705 @@ +# Original from https://github.com/ps3dev/ps3toolchain +# Updated to gcc 9.5.0 by Darjan Krijan [https://disc-kuraudo.eu] +diff '--color=auto' -urN a/gcc/config/rs6000/cell64lv2.h b/gcc/config/rs6000/cell64lv2.h +--- a/gcc/config/rs6000/cell64lv2.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/gcc/config/rs6000/cell64lv2.h 2023-01-01 17:58:23.274094209 +0100 +@@ -0,0 +1,587 @@ ++/* Definitions of target machine for GNU compiler, ++ for 64 bit PowerPC linux. ++ Copyright (C) 2000-2017 Free Software Foundation, Inc. ++ ++ This file is part of GCC. ++ ++ GCC 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 3, or (at your ++ option) any later version. ++ ++ GCC 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. ++ ++ Under Section 7 of GPL version 3, you are granted additional ++ permissions described in the GCC Runtime Library Exception, version ++ 3.1, as published by the Free Software Foundation. ++ ++ You should have received a copy of the GNU General Public License and ++ a copy of the GCC Runtime Library Exception along with this program; ++ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++ . */ ++ ++#ifndef RS6000_BI_ARCH ++ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#define DEFAULT_ARCH64_P 1 ++#define RS6000_BI_ARCH_P 0 ++ ++#else ++ ++#define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT) ++#define RS6000_BI_ARCH_P 1 ++ ++#endif ++ ++#ifdef IN_LIBGCC2 ++#undef TARGET_64BIT ++#ifdef __powerpc64__ ++#define TARGET_64BIT 1 ++#else ++#define TARGET_64BIT 0 ++#endif ++#endif ++ ++#undef TARGET_AIX ++#define TARGET_AIX TARGET_64BIT ++ ++#ifdef HAVE_LD_NO_DOT_SYMS ++/* New ABI uses a local sym for the function entry point. */ ++extern int dot_symbols; ++#undef DOT_SYMBOLS ++#define DOT_SYMBOLS dot_symbols ++#endif ++ ++#undef TARGET_KEEP_LEAF_WHEN_PROFILED ++#define TARGET_KEEP_LEAF_WHEN_PROFILED rs6000_keep_leaf_when_profiled ++ ++#define TARGET_USES_LINUX64_OPT 1 ++#ifdef HAVE_LD_LARGE_TOC ++#undef TARGET_CMODEL ++#define TARGET_CMODEL rs6000_current_cmodel ++#define SET_CMODEL(opt) rs6000_current_cmodel = opt ++#else ++#define SET_CMODEL(opt) do {} while (0) ++#endif ++ ++#undef PROCESSOR_DEFAULT ++#define PROCESSOR_DEFAULT PROCESSOR_CELL ++#undef PROCESSOR_DEFAULT64 ++#define PROCESSOR_DEFAULT64 PROCESSOR_CELL ++ ++/* We don't need to generate entries in .fixup, except when ++ -mrelocatable or -mrelocatable-lib is given. */ ++#undef RELOCATABLE_NEEDS_FIXUP ++#define RELOCATABLE_NEEDS_FIXUP \ ++ (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE) ++ ++#undef RS6000_ABI_NAME ++#define RS6000_ABI_NAME "linux" ++ ++#define INVALID_64BIT "-m%s not supported in this configuration" ++#define INVALID_32BIT INVALID_64BIT ++ ++#ifdef LINUX64_DEFAULT_ABI_ELFv2 ++#define ELFv2_ABI_CHECK (rs6000_elf_abi != 1) ++#else ++#define ELFv2_ABI_CHECK (rs6000_elf_abi == 2) ++#endif ++ ++#undef SUBSUBTARGET_OVERRIDE_OPTIONS ++#define SUBSUBTARGET_OVERRIDE_OPTIONS \ ++ do \ ++ { \ ++ if (!global_options_set.x_rs6000_alignment_flags) \ ++ rs6000_alignment_flags = MASK_ALIGN_NATURAL; \ ++ if (rs6000_isa_flags & OPTION_MASK_64BIT) \ ++ { \ ++ if (DEFAULT_ABI != ABI_AIX) \ ++ { \ ++ rs6000_current_abi = ABI_AIX; \ ++ error (INVALID_64BIT, "call"); \ ++ } \ ++ dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \ ++ if (ELFv2_ABI_CHECK) \ ++ { \ ++ rs6000_current_abi = ABI_ELFv2; \ ++ if (dot_symbols) \ ++ error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ ++ } \ ++ if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \ ++ { \ ++ rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \ ++ error (INVALID_64BIT, "relocatable"); \ ++ } \ ++ if (rs6000_isa_flags & OPTION_MASK_EABI) \ ++ { \ ++ rs6000_isa_flags &= ~OPTION_MASK_EABI; \ ++ error (INVALID_64BIT, "eabi"); \ ++ } \ ++ if (TARGET_PROTOTYPE) \ ++ { \ ++ target_prototype = 0; \ ++ error (INVALID_64BIT, "prototype"); \ ++ } \ ++ if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ ++ { \ ++ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ ++ error ("-m64 requires a PowerPC64 cpu"); \ ++ } \ ++ if ((rs6000_isa_flags_explicit \ ++ & OPTION_MASK_MINIMAL_TOC) != 0) \ ++ { \ ++ if (global_options_set.x_rs6000_current_cmodel \ ++ && rs6000_current_cmodel != CMODEL_SMALL) \ ++ error ("-mcmodel incompatible with other toc options"); \ ++ SET_CMODEL (CMODEL_SMALL); \ ++ } \ ++ else \ ++ { \ ++ if (!global_options_set.x_rs6000_current_cmodel) \ ++ SET_CMODEL (CMODEL_SMALL); \ ++ if (rs6000_current_cmodel != CMODEL_SMALL) \ ++ { \ ++ if (!global_options_set.x_TARGET_NO_FP_IN_TOC) \ ++ TARGET_NO_FP_IN_TOC \ ++ = rs6000_current_cmodel == CMODEL_MEDIUM; \ ++ if (!global_options_set.x_TARGET_NO_SUM_IN_TOC) \ ++ TARGET_NO_SUM_IN_TOC = 0; \ ++ } \ ++ } \ ++ } \ ++ else \ ++ { \ ++ if (!RS6000_BI_ARCH_P) \ ++ error (INVALID_32BIT, "32"); \ ++ if (global_options_set.x_rs6000_current_cmodel) \ ++ { \ ++ SET_CMODEL (CMODEL_SMALL); \ ++ error (INVALID_32BIT, "cmodel"); \ ++ } \ ++ } \ ++ } \ ++ while (0) ++ ++#undef ASM_DEFAULT_SPEC ++#undef ASM_SPEC ++#undef LINK_SECURE_PLT_SPEC ++ ++#ifndef RS6000_BI_ARCH ++#define ASM_DEFAULT_SPEC "-mcell" ++#define ASM_SPEC "%(asm_spec64) %(asm_spec_common)" ++#define LINK_OS_LV2_SPEC "%(link_os_lv2_spec64)" ++#define LINK_SECURE_PLT_SPEC "" ++#else ++#if DEFAULT_ARCH64_P ++#define ASM_DEFAULT_SPEC "-mppc%{!m32:64}" ++#define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)" ++#define LINK_OS_LV2_SPEC "%{m32:%(link_os_lv2_spec32)}%{!m32:%(link_os_lv2_spec64)}" ++#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}" ++#else ++#define ASM_DEFAULT_SPEC "-mppc%{m64:64}" ++#define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)" ++#define LINK_OS_LV2_SPEC "%{!m64:%(link_os_lv2_spec32)}%{m64:%(link_os_lv2_spec64)}" ++#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}" ++#endif ++#endif ++ ++#define ASM_SPEC32 "-a32 \ ++%{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \ ++%{memb|msdata=eabi: -memb}" ++ ++#define ASM_SPEC64 "-a64" ++ ++#define ASM_SPEC_COMMON "%(asm_cpu) \ ++%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ ++ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) ++ ++#undef SUBSUBTARGET_EXTRA_SPECS ++#define SUBSUBTARGET_EXTRA_SPECS \ ++ { "asm_spec_common", ASM_SPEC_COMMON }, \ ++ { "asm_spec32", ASM_SPEC32 }, \ ++ { "asm_spec64", ASM_SPEC64 }, \ ++ { "link_os_lv2_spec32", LINK_OS_LV2_SPEC32 }, \ ++ { "link_os_lv2_spec64", LINK_OS_LV2_SPEC64 }, \ ++ { "lib_lv2", LIB_LV2_SPEC }, \ ++ { "startfile_lv2", STARTFILE_LV2_SPEC }, \ ++ { "endfile_lv2", ENDFILE_LV2_SPEC }, \ ++ { "link_start_lv2", LINK_START_LV2_SPEC }, \ ++ { "link_os_lv2", LINK_OS_LV2_SPEC }, \ ++ { "cpp_os_lv2", CPP_OS_LV2_SPEC }, \ ++ { "link_os_extra_spec32", LINK_OS_EXTRA_SPEC32 }, \ ++ { "link_os_extra_spec64", LINK_OS_EXTRA_SPEC64 }, \ ++ { "link_os_new_dtags", LINK_OS_NEW_DTAGS_SPEC }, \ ++ { "include_extra", INCLUDE_EXTRA_SPEC }, \ ++ { "dynamic_linker_prefix", DYNAMIC_LINKER_PREFIX } ++ ++/* Optional specs used for overriding the system include directory, default ++ -rpath links, and prefix for the dynamic linker. Normally, there are not ++ defined, but if the user configure with the --with-advance-toolchain= ++ option, the advance-toolchain.h file will override these. */ ++#ifndef INCLUDE_EXTRA_SPEC ++#define INCLUDE_EXTRA_SPEC "" ++#endif ++ ++#ifndef LINK_OS_EXTRA_SPEC32 ++#define LINK_OS_EXTRA_SPEC32 "" ++#endif ++ ++#ifndef LINK_OS_EXTRA_SPEC64 ++#define LINK_OS_EXTRA_SPEC64 "" ++#endif ++ ++#ifndef LINK_OS_NEW_DTAGS_SPEC ++#define LINK_OS_NEW_DTAGS_SPEC "" ++#endif ++ ++#ifndef DYNAMIC_LINKER_PREFIX ++#define DYNAMIC_LINKER_PREFIX "" ++#endif ++ ++#undef MULTILIB_DEFAULTS ++#if DEFAULT_ARCH64_P ++#define MULTILIB_DEFAULTS { "m64" } ++#else ++#define MULTILIB_DEFAULTS { "m32" } ++#endif ++ ++/* Split stack is only supported for 64 bit, and requires glibc >= 2.18. */ ++#if TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018 ++# ifndef RS6000_BI_ARCH ++# define TARGET_CAN_SPLIT_STACK ++# else ++# if DEFAULT_ARCH64_P ++/* Supported, and the default is -m64 */ ++# define TARGET_CAN_SPLIT_STACK_64BIT 1 ++# else ++/* Supported, and the default is -m32 */ ++# define TARGET_CAN_SPLIT_STACK_64BIT 0 ++# endif ++# endif ++#endif ++ ++#ifndef RS6000_BI_ARCH ++ ++/* 64-bit PowerPC Linux always has a TOC. */ ++#undef TARGET_TOC ++#define TARGET_TOC 1 ++ ++/* Some things from sysv4.h we don't do when 64 bit. */ ++#undef OPTION_RELOCATABLE ++#define OPTION_RELOCATABLE 0 ++#undef OPTION_EABI ++#define OPTION_EABI 0 ++#undef OPTION_PROTOTYPE ++#define OPTION_PROTOTYPE 0 ++#undef RELOCATABLE_NEEDS_FIXUP ++#define RELOCATABLE_NEEDS_FIXUP 0 ++ ++#endif ++ ++// TODO: Need to remove ? ++/* We use glibc _mcount for profiling. */ ++#define NO_PROFILE_COUNTERS 1 ++#define PROFILE_HOOK(LABEL) \ ++ do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0) ++ ++/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */ ++#undef ADJUST_FIELD_ALIGN ++#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \ ++ (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \ ++ ? 128 \ ++ : (TARGET_64BIT \ ++ && TARGET_ALIGN_NATURAL == 0 \ ++ && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \ ++ ? MIN ((COMPUTED), 32) \ ++ : (COMPUTED)) ++ ++/* PowerPC64 Linux increases natural record alignment to doubleword if ++ the first field is an FP double, only if in power alignment mode. */ ++#undef ROUND_TYPE_ALIGN ++#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \ ++ ((TARGET_64BIT \ ++ && (TREE_CODE (STRUCT) == RECORD_TYPE \ ++ || TREE_CODE (STRUCT) == UNION_TYPE \ ++ || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \ ++ && TARGET_ALIGN_NATURAL == 0) \ ++ ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \ ++ : MAX ((COMPUTED), (SPECIFIED))) ++ ++/* Use the default for compiling target libs. */ ++#ifdef IN_TARGET_LIBS ++#undef TARGET_ALIGN_NATURAL ++#define TARGET_ALIGN_NATURAL 1 ++#endif ++ ++/* Indicate that jump tables go in the text section. */ ++#undef JUMP_TABLES_IN_TEXT_SECTION ++#define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT ++ ++/* The linux ppc64 ABI isn't explicit on whether aggregates smaller ++ than a doubleword should be padded upward or downward. You could ++ reasonably assume that they follow the normal rules for structure ++ layout treating the parameter area as any other block of memory, ++ then map the reg param area to registers. i.e. pad upward. ++ Setting both of the following defines results in this behavior. ++ Setting just the first one will result in aggregates that fit in a ++ doubleword being padded downward, and others being padded upward. ++ Not a bad idea as this results in struct { int x; } being passed ++ the same way as an int. */ ++#define AGGREGATE_PADDING_FIXED TARGET_64BIT ++#define AGGREGATES_PAD_UPWARD_ALWAYS 0 ++ ++/* Specify padding for the last element of a block move between ++ registers and memory. FIRST is nonzero if this is the only ++ element. */ ++#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ ++ (!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE)) ++ ++/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit ++ process. */ ++#define OS_MISSING_POWERPC64 !TARGET_64BIT ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ if (TARGET_64BIT) \ ++ { \ ++ builtin_define ("__PPU__"); \ ++ builtin_define ("__PPC__"); \ ++ builtin_define ("__PPC64__"); \ ++ builtin_define ("__lv2ppu__"); \ ++ builtin_define ("__powerpc__"); \ ++ builtin_define ("__powerpc64__"); \ ++ if (!DOT_SYMBOLS) \ ++ builtin_define ("_CALL_LINUX"); \ ++ builtin_assert ("cpu=powerpc64"); \ ++ builtin_assert ("machine=powerpc64"); \ ++ } \ ++ else \ ++ { \ ++ builtin_define_std ("PPC"); \ ++ builtin_define_std ("powerpc"); \ ++ builtin_assert ("cpu=powerpc"); \ ++ builtin_assert ("machine=powerpc"); \ ++ TARGET_OS_SYSV_CPP_BUILTINS (); \ ++ } \ ++ } \ ++ while (0) ++ ++#undef CPP_OS_DEFAULT_SPEC ++#define CPP_OS_DEFAULT_SPEC "%(cpp_os_lv2) %(include_extra)" ++ ++#undef LINK_SHLIB_SPEC ++#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" ++ ++#undef LIB_DEFAULT_SPEC ++#define LIB_DEFAULT_SPEC "%(lib_lv2)" ++ ++#undef STARTFILE_DEFAULT_SPEC ++#define STARTFILE_DEFAULT_SPEC "%(startfile_lv2)" ++ ++#undef ENDFILE_DEFAULT_SPEC ++#define ENDFILE_DEFAULT_SPEC "%(endfile_lv2)" ++ ++#undef LINK_START_DEFAULT_SPEC ++#define LINK_START_DEFAULT_SPEC "%(link_start_lv2)" ++ ++#undef LINK_OS_DEFAULT_SPEC ++#define LINK_OS_DEFAULT_SPEC "%(link_os_lv2)" ++ ++#define LIB_LV2_SPEC "-L %:getenv(PSL1GHT /ppu/lib) --start-group -lsysbase -lc -lrt -llv2 --end-group" ++ ++#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" ++ ++#define STARTFILE_LV2_SPEC "lv2-crti.o%s crtbegin.o%s lv2-crt0.o%s lv2-sprx.o%s" ++ ++#define ENDFILE_LV2_SPEC "crtend.o%s lv2-crtn.o%s" ++ ++#define LINK_START_LV2_SPEC "-T lv2.ld%s" ++ ++#define LINK_OS_LV2_SPEC32 "-m elf32ppc" ++#define LINK_OS_LV2_SPEC64 "-m elf64ppc" ++ ++#define CPP_OS_LV2_SPEC "-D__lv2ppu__ -ffunction-sections -fdata-sections" ++ ++#undef DEFAULT_ASM_ENDIAN ++#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) ++#define DEFAULT_ASM_ENDIAN " -mlittle" ++#define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ ++ " -m elf32lppclinux", \ ++ " -m elf32lppclinux") ++#define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \ ++ " -m elf64lppc", \ ++ " -m elf64lppc") ++#else ++#define DEFAULT_ASM_ENDIAN " -mbig" ++#define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ ++ " -m elf32lppclinux", \ ++ " -m elf32ppclinux") ++#define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \ ++ " -m elf64lppc", \ ++ " -m elf64ppc") ++#endif ++ ++#undef TOC_SECTION_ASM_OP ++#define TOC_SECTION_ASM_OP \ ++ (TARGET_64BIT \ ++ ? "\t.section\t\".toc\",\"aw\"" \ ++ : "\t.section\t\".got\",\"aw\"") ++ ++#undef MINIMAL_TOC_SECTION_ASM_OP ++#define MINIMAL_TOC_SECTION_ASM_OP \ ++ (TARGET_64BIT \ ++ ? "\t.section\t\".toc1\",\"aw\"" \ ++ : (flag_pic \ ++ ? "\t.section\t\".got2\",\"aw\"" \ ++ : "\t.section\t\".got1\",\"aw\"")) ++ ++/* Must be at least as big as our pointer type. */ ++#undef SIZE_TYPE ++#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 32 ++ ++#undef RS6000_MCOUNT ++#define RS6000_MCOUNT "_mcount" ++ ++#ifdef __powerpc64__ ++/* _init and _fini functions are built from bits spread across many ++ object files, each potentially with a different TOC pointer. For ++ that reason, place a nop after the call so that the linker can ++ restore the TOC pointer if a TOC adjusting call stub is needed. */ ++#if DOT_SYMBOLS ++#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ ++ asm (SECTION_OP "\n" \ ++" bl ." #FUNC "\n" \ ++" nop\n" \ ++" .previous"); ++#else ++#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ ++ asm (SECTION_OP "\n" \ ++" bl " #FUNC "\n" \ ++" nop\n" \ ++" .previous"); ++#endif ++#endif ++ ++/* FP save and restore routines. */ ++#undef SAVE_FP_PREFIX ++#define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_") ++#undef SAVE_FP_SUFFIX ++#define SAVE_FP_SUFFIX "" ++#undef RESTORE_FP_PREFIX ++#define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_") ++#undef RESTORE_FP_SUFFIX ++#define RESTORE_FP_SUFFIX "" ++ ++/* Dwarf2 debugging. */ ++#undef PREFERRED_DEBUGGING_TYPE ++#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ++ ++/* This is how to declare the size of a function. */ ++#undef ASM_DECLARE_FUNCTION_SIZE ++#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ ++ do \ ++ { \ ++ if (!flag_inhibit_size_directive) \ ++ { \ ++ fputs ("\t.size\t", (FILE)); \ ++ if (TARGET_64BIT && DOT_SYMBOLS) \ ++ putc ('.', (FILE)); \ ++ assemble_name ((FILE), (FNAME)); \ ++ fputs (",.-", (FILE)); \ ++ rs6000_output_function_entry (FILE, FNAME); \ ++ putc ('\n', (FILE)); \ ++ } \ ++ } \ ++ while (0) ++ ++/* Return nonzero if this entry is to be written into the constant ++ pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF ++ or a CONST containing one of them. If -mfp-in-toc (the default), ++ we also do this for floating-point constants. We actually can only ++ do this if the FP formats of the target and host machines are the ++ same, but we can't check that since not every file that uses ++ the macros includes real.h. We also do this when we can write the ++ entry into the TOC and the entry is not larger than a TOC entry. */ ++ ++#undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P ++#define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ ++ (TARGET_TOC \ ++ && (GET_CODE (X) == SYMBOL_REF \ ++ || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \ ++ && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \ ++ || GET_CODE (X) == LABEL_REF \ ++ || (GET_CODE (X) == CONST_INT \ ++ && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \ ++ || (GET_CODE (X) == CONST_DOUBLE \ ++ && ((TARGET_64BIT \ ++ && (TARGET_MINIMAL_TOC \ ++ || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ ++ && ! TARGET_NO_FP_IN_TOC))) \ ++ || (!TARGET_64BIT \ ++ && !TARGET_NO_FP_IN_TOC \ ++ && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ ++ && BITS_PER_WORD == HOST_BITS_PER_INT))))) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#undef ASM_PREFERRED_EH_DATA_FORMAT ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ++ (TARGET_64BIT || flag_pic \ ++ ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \ ++ | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \ ++ : DW_EH_PE_absptr) ++ ++/* For backward compatibility, we must continue to use the AIX ++ structure return convention. */ ++#undef DRAFT_V4_STRUCT_RET ++#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT) ++ ++#ifdef TARGET_LIBC_PROVIDES_SSP ++/* ppc32 glibc provides __stack_chk_guard in -0x7008(2), ++ ppc64 glibc provides it at -0x7010(13). */ ++#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) ++#endif ++ ++#define POWERPC_CELL64LV2 ++ ++#define POINTERS_EXTEND_UNSIGNED 1 ++ ++/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */ ++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128 ++#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128 ++#endif ++ ++/* Static stack checking is supported by means of probes. */ ++#define STACK_CHECK_STATIC_BUILTIN 1 ++ ++/* The default value isn't sufficient in 64-bit mode. */ ++#define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024) ++ ++/* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends ++ on glibc 2.19 or greater. */ ++#if TARGET_GLIBC_MAJOR > 2 \ ++ || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19) ++#define RS6000_GLIBC_ATOMIC_FENV 1 ++#endif ++ ++/* The IEEE 128-bit emulator is only built on Linux systems. Flag that we ++ should enable the type handling for KFmode on VSX systems even if we are not ++ enabling the __float128 keyword. */ ++#undef TARGET_FLOAT128_ENABLE_TYPE ++#define TARGET_FLOAT128_ENABLE_TYPE 1 +diff '--color=auto' -urN a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c +--- a/gcc/config/rs6000/rs6000.c 2022-05-27 09:21:11.000000000 +0200 ++++ b/gcc/config/rs6000/rs6000.c 2023-01-01 18:00:32.742783224 +0100 +@@ -1424,6 +1424,10 @@ + static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused)); + static tree rs6000_fold_builtin (tree, int, tree *, bool); + ++#ifdef POWERPC_CELL64LV2 ++static bool rs6000_cell64lv2_valid_pointer_mode(scalar_int_mode); ++#endif ++ + /* Hash table stuff for keeping track of TOC entries. */ + + struct GTY((for_user)) toc_hash_struct +@@ -39732,7 +39736,18 @@ + return id; + } + +- ++#ifdef POWERPC_CELL64LV2 ++#undef TARGET_VALID_POINTER_MODE ++#define TARGET_VALID_POINTER_MODE rs6000_cell64lv2_valid_pointer_mode ++ ++static bool ++rs6000_cell64lv2_valid_pointer_mode(scalar_int_mode mode) ++{ ++ return (mode == SImode || (TARGET_64BIT && mode == DImode) || mode == ptr_mode || mode == Pmode); ++} ++ ++#endif ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-rs6000.h" +diff '--color=auto' -urN a/gcc/config.gcc b/gcc/config.gcc +--- a/gcc/config.gcc 2022-05-27 09:21:10.000000000 +0200 ++++ b/gcc/config.gcc 2023-01-01 14:28:35.684278963 +0100 +@@ -2587,6 +2587,15 @@ + # tmake_file="${tmake_file} rs6000/t-fprules" + # extra_headers= + # ;; ++powerpc64-ps3-elf) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/default64.h" ++ tm_file="rs6000/biarch64.h ${tm_file} rs6000/cell64lv2.h" ++ if test x${enable_secureplt} = xyes; then ++ tm_file="rs6000/secureplt.h ${tm_file}" ++ fi ++ extra_options="${extra_options} rs6000/sysv4.opt" ++ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ++ ;; + powerpc-*-darwin*) + extra_options="${extra_options} ${cpu_type}/darwin.opt" + case ${target} in +diff '--color=auto' -urN a/gcc/configure b/gcc/configure +--- a/gcc/configure 2022-05-27 09:21:46.000000000 +0200 ++++ b/gcc/configure 2023-01-01 14:52:19.312078588 +0100 +@@ -28944,12 +28944,12 @@ + esac + + case "$target:$tm_file" in +- powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) ++ powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) + case "$target" in + *le-*-linux*) + emul_name="-melf64lppc" + ;; +- *-*-linux*) ++ *-*-linux* | *-ps3-elf*) + emul_name="-melf64ppc" + ;; + *le-*-freebsd*) +diff '--color=auto' -urN a/gcc/configure.ac b/gcc/configure.ac +--- a/gcc/configure.ac 2022-05-27 09:21:11.000000000 +0200 ++++ b/gcc/configure.ac 2023-01-01 14:51:42.742384668 +0100 +@@ -5671,12 +5671,12 @@ + esac + + case "$target:$tm_file" in +- powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) ++ powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) + case "$target" in + *le-*-linux*) + emul_name="-melf64lppc" + ;; +- *-*-linux*) ++ *-*-linux* | *-ps3-elf*) + emul_name="-melf64ppc" + ;; + *le-*-freebsd*) +diff '--color=auto' -urN a/libgcc/config.host b/libgcc/config.host +--- a/libgcc/config.host 2022-05-27 09:21:12.000000000 +0200 ++++ b/libgcc/config.host 2023-01-01 14:29:07.913987821 +0100 +@@ -1134,6 +1134,8 @@ + tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit" + extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" + ;; ++powerpc64-ps3-elf) ++ ;; + powerpc*-*-linux*) + 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" + tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000" +diff '--color=auto' -urN a/Makefile.in b/Makefile.in +--- a/Makefile.in 2022-05-27 09:21:10.000000000 +0200 ++++ b/Makefile.in 2023-01-01 14:54:20.241067239 +0100 +@@ -27294,7 +27294,6 @@ + .PHONY: install-libiberty maybe-install-libiberty + maybe-install-libiberty: + @if libiberty +-maybe-install-libiberty: install-libiberty + + install-libiberty: installdirs + @: $(MAKE); $(unstage) diff --git a/scripts/006-gcc-newlib-SPU.sh b/scripts/006-gcc-newlib-SPU.sh index ef21f3b61..22aafa443 100755 --- a/scripts/006-gcc-newlib-SPU.sh +++ b/scripts/006-gcc-newlib-SPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # gcc-newlib-SPU.sh by Naomi Peori (naomi@peori.ca) -GCC="gcc-13.2.0" +GCC="gcc-9.5.0" NEWLIB="newlib-1.20.0" if [ ! -d ${GCC} ]; then @@ -15,7 +15,7 @@ if [ ! -d ${GCC} ]; then rm -Rf ${NEWLIB} && tar xfvz ${NEWLIB}.tar.gz ## Patch the source code. - cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC} + cat ../patches/${GCC}-PS3-SPU.patch | patch -p1 -d ${GCC} cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB} ## Enter the source code directory. @@ -44,18 +44,21 @@ fi cd ${GCC}/build-spu ## Configure the build. +unset CFLAGS CXXFLAGS LDFLAGS ../configure --prefix="$PS3DEV/spu" --target="spu" \ - --disable-dependency-tracking \ - --disable-libcc1 \ - --disable-libssp \ - --disable-multilib \ - --disable-nls \ - --disable-shared \ - --disable-win32-registry \ - --enable-languages="c,c++" \ - --enable-lto \ - --enable-threads \ - --with-newlib + --enable-languages="c" \ + --enable-lto \ + --enable-threads \ + --enable-newlib-multithread \ + --enable-newlib-hw-fp \ + --enable-obsolete \ + --disable-dependency-tracking \ + --disable-libcc1 \ + --disable-libssp \ + --disable-multilib \ + --disable-nls \ + --disable-shared \ + --disable-win32-registry ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? From 3445df8e26f747e77d06b20ae28076eb8933b5f2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 00:18:53 -0300 Subject: [PATCH 011/136] ppu only for c lang --- scripts/002-gcc-newlib-PPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index 942ac8904..8b74ef551 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -52,7 +52,7 @@ CXXFLAGS="$CXXFLAGS -Werror=format-security" --with-cpu="cell" \ --with-newlib \ --with-system-zlib \ - --enable-languages="c,c++" \ + --enable-languages="c" \ --enable-long-double-128 \ --enable-lto \ --enable-threads \ From 319554bbf82bcae8cdb2e8c3078146b0809600aa Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 02:24:37 -0300 Subject: [PATCH 012/136] [ppu] add c++ --- scripts/002-gcc-newlib-PPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index 8b74ef551..942ac8904 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -52,7 +52,7 @@ CXXFLAGS="$CXXFLAGS -Werror=format-security" --with-cpu="cell" \ --with-newlib \ --with-system-zlib \ - --enable-languages="c" \ + --enable-languages="c,c++" \ --enable-long-double-128 \ --enable-lto \ --enable-threads \ From c48e4e12227a3717f46587a06d9b19badac905e3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 02:25:00 -0300 Subject: [PATCH 013/136] [ppu] fix for _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE=0 --- scripts/002-gcc-newlib-PPU.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index 942ac8904..5d77adeec 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -45,6 +45,9 @@ cd ${GCC}/build-ppu ## Configure the build. +## TODO - Move it to patch file +sed -i 's/#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 1/#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 0/' powerpc64-ps3-elf/libstdc++-v3/include/powerpc64-ps3-elf/bits/c++config.h + # Avoid breakage CFLAGS="$CFLAGS -Werror=format-security" CXXFLAGS="$CXXFLAGS -Werror=format-security" From 6c44881b0f1dbbd031b7bc06a7ae3c73284852d5 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 03:31:54 -0300 Subject: [PATCH 014/136] [ppu] HAVE_STRUCT_DIRENT_D_TYPE=0 --- scripts/002-gcc-newlib-PPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index 5d77adeec..e6d69c626 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -46,7 +46,7 @@ cd ${GCC}/build-ppu ## Configure the build. ## TODO - Move it to patch file -sed -i 's/#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 1/#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 0/' powerpc64-ps3-elf/libstdc++-v3/include/powerpc64-ps3-elf/bits/c++config.h +sed -i 's/AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1/AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 0/' ../libstdc++-v3/acinclude.m4 # Avoid breakage CFLAGS="$CFLAGS -Werror=format-security" From 5af633b61503695ace38d91abee9af07ef1e26ca Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 12:54:15 -0300 Subject: [PATCH 015/136] [ppu] HAVE_STRUCT_DIRENT_D_TYPE=0 --- scripts/002-gcc-newlib-PPU.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index e6d69c626..d75fcbe29 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -45,8 +45,6 @@ cd ${GCC}/build-ppu ## Configure the build. -## TODO - Move it to patch file -sed -i 's/AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1/AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 0/' ../libstdc++-v3/acinclude.m4 # Avoid breakage CFLAGS="$CFLAGS -Werror=format-security" @@ -68,6 +66,9 @@ CXXFLAGS="$CXXFLAGS -Werror=format-security" --disable-shared \ --disable-win32-registry +## TODO - Move it to patch file +sed -i 's/ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE/if 0/' ../libstdc++-v3/src/filesystem/dir-common.h + ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? if [ ! -z $ret ]; then PROCS=4; fi From 5e818ab5ecf02bbc99fc9c9128123db9730542ba Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 15:02:29 -0300 Subject: [PATCH 016/136] spu-gcc 7.20 --- ...-PS3.patch => binutils-2.22-PS3-SPU.patch} | 0 patches/binutils-2.42-PS3-PPU.patch | 75 ++ patches/gcc-7.2.0-PS3.patch | 727 ++++++++++++++++++ scripts/001-binutils-PPU.sh | 5 +- scripts/005-binutils-SPU.sh | 5 +- scripts/006-gcc-newlib-SPU.sh | 4 +- 6 files changed, 810 insertions(+), 6 deletions(-) rename patches/{binutils-2.22-PS3.patch => binutils-2.22-PS3-SPU.patch} (100%) create mode 100644 patches/binutils-2.42-PS3-PPU.patch create mode 100644 patches/gcc-7.2.0-PS3.patch diff --git a/patches/binutils-2.22-PS3.patch b/patches/binutils-2.22-PS3-SPU.patch similarity index 100% rename from patches/binutils-2.22-PS3.patch rename to patches/binutils-2.22-PS3-SPU.patch diff --git a/patches/binutils-2.42-PS3-PPU.patch b/patches/binutils-2.42-PS3-PPU.patch new file mode 100644 index 000000000..e90893b99 --- /dev/null +++ b/patches/binutils-2.42-PS3-PPU.patch @@ -0,0 +1,75 @@ +# Original from https://github.com/ps3dev/ps3toolchain +# Updated for binutils 2.40 by Darjan Krijan [https://disc-kuraudo.eu] +diff '--color=auto' -urN a/ld/emulparams/elf32_spu.sh b/ld/emulparams/elf32_spu.sh +--- a/ld/emulparams/elf32_spu.sh 2022-07-08 11:46:48.000000000 +0200 ++++ b/ld/emulparams/elf32_spu.sh 2023-01-04 22:15:19.310575828 +0100 +@@ -6,6 +6,8 @@ + ARCH=spu + MACHINE= + ALIGNMENT=16 ++GENERATE_PIE_SCRIPT=yes ++GENERATE_COMBRELOC_SCRIPT=yes + TEXT_START_ADDR=0 + INITIAL_READONLY_SECTIONS='.interrupt : { KEEP(*(.interrupt)) }' + if test -z "${CREATE_SHLIB}"; then +diff '--color=auto' -urN a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em +--- a/ld/emultempl/spuelf.em 2022-07-08 11:46:48.000000000 +0200 ++++ b/ld/emultempl/spuelf.em 2023-01-04 22:17:32.998687355 +0100 +@@ -258,6 +258,14 @@ + return total; + } + ++static void ++spu_before_parse (void) ++{ ++ gld${EMULATION_NAME}_before_parse (); ++ ++ config.has_pie = `if test -n "$GENERATE_PIE_SCRIPT" ; then echo true ; else echo false ; fi`; ++} ++ + /* Go find if we need to do anything special for overlays. */ + + static void +@@ -851,5 +859,6 @@ + + LDEMUL_AFTER_OPEN=spu_after_open + LDEMUL_BEFORE_ALLOCATION=spu_before_allocation ++LDEMUL_BEFORE_PARSE=spu_before_parse + LDEMUL_FINISH=gld${EMULATION_NAME}_finish + LDEMUL_CHOOSE_TARGET=gld${EMULATION_NAME}_choose_target +diff '--color=auto' -urN a/ld/ld.h b/ld/ld.h +--- a/ld/ld.h 2022-07-08 11:46:48.000000000 +0200 ++++ b/ld/ld.h 2023-01-04 22:24:33.832738444 +0100 +@@ -229,6 +229,9 @@ + parameter. */ + bool has_shared; + ++ /* If TRUE, -pie is supported. */ ++ bool has_pie; ++ + /* If TRUE, build constructors. */ + bool build_constructors; + +diff '--color=auto' -urN a/ld/ldmain.c b/ld/ldmain.c +--- a/ld/ldmain.c 2022-07-08 11:46:48.000000000 +0200 ++++ b/ld/ldmain.c 2023-01-04 22:16:46.319346843 +0100 +@@ -315,6 +315,7 @@ + config.make_executable = true; + config.magic_demand_paged = true; + config.text_read_only = true; ++ config.has_pie = false; + config.print_map_discarded = true; + link_info.disable_target_specific_optimizations = -1; + +diff '--color=auto' -urN a/ld/lexsup.c b/ld/lexsup.c +--- a/ld/lexsup.c 2022-07-08 11:46:48.000000000 +0200 ++++ b/ld/lexsup.c 2023-01-04 22:17:19.218882047 +0100 +@@ -1286,6 +1286,8 @@ + if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET) + link_info.unresolved_syms_in_shared_libs = RM_IGNORE; + } ++ else if (config.has_pie) ++ link_info.type = type_pie; + else + einfo (_("%F%P: -shared not supported\n")); + break; diff --git a/patches/gcc-7.2.0-PS3.patch b/patches/gcc-7.2.0-PS3.patch new file mode 100644 index 000000000..28be00208 --- /dev/null +++ b/patches/gcc-7.2.0-PS3.patch @@ -0,0 +1,727 @@ +diff --git a/Makefile.in b/Makefile.in +index b824e0a0c..5bf0da25e 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -25734,7 +25734,6 @@ check-libiberty: + .PHONY: install-libiberty maybe-install-libiberty + maybe-install-libiberty: + @if libiberty +-maybe-install-libiberty: install-libiberty + + install-libiberty: installdirs + @: $(MAKE); $(unstage) +diff --git a/gcc/config.gcc b/gcc/config.gcc +index a9196cd26..f2a94403d 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2330,6 +2330,15 @@ pdp11-*-*) + # tmake_file="${tmake_file} rs6000/t-fprules" + # extra_headers= + # ;; ++powerpc64-ps3-elf) ++ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/default64.h" ++ tm_file="rs6000/biarch64.h ${tm_file} rs6000/cell64lv2.h" ++ if test x${enable_secureplt} = xyes; then ++ tm_file="rs6000/secureplt.h ${tm_file}" ++ fi ++ extra_options="${extra_options} rs6000/sysv4.opt" ++ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ++ ;; + powerpc-*-darwin*) + extra_options="${extra_options} rs6000/darwin.opt" + case ${target} in +diff --git a/gcc/config/rs6000/cell64lv2.h b/gcc/config/rs6000/cell64lv2.h +new file mode 100644 +index 000000000..86da868b5 +--- /dev/null ++++ b/gcc/config/rs6000/cell64lv2.h +@@ -0,0 +1,587 @@ ++/* Definitions of target machine for GNU compiler, ++ for 64 bit PowerPC linux. ++ Copyright (C) 2000-2017 Free Software Foundation, Inc. ++ ++ This file is part of GCC. ++ ++ GCC 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 3, or (at your ++ option) any later version. ++ ++ GCC 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. ++ ++ Under Section 7 of GPL version 3, you are granted additional ++ permissions described in the GCC Runtime Library Exception, version ++ 3.1, as published by the Free Software Foundation. ++ ++ You should have received a copy of the GNU General Public License and ++ a copy of the GCC Runtime Library Exception along with this program; ++ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++ . */ ++ ++#ifndef RS6000_BI_ARCH ++ ++#undef TARGET_64BIT ++#define TARGET_64BIT 1 ++ ++#define DEFAULT_ARCH64_P 1 ++#define RS6000_BI_ARCH_P 0 ++ ++#else ++ ++#define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT) ++#define RS6000_BI_ARCH_P 1 ++ ++#endif ++ ++#ifdef IN_LIBGCC2 ++#undef TARGET_64BIT ++#ifdef __powerpc64__ ++#define TARGET_64BIT 1 ++#else ++#define TARGET_64BIT 0 ++#endif ++#endif ++ ++#undef TARGET_AIX ++#define TARGET_AIX TARGET_64BIT ++ ++#ifdef HAVE_LD_NO_DOT_SYMS ++/* New ABI uses a local sym for the function entry point. */ ++extern int dot_symbols; ++#undef DOT_SYMBOLS ++#define DOT_SYMBOLS dot_symbols ++#endif ++ ++#undef TARGET_KEEP_LEAF_WHEN_PROFILED ++#define TARGET_KEEP_LEAF_WHEN_PROFILED rs6000_keep_leaf_when_profiled ++ ++#define TARGET_USES_LINUX64_OPT 1 ++#ifdef HAVE_LD_LARGE_TOC ++#undef TARGET_CMODEL ++#define TARGET_CMODEL rs6000_current_cmodel ++#define SET_CMODEL(opt) rs6000_current_cmodel = opt ++#else ++#define SET_CMODEL(opt) do {} while (0) ++#endif ++ ++#undef PROCESSOR_DEFAULT ++#define PROCESSOR_DEFAULT PROCESSOR_CELL ++#undef PROCESSOR_DEFAULT64 ++#define PROCESSOR_DEFAULT64 PROCESSOR_CELL ++ ++/* We don't need to generate entries in .fixup, except when ++ -mrelocatable or -mrelocatable-lib is given. */ ++#undef RELOCATABLE_NEEDS_FIXUP ++#define RELOCATABLE_NEEDS_FIXUP \ ++ (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE) ++ ++#undef RS6000_ABI_NAME ++#define RS6000_ABI_NAME "linux" ++ ++#define INVALID_64BIT "-m%s not supported in this configuration" ++#define INVALID_32BIT INVALID_64BIT ++ ++#ifdef LINUX64_DEFAULT_ABI_ELFv2 ++#define ELFv2_ABI_CHECK (rs6000_elf_abi != 1) ++#else ++#define ELFv2_ABI_CHECK (rs6000_elf_abi == 2) ++#endif ++ ++#undef SUBSUBTARGET_OVERRIDE_OPTIONS ++#define SUBSUBTARGET_OVERRIDE_OPTIONS \ ++ do \ ++ { \ ++ if (!global_options_set.x_rs6000_alignment_flags) \ ++ rs6000_alignment_flags = MASK_ALIGN_NATURAL; \ ++ if (rs6000_isa_flags & OPTION_MASK_64BIT) \ ++ { \ ++ if (DEFAULT_ABI != ABI_AIX) \ ++ { \ ++ rs6000_current_abi = ABI_AIX; \ ++ error (INVALID_64BIT, "call"); \ ++ } \ ++ dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \ ++ if (ELFv2_ABI_CHECK) \ ++ { \ ++ rs6000_current_abi = ABI_ELFv2; \ ++ if (dot_symbols) \ ++ error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ ++ } \ ++ if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \ ++ { \ ++ rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \ ++ error (INVALID_64BIT, "relocatable"); \ ++ } \ ++ if (rs6000_isa_flags & OPTION_MASK_EABI) \ ++ { \ ++ rs6000_isa_flags &= ~OPTION_MASK_EABI; \ ++ error (INVALID_64BIT, "eabi"); \ ++ } \ ++ if (TARGET_PROTOTYPE) \ ++ { \ ++ target_prototype = 0; \ ++ error (INVALID_64BIT, "prototype"); \ ++ } \ ++ if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ ++ { \ ++ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ ++ error ("-m64 requires a PowerPC64 cpu"); \ ++ } \ ++ if ((rs6000_isa_flags_explicit \ ++ & OPTION_MASK_MINIMAL_TOC) != 0) \ ++ { \ ++ if (global_options_set.x_rs6000_current_cmodel \ ++ && rs6000_current_cmodel != CMODEL_SMALL) \ ++ error ("-mcmodel incompatible with other toc options"); \ ++ SET_CMODEL (CMODEL_SMALL); \ ++ } \ ++ else \ ++ { \ ++ if (!global_options_set.x_rs6000_current_cmodel) \ ++ SET_CMODEL (CMODEL_SMALL); \ ++ if (rs6000_current_cmodel != CMODEL_SMALL) \ ++ { \ ++ if (!global_options_set.x_TARGET_NO_FP_IN_TOC) \ ++ TARGET_NO_FP_IN_TOC \ ++ = rs6000_current_cmodel == CMODEL_MEDIUM; \ ++ if (!global_options_set.x_TARGET_NO_SUM_IN_TOC) \ ++ TARGET_NO_SUM_IN_TOC = 0; \ ++ } \ ++ } \ ++ } \ ++ else \ ++ { \ ++ if (!RS6000_BI_ARCH_P) \ ++ error (INVALID_32BIT, "32"); \ ++ if (global_options_set.x_rs6000_current_cmodel) \ ++ { \ ++ SET_CMODEL (CMODEL_SMALL); \ ++ error (INVALID_32BIT, "cmodel"); \ ++ } \ ++ } \ ++ } \ ++ while (0) ++ ++#undef ASM_DEFAULT_SPEC ++#undef ASM_SPEC ++#undef LINK_SECURE_PLT_SPEC ++ ++#ifndef RS6000_BI_ARCH ++#define ASM_DEFAULT_SPEC "-mcell" ++#define ASM_SPEC "%(asm_spec64) %(asm_spec_common)" ++#define LINK_OS_LV2_SPEC "%(link_os_lv2_spec64)" ++#define LINK_SECURE_PLT_SPEC "" ++#else ++#if DEFAULT_ARCH64_P ++#define ASM_DEFAULT_SPEC "-mppc%{!m32:64}" ++#define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)" ++#define LINK_OS_LV2_SPEC "%{m32:%(link_os_lv2_spec32)}%{!m32:%(link_os_lv2_spec64)}" ++#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}" ++#else ++#define ASM_DEFAULT_SPEC "-mppc%{m64:64}" ++#define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)" ++#define LINK_OS_LV2_SPEC "%{!m64:%(link_os_lv2_spec32)}%{m64:%(link_os_lv2_spec64)}" ++#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}" ++#endif ++#endif ++ ++#define ASM_SPEC32 "-a32 \ ++%{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \ ++%{memb|msdata=eabi: -memb}" ++ ++#define ASM_SPEC64 "-a64" ++ ++#define ASM_SPEC_COMMON "%(asm_cpu) \ ++%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ ++ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) ++ ++#undef SUBSUBTARGET_EXTRA_SPECS ++#define SUBSUBTARGET_EXTRA_SPECS \ ++ { "asm_spec_common", ASM_SPEC_COMMON }, \ ++ { "asm_spec32", ASM_SPEC32 }, \ ++ { "asm_spec64", ASM_SPEC64 }, \ ++ { "link_os_lv2_spec32", LINK_OS_LV2_SPEC32 }, \ ++ { "link_os_lv2_spec64", LINK_OS_LV2_SPEC64 }, \ ++ { "lib_lv2", LIB_LV2_SPEC }, \ ++ { "startfile_lv2", STARTFILE_LV2_SPEC }, \ ++ { "endfile_lv2", ENDFILE_LV2_SPEC }, \ ++ { "link_start_lv2", LINK_START_LV2_SPEC }, \ ++ { "link_os_lv2", LINK_OS_LV2_SPEC }, \ ++ { "cpp_os_lv2", CPP_OS_LV2_SPEC }, \ ++ { "link_os_extra_spec32", LINK_OS_EXTRA_SPEC32 }, \ ++ { "link_os_extra_spec64", LINK_OS_EXTRA_SPEC64 }, \ ++ { "link_os_new_dtags", LINK_OS_NEW_DTAGS_SPEC }, \ ++ { "include_extra", INCLUDE_EXTRA_SPEC }, \ ++ { "dynamic_linker_prefix", DYNAMIC_LINKER_PREFIX } ++ ++/* Optional specs used for overriding the system include directory, default ++ -rpath links, and prefix for the dynamic linker. Normally, there are not ++ defined, but if the user configure with the --with-advance-toolchain= ++ option, the advance-toolchain.h file will override these. */ ++#ifndef INCLUDE_EXTRA_SPEC ++#define INCLUDE_EXTRA_SPEC "" ++#endif ++ ++#ifndef LINK_OS_EXTRA_SPEC32 ++#define LINK_OS_EXTRA_SPEC32 "" ++#endif ++ ++#ifndef LINK_OS_EXTRA_SPEC64 ++#define LINK_OS_EXTRA_SPEC64 "" ++#endif ++ ++#ifndef LINK_OS_NEW_DTAGS_SPEC ++#define LINK_OS_NEW_DTAGS_SPEC "" ++#endif ++ ++#ifndef DYNAMIC_LINKER_PREFIX ++#define DYNAMIC_LINKER_PREFIX "" ++#endif ++ ++#undef MULTILIB_DEFAULTS ++#if DEFAULT_ARCH64_P ++#define MULTILIB_DEFAULTS { "m64" } ++#else ++#define MULTILIB_DEFAULTS { "m32" } ++#endif ++ ++/* Split stack is only supported for 64 bit, and requires glibc >= 2.18. */ ++#if TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018 ++# ifndef RS6000_BI_ARCH ++# define TARGET_CAN_SPLIT_STACK ++# else ++# if DEFAULT_ARCH64_P ++/* Supported, and the default is -m64 */ ++# define TARGET_CAN_SPLIT_STACK_64BIT 1 ++# else ++/* Supported, and the default is -m32 */ ++# define TARGET_CAN_SPLIT_STACK_64BIT 0 ++# endif ++# endif ++#endif ++ ++#ifndef RS6000_BI_ARCH ++ ++/* 64-bit PowerPC Linux always has a TOC. */ ++#undef TARGET_TOC ++#define TARGET_TOC 1 ++ ++/* Some things from sysv4.h we don't do when 64 bit. */ ++#undef OPTION_RELOCATABLE ++#define OPTION_RELOCATABLE 0 ++#undef OPTION_EABI ++#define OPTION_EABI 0 ++#undef OPTION_PROTOTYPE ++#define OPTION_PROTOTYPE 0 ++#undef RELOCATABLE_NEEDS_FIXUP ++#define RELOCATABLE_NEEDS_FIXUP 0 ++ ++#endif ++ ++// TODO: Need to remove ? ++/* We use glibc _mcount for profiling. */ ++#define NO_PROFILE_COUNTERS 1 ++#define PROFILE_HOOK(LABEL) \ ++ do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0) ++ ++/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */ ++#undef ADJUST_FIELD_ALIGN ++#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \ ++ (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \ ++ ? 128 \ ++ : (TARGET_64BIT \ ++ && TARGET_ALIGN_NATURAL == 0 \ ++ && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \ ++ ? MIN ((COMPUTED), 32) \ ++ : (COMPUTED)) ++ ++/* PowerPC64 Linux increases natural record alignment to doubleword if ++ the first field is an FP double, only if in power alignment mode. */ ++#undef ROUND_TYPE_ALIGN ++#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \ ++ ((TARGET_64BIT \ ++ && (TREE_CODE (STRUCT) == RECORD_TYPE \ ++ || TREE_CODE (STRUCT) == UNION_TYPE \ ++ || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \ ++ && TARGET_ALIGN_NATURAL == 0) \ ++ ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \ ++ : MAX ((COMPUTED), (SPECIFIED))) ++ ++/* Use the default for compiling target libs. */ ++#ifdef IN_TARGET_LIBS ++#undef TARGET_ALIGN_NATURAL ++#define TARGET_ALIGN_NATURAL 1 ++#endif ++ ++/* Indicate that jump tables go in the text section. */ ++#undef JUMP_TABLES_IN_TEXT_SECTION ++#define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT ++ ++/* The linux ppc64 ABI isn't explicit on whether aggregates smaller ++ than a doubleword should be padded upward or downward. You could ++ reasonably assume that they follow the normal rules for structure ++ layout treating the parameter area as any other block of memory, ++ then map the reg param area to registers. i.e. pad upward. ++ Setting both of the following defines results in this behavior. ++ Setting just the first one will result in aggregates that fit in a ++ doubleword being padded downward, and others being padded upward. ++ Not a bad idea as this results in struct { int x; } being passed ++ the same way as an int. */ ++#define AGGREGATE_PADDING_FIXED TARGET_64BIT ++#define AGGREGATES_PAD_UPWARD_ALWAYS 0 ++ ++/* Specify padding for the last element of a block move between ++ registers and memory. FIRST is nonzero if this is the only ++ element. */ ++#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ ++ (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE)) ++ ++/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit ++ process. */ ++#define OS_MISSING_POWERPC64 !TARGET_64BIT ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ if (TARGET_64BIT) \ ++ { \ ++ builtin_define ("__PPU__"); \ ++ builtin_define ("__PPC__"); \ ++ builtin_define ("__PPC64__"); \ ++ builtin_define ("__lv2ppu__"); \ ++ builtin_define ("__powerpc__"); \ ++ builtin_define ("__powerpc64__"); \ ++ if (!DOT_SYMBOLS) \ ++ builtin_define ("_CALL_LINUX"); \ ++ builtin_assert ("cpu=powerpc64"); \ ++ builtin_assert ("machine=powerpc64"); \ ++ } \ ++ else \ ++ { \ ++ builtin_define_std ("PPC"); \ ++ builtin_define_std ("powerpc"); \ ++ builtin_assert ("cpu=powerpc"); \ ++ builtin_assert ("machine=powerpc"); \ ++ TARGET_OS_SYSV_CPP_BUILTINS (); \ ++ } \ ++ } \ ++ while (0) ++ ++#undef CPP_OS_DEFAULT_SPEC ++#define CPP_OS_DEFAULT_SPEC "%(cpp_os_lv2) %(include_extra)" ++ ++#undef LINK_SHLIB_SPEC ++#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" ++ ++#undef LIB_DEFAULT_SPEC ++#define LIB_DEFAULT_SPEC "%(lib_lv2)" ++ ++#undef STARTFILE_DEFAULT_SPEC ++#define STARTFILE_DEFAULT_SPEC "%(startfile_lv2)" ++ ++#undef ENDFILE_DEFAULT_SPEC ++#define ENDFILE_DEFAULT_SPEC "%(endfile_lv2)" ++ ++#undef LINK_START_DEFAULT_SPEC ++#define LINK_START_DEFAULT_SPEC "%(link_start_lv2)" ++ ++#undef LINK_OS_DEFAULT_SPEC ++#define LINK_OS_DEFAULT_SPEC "%(link_os_lv2)" ++ ++#define LIB_LV2_SPEC "-L %:getenv(PSL1GHT /ppu/lib) --start-group -lsysbase -lc -lrt -llv2 --end-group" ++ ++#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" ++ ++#define STARTFILE_LV2_SPEC "lv2-crti.o%s crtbegin.o%s lv2-crt0.o%s lv2-sprx.o%s" ++ ++#define ENDFILE_LV2_SPEC "crtend.o%s lv2-crtn.o%s" ++ ++#define LINK_START_LV2_SPEC "-T lv2.ld%s" ++ ++#define LINK_OS_LV2_SPEC32 "-m elf32ppc" ++#define LINK_OS_LV2_SPEC64 "-m elf64ppc" ++ ++#define CPP_OS_LV2_SPEC "-D__lv2ppu__ -ffunction-sections -fdata-sections" ++ ++#undef DEFAULT_ASM_ENDIAN ++#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) ++#define DEFAULT_ASM_ENDIAN " -mlittle" ++#define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ ++ " -m elf32lppclinux", \ ++ " -m elf32lppclinux") ++#define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \ ++ " -m elf64lppc", \ ++ " -m elf64lppc") ++#else ++#define DEFAULT_ASM_ENDIAN " -mbig" ++#define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ ++ " -m elf32lppclinux", \ ++ " -m elf32ppclinux") ++#define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \ ++ " -m elf64lppc", \ ++ " -m elf64ppc") ++#endif ++ ++#undef TOC_SECTION_ASM_OP ++#define TOC_SECTION_ASM_OP \ ++ (TARGET_64BIT \ ++ ? "\t.section\t\".toc\",\"aw\"" \ ++ : "\t.section\t\".got\",\"aw\"") ++ ++#undef MINIMAL_TOC_SECTION_ASM_OP ++#define MINIMAL_TOC_SECTION_ASM_OP \ ++ (TARGET_64BIT \ ++ ? "\t.section\t\".toc1\",\"aw\"" \ ++ : (flag_pic \ ++ ? "\t.section\t\".got2\",\"aw\"" \ ++ : "\t.section\t\".got1\",\"aw\"")) ++ ++/* Must be at least as big as our pointer type. */ ++#undef SIZE_TYPE ++#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 32 ++ ++#undef RS6000_MCOUNT ++#define RS6000_MCOUNT "_mcount" ++ ++#ifdef __powerpc64__ ++/* _init and _fini functions are built from bits spread across many ++ object files, each potentially with a different TOC pointer. For ++ that reason, place a nop after the call so that the linker can ++ restore the TOC pointer if a TOC adjusting call stub is needed. */ ++#if DOT_SYMBOLS ++#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ ++ asm (SECTION_OP "\n" \ ++" bl ." #FUNC "\n" \ ++" nop\n" \ ++" .previous"); ++#else ++#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ ++ asm (SECTION_OP "\n" \ ++" bl " #FUNC "\n" \ ++" nop\n" \ ++" .previous"); ++#endif ++#endif ++ ++/* FP save and restore routines. */ ++#undef SAVE_FP_PREFIX ++#define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_") ++#undef SAVE_FP_SUFFIX ++#define SAVE_FP_SUFFIX "" ++#undef RESTORE_FP_PREFIX ++#define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_") ++#undef RESTORE_FP_SUFFIX ++#define RESTORE_FP_SUFFIX "" ++ ++/* Dwarf2 debugging. */ ++#undef PREFERRED_DEBUGGING_TYPE ++#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ++ ++/* This is how to declare the size of a function. */ ++#undef ASM_DECLARE_FUNCTION_SIZE ++#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ ++ do \ ++ { \ ++ if (!flag_inhibit_size_directive) \ ++ { \ ++ fputs ("\t.size\t", (FILE)); \ ++ if (TARGET_64BIT && DOT_SYMBOLS) \ ++ putc ('.', (FILE)); \ ++ assemble_name ((FILE), (FNAME)); \ ++ fputs (",.-", (FILE)); \ ++ rs6000_output_function_entry (FILE, FNAME); \ ++ putc ('\n', (FILE)); \ ++ } \ ++ } \ ++ while (0) ++ ++/* Return nonzero if this entry is to be written into the constant ++ pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF ++ or a CONST containing one of them. If -mfp-in-toc (the default), ++ we also do this for floating-point constants. We actually can only ++ do this if the FP formats of the target and host machines are the ++ same, but we can't check that since not every file that uses ++ the macros includes real.h. We also do this when we can write the ++ entry into the TOC and the entry is not larger than a TOC entry. */ ++ ++#undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P ++#define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ ++ (TARGET_TOC \ ++ && (GET_CODE (X) == SYMBOL_REF \ ++ || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \ ++ && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \ ++ || GET_CODE (X) == LABEL_REF \ ++ || (GET_CODE (X) == CONST_INT \ ++ && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \ ++ || (GET_CODE (X) == CONST_DOUBLE \ ++ && ((TARGET_64BIT \ ++ && (TARGET_MINIMAL_TOC \ ++ || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ ++ && ! TARGET_NO_FP_IN_TOC))) \ ++ || (!TARGET_64BIT \ ++ && !TARGET_NO_FP_IN_TOC \ ++ && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ ++ && BITS_PER_WORD == HOST_BITS_PER_INT))))) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#undef ASM_PREFERRED_EH_DATA_FORMAT ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ++ (TARGET_64BIT || flag_pic \ ++ ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \ ++ | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \ ++ : DW_EH_PE_absptr) ++ ++/* For backward compatibility, we must continue to use the AIX ++ structure return convention. */ ++#undef DRAFT_V4_STRUCT_RET ++#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT) ++ ++#ifdef TARGET_LIBC_PROVIDES_SSP ++/* ppc32 glibc provides __stack_chk_guard in -0x7008(2), ++ ppc64 glibc provides it at -0x7010(13). */ ++#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) ++#endif ++ ++#define POWERPC_CELL64LV2 ++ ++#define POINTERS_EXTEND_UNSIGNED 1 ++ ++/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */ ++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128 ++#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128 ++#endif ++ ++/* Static stack checking is supported by means of probes. */ ++#define STACK_CHECK_STATIC_BUILTIN 1 ++ ++/* The default value isn't sufficient in 64-bit mode. */ ++#define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024) ++ ++/* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends ++ on glibc 2.19 or greater. */ ++#if TARGET_GLIBC_MAJOR > 2 \ ++ || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19) ++#define RS6000_GLIBC_ATOMIC_FENV 1 ++#endif ++ ++/* The IEEE 128-bit emulator is only built on Linux systems. Flag that we ++ should enable the type handling for KFmode on VSX systems even if we are not ++ enabling the __float128 keyword. */ ++#undef TARGET_FLOAT128_ENABLE_TYPE ++#define TARGET_FLOAT128_ENABLE_TYPE 1 +diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c +index db9136f26..3a29d4723 100644 +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -1349,6 +1349,12 @@ rtl_opt_pass *make_pass_analyze_swaps (gcc::context*); + static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused)); + static tree rs6000_fold_builtin (tree, int, tree *, bool); + ++#ifdef POWERPC_CELL64LV2 ++ ++static bool rs6000_cell64lv2_valid_pointer_mode(enum machine_mode); ++ ++#endif ++ + /* Hash table stuff for keeping track of TOC entries. */ + + struct GTY((for_user)) toc_hash_struct +@@ -43333,7 +43339,19 @@ rs6000_optab_supported_p (int op, machine_mode mode1, machine_mode, + return true; + } + } +- ++ ++#ifdef POWERPC_CELL64LV2 ++ ++#undef TARGET_VALID_POINTER_MODE ++#define TARGET_VALID_POINTER_MODE rs6000_cell64lv2_valid_pointer_mode ++ ++static bool rs6000_cell64lv2_valid_pointer_mode(enum machine_mode mode) ++{ ++ return (mode == SImode || (TARGET_64BIT && mode == DImode) || mode == ptr_mode || mode == Pmode); ++} ++ ++#endif ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-rs6000.h" +diff --git a/gcc/configure b/gcc/configure +index 50ccc2a0f..6b503988a 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -28598,12 +28598,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" >>confdefs.h + esac + + case "$target:$tm_file" in +- powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) ++ powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) + case "$target" in + *le-*-linux*) + emul_name="-melf64lppc" + ;; +- *-*-linux*) ++ *-*-linux* | *-ps3-elf*) + emul_name="-melf64ppc" + ;; + *-*-freebsd*) +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 1d5a9d7c6..e568cb3f8 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5462,12 +5462,12 @@ EOF + esac + + case "$target:$tm_file" in +- powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) ++ powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc64-ps3-elf* | powerpc*-*-linux*rs6000/biarch64.h*) + case "$target" in + *le-*-linux*) + emul_name="-melf64lppc" + ;; +- *-*-linux*) ++ *-*-linux* | *-ps3-elf*) + emul_name="-melf64ppc" + ;; + *-*-freebsd*) +diff --git a/libcpp/lex.c b/libcpp/lex.c +index 9edd2a6af..15585ff93 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) + { + vc m_nl, m_cr, m_bs, m_qm; + +- data = *((const vc *)s); ++ data = __builtin_vec_vsx_ld (0, s); + s += 16; + + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); +diff --git a/libgcc/config.host b/libgcc/config.host +index bedcf1017..8d6c8feff 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1043,6 +1043,8 @@ powerpc-*-rtems*) + tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit" + extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" + ;; ++powerpc64-ps3-elf) ++ ;; + powerpc*-*-linux*) + 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" + tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000" diff --git a/scripts/001-binutils-PPU.sh b/scripts/001-binutils-PPU.sh index 14e295cff..75b932fb1 100755 --- a/scripts/001-binutils-PPU.sh +++ b/scripts/001-binutils-PPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # binutils-PPU.sh by Naomi Peori (naomi@peori.ca) -BINUTILS="binutils-2.22" +BINUTILS="binutils-2.24" if [ ! -d ${BINUTILS} ]; then @@ -16,7 +16,7 @@ if [ ! -d ${BINUTILS} ]; then tar xfvj ${BINUTILS}.tar.bz2 ## Patch the source code. - cat ../patches/${BINUTILS}-PS3.patch | patch -p1 -d ${BINUTILS} + cat ../patches/${BINUTILS}-PS3-PPU.patch | patch -p1 -d ${BINUTILS} ## Replace config.guess and config.sub cp config.guess config.sub ${BINUTILS} @@ -41,6 +41,7 @@ cd ${BINUTILS}/build-ppu --disable-dependency-tracking \ --disable-werror \ --enable-64-bit-bfd \ + --enable-lto \ --with-gcc \ --with-gnu-as \ --with-gnu-ld diff --git a/scripts/005-binutils-SPU.sh b/scripts/005-binutils-SPU.sh index 0c993d411..11524598c 100755 --- a/scripts/005-binutils-SPU.sh +++ b/scripts/005-binutils-SPU.sh @@ -16,7 +16,7 @@ if [ ! -d ${BINUTILS} ]; then tar xfvj ${BINUTILS}.tar.bz2 ## Patch the source code. - cat ../patches/${BINUTILS}-PS3.patch | patch -p1 -d ${BINUTILS} + cat ../patches/${BINUTILS}-PS3-SPU.patch | patch -p1 -d ${BINUTILS} ## Replace config.guess and config.sub cp config.guess config.sub ${BINUTILS} @@ -42,7 +42,8 @@ cd ${BINUTILS}/build-spu --disable-werror \ --with-gcc \ --with-gnu-as \ - --with-gnu-ld + --with-gnu-ld \ + --enable-lto ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? diff --git a/scripts/006-gcc-newlib-SPU.sh b/scripts/006-gcc-newlib-SPU.sh index 22aafa443..014ef3332 100755 --- a/scripts/006-gcc-newlib-SPU.sh +++ b/scripts/006-gcc-newlib-SPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # gcc-newlib-SPU.sh by Naomi Peori (naomi@peori.ca) -GCC="gcc-9.5.0" +GCC="gcc-7.2.0" NEWLIB="newlib-1.20.0" if [ ! -d ${GCC} ]; then @@ -15,7 +15,7 @@ if [ ! -d ${GCC} ]; then rm -Rf ${NEWLIB} && tar xfvz ${NEWLIB}.tar.gz ## Patch the source code. - cat ../patches/${GCC}-PS3-SPU.patch | patch -p1 -d ${GCC} + cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC} cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB} ## Enter the source code directory. From 4a6b6f7df69b53f72ef0bda227ffd0cd068d56f0 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 16:52:39 -0300 Subject: [PATCH 017/136] add c++ lang for spu-gcc --- scripts/006-gcc-newlib-SPU.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/006-gcc-newlib-SPU.sh b/scripts/006-gcc-newlib-SPU.sh index 014ef3332..bdd56b27c 100755 --- a/scripts/006-gcc-newlib-SPU.sh +++ b/scripts/006-gcc-newlib-SPU.sh @@ -45,8 +45,9 @@ cd ${GCC}/build-spu ## Configure the build. unset CFLAGS CXXFLAGS LDFLAGS +CFLAGS_FOR_TARGET="-Os -fpic -ffast-math -ftree-vectorize -funroll-loops -fschedule-insns -mdual-nops -mwarn-reloc" \ ../configure --prefix="$PS3DEV/spu" --target="spu" \ - --enable-languages="c" \ + --enable-languages="c,c++" \ --enable-lto \ --enable-threads \ --enable-newlib-multithread \ From 3be7a7d62dbdb4d9af74b7971a5909147ab405ae Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 17:17:14 -0300 Subject: [PATCH 018/136] alias sed='gsed' for mac --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3e3e68a21..e10930ace 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -26,7 +26,8 @@ jobs: if: matrix.os == 'macos-latest' run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed + alias sed='gsed' # python2 curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / From e489a569f9b83f57741e53eb3c48104d6e1e5f70 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 17:30:09 -0300 Subject: [PATCH 019/136] gsed alias for macOS --- scripts/002-gcc-newlib-PPU.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index d75fcbe29..b961706a9 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -66,6 +66,11 @@ CXXFLAGS="$CXXFLAGS -Werror=format-security" --disable-shared \ --disable-win32-registry + +# Check if the operating system is macOS +if [ "$(uname)" = "Darwin" ]; then + alias sed='gsed' +fi ## TODO - Move it to patch file sed -i 's/ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE/if 0/' ../libstdc++-v3/src/filesystem/dir-common.h From 4fc062a0be8882caf966aa86b7ef60864da2eba4 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 18:16:55 -0300 Subject: [PATCH 020/136] add python2-dev and libssl-dev for psl1ght build --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e10930ace..b4741ef58 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,7 +20,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt update - sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2 subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config + sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev - name: Install macOS requirements if: matrix.os == 'macos-latest' From 9cb47c7bd87a398d3a4745f97301bcda72dabbfd Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 18:56:03 -0300 Subject: [PATCH 021/136] [gha] only ubuntu for while --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b4741ef58..36ce75643 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + # os: [macos-latest, ubuntu-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v2 From b26dbb0ddad1e0e210585ad73d5d49021a0c5779 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 19:11:38 -0300 Subject: [PATCH 022/136] [gha] set default shell to bash --- .github/workflows/deploy.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 36ce75643..c31940a8e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,8 +11,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - # os: [macos-latest, ubuntu-latest] - os: [ubuntu-latest] + os: [macos-latest, ubuntu-latest] + defaults: + run: + shell: bash steps: - uses: actions/checkout@v2 From 10609f09e12bb3eb0aa84cfca522df651c956d1a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 19:29:17 -0300 Subject: [PATCH 023/136] [gha] use ~/.bashrc --- .github/workflows/deploy.yaml | 6 ++++-- scripts/002-gcc-newlib-PPU.sh | 7 +------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c31940a8e..6fe09360d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -15,6 +15,8 @@ jobs: defaults: run: shell: bash + env: + BASH_ENV: "~/.bashrc" steps: - uses: actions/checkout@v2 @@ -29,8 +31,8 @@ jobs: if: matrix.os == 'macos-latest' run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed - alias sed='gsed' + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed python + echo "alias sed='gsed'" >> ~/.bashrc # python2 curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index b961706a9..f58a584ed 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # gcc-newlib-PPU.sh by Naomi Peori (naomi@peori.ca) GCC="gcc-13.2.0" @@ -66,11 +66,6 @@ CXXFLAGS="$CXXFLAGS -Werror=format-security" --disable-shared \ --disable-win32-registry - -# Check if the operating system is macOS -if [ "$(uname)" = "Darwin" ]; then - alias sed='gsed' -fi ## TODO - Move it to patch file sed -i 's/ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE/if 0/' ../libstdc++-v3/src/filesystem/dir-common.h From 2a647601fa4d7de647c15b77631a7aae8cc8da28 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 19:35:51 -0300 Subject: [PATCH 024/136] [gha] mac already have python installed --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 6fe09360d..f50a38123 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -31,7 +31,7 @@ jobs: if: matrix.os == 'macos-latest' run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed python + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc # python2 curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg From 1e9664296691f88090dff9722391c051abf4dbec Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 19:51:28 -0300 Subject: [PATCH 025/136] [gha] get current arch --- .github/workflows/deploy.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f50a38123..78deb63d7 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [ubuntu-latest] defaults: run: shell: bash @@ -64,6 +64,10 @@ jobs: id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Get current arch + id: arch + run: echo "::set-output name=arch::$(uname -m)" + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -71,7 +75,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{matrix.os}}-${{ steps.slug.outputs.sha8 }} - release_name: ps3dev ${{matrix.os}} (${{steps.date.outputs.date}}) + release_name: ps3dev ${{matrix.os}} ${{steps.arch.outputs.arch}} (${{steps.date.outputs.date}}) draft: false prerelease: false @@ -83,5 +87,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./ps3dev.tar.gz - asset_name: ps3dev-${{matrix.os}}-${{steps.date.outputs.date}}.tar.gz + asset_name: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz asset_content_type: application/gzip \ No newline at end of file From a3f0d38bc07c5afd23fd76029c8a5cca97450218 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 22:55:37 -0300 Subject: [PATCH 026/136] [gha] checkout@v4 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 78deb63d7..74e0e99f3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -19,7 +19,7 @@ jobs: BASH_ENV: "~/.bashrc" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Ubuntu requirements if: matrix.os == 'ubuntu-latest' From 6ccca0894a8c9db6a27fef82ceb0d55eae9ff0f7 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 22:56:10 -0300 Subject: [PATCH 027/136] [gha] replace apple python for python@3.12 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 74e0e99f3..1a6b24359 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -31,7 +31,7 @@ jobs: if: matrix.os == 'macos-latest' run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config python@3.12 gnu-sed echo "alias sed='gsed'" >> ~/.bashrc # python2 curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg From c54ad2051be662e71f6c0fb4a53f220d928aea9f Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 22:56:44 -0300 Subject: [PATCH 028/136] binutils-2.42 --- scripts/001-binutils-PPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/001-binutils-PPU.sh b/scripts/001-binutils-PPU.sh index 75b932fb1..6f2abaa07 100755 --- a/scripts/001-binutils-PPU.sh +++ b/scripts/001-binutils-PPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # binutils-PPU.sh by Naomi Peori (naomi@peori.ca) -BINUTILS="binutils-2.24" +BINUTILS="binutils-2.42" if [ ! -d ${BINUTILS} ]; then From fc9713865b36ca3eca14da24500239870c446fb5 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 22:57:28 -0300 Subject: [PATCH 029/136] ppu gcc remove -Werror=format-security --- scripts/002-gcc-newlib-PPU.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index f58a584ed..0a2682108 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -47,8 +47,8 @@ cd ${GCC}/build-ppu # Avoid breakage -CFLAGS="$CFLAGS -Werror=format-security" -CXXFLAGS="$CXXFLAGS -Werror=format-security" +CFLAGS="${CFLAGS/-Werror=format-security/}" +CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" ../configure --prefix="$PS3DEV/ppu" --target="powerpc64-ps3-elf" \ --with-cpu="cell" \ --with-newlib \ From dad8ba2efec84fc7af9299cfd55d2cc8d33062ea Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 5 Mar 2024 23:46:30 -0300 Subject: [PATCH 030/136] [ppu] avoiding switch case duplication on dir-common.h --- patches/gcc-13.2.0-PS3-PPU.patch | 62 ++++++++++++++++++++++---------- scripts/002-gcc-newlib-PPU.sh | 3 -- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/patches/gcc-13.2.0-PS3-PPU.patch b/patches/gcc-13.2.0-PS3-PPU.patch index 2bc8eeb59..e4d00a592 100644 --- a/patches/gcc-13.2.0-PS3-PPU.patch +++ b/patches/gcc-13.2.0-PS3-PPU.patch @@ -1,20 +1,9 @@ # Original from https://github.com/ps3dev/ps3toolchain # Updated to gcc 9.5.0 by Darjan Krijan [https://disc-kuraudo.eu] # Updated to gcc 13.2.0 by luizfernandonb -diff --git a/Makefile.in b/Makefile.in -index 06a9398e172..7419f7ed67a 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -28118,7 +28118,6 @@ check-libiberty: - .PHONY: install-libiberty maybe-install-libiberty - maybe-install-libiberty: - @if libiberty --maybe-install-libiberty: install-libiberty - - install-libiberty: installdirs - @: $(MAKE); $(unstage) +# Updated to gcc 13.2.0 by humbertodias diff --git a/gcc/config.gcc b/gcc/config.gcc -index 648b3dc2110..650d65fe28d 100644 +index 648b3dc..650d65f 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2863,6 +2863,15 @@ pdp11-*-*) @@ -35,7 +24,7 @@ index 648b3dc2110..650d65fe28d 100644 case ${target} in diff --git a/gcc/config/rs6000/cell64lv2.h b/gcc/config/rs6000/cell64lv2.h new file mode 100644 -index 00000000000..79a09605757 +index 0000000..4a34fca --- /dev/null +++ b/gcc/config/rs6000/cell64lv2.h @@ -0,0 +1,583 @@ @@ -624,7 +613,7 @@ index 00000000000..79a09605757 +#define TARGET_FLOAT128_ENABLE_TYPE 1 \ No newline at end of file diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc -index e5ceff3a61b..152b1191490 100644 +index 196bcbe..11430b8 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -1762,6 +1762,17 @@ static const struct attribute_spec rs6000_attribute_table[] = @@ -655,10 +644,10 @@ index e5ceff3a61b..152b1191490 100644 } if (OPTION_SET_P (rs6000_current_cmodel)) diff --git a/gcc/configure b/gcc/configure -index dec2eca1a45..bcfdcffb950 100755 +index c7b26d1..85e83d3 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -30853,12 +30853,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" >>confdefs.h +@@ -30787,12 +30787,12 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" >>confdefs.h esac case "$target:$tm_file" in @@ -674,7 +663,7 @@ index dec2eca1a45..bcfdcffb950 100755 ;; *le-*-freebsd*) diff --git a/libgcc/config.host b/libgcc/config.host -index 9d7212028d0..c2b3bb8ac28 100644 +index 9d72120..c2b3bb8 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1224,6 +1224,8 @@ powerpc-*-rtems*) @@ -686,3 +675,40 @@ index 9d7212028d0..c2b3bb8ac28 100644 powerpc*-*-linux*) 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" tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000" +diff --git a/libstdc++-v3/src/filesystem/dir-common.h b/libstdc++-v3/src/filesystem/dir-common.h +index af51375..3aedb59 100644 +--- a/libstdc++-v3/src/filesystem/dir-common.h ++++ b/libstdc++-v3/src/filesystem/dir-common.h +@@ -272,20 +272,12 @@ get_file_type(const std::filesystem::__gnu_posix::dirent& d [[gnu::unused]]) + #ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE + switch (d.d_type) + { +- case DT_BLK: +- return file_type::block; +- case DT_CHR: +- return file_type::character; + case DT_DIR: + return file_type::directory; +- case DT_FIFO: +- return file_type::fifo; + case DT_LNK: + return file_type::symlink; + case DT_REG: + return file_type::regular; +- case DT_SOCK: +- return file_type::socket; + case DT_UNKNOWN: + return file_type::unknown; + default: +diff --git a/Makefile.in b/Makefile.in +index 06a9398..7419f7e 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -28118,7 +28118,6 @@ check-libiberty: + .PHONY: install-libiberty maybe-install-libiberty + maybe-install-libiberty: + @if libiberty +-maybe-install-libiberty: install-libiberty + + install-libiberty: installdirs + @: $(MAKE); $(unstage) diff --git a/scripts/002-gcc-newlib-PPU.sh b/scripts/002-gcc-newlib-PPU.sh index 0a2682108..62a6c0703 100755 --- a/scripts/002-gcc-newlib-PPU.sh +++ b/scripts/002-gcc-newlib-PPU.sh @@ -66,9 +66,6 @@ CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" --disable-shared \ --disable-win32-registry -## TODO - Move it to patch file -sed -i 's/ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE/if 0/' ../libstdc++-v3/src/filesystem/dir-common.h - ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? if [ ! -z $ret ]; then PROCS=4; fi From 14c882c19a53f81934034276f36a45621db1f159 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 00:19:21 -0300 Subject: [PATCH 031/136] [spu] gcc-9.5.0 --- scripts/006-gcc-newlib-SPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/006-gcc-newlib-SPU.sh b/scripts/006-gcc-newlib-SPU.sh index bdd56b27c..2791cad3d 100755 --- a/scripts/006-gcc-newlib-SPU.sh +++ b/scripts/006-gcc-newlib-SPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # gcc-newlib-SPU.sh by Naomi Peori (naomi@peori.ca) -GCC="gcc-7.2.0" +GCC="gcc-9.5.0" NEWLIB="newlib-1.20.0" if [ ! -d ${GCC} ]; then From ba86afaa30f625a4734d3426f87a0b9cce4d648b Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 00:19:32 -0300 Subject: [PATCH 032/136] Revert "binutils-2.42" This reverts commit c54ad2051be662e71f6c0fb4a53f220d928aea9f. --- scripts/001-binutils-PPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/001-binutils-PPU.sh b/scripts/001-binutils-PPU.sh index 6f2abaa07..75b932fb1 100755 --- a/scripts/001-binutils-PPU.sh +++ b/scripts/001-binutils-PPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # binutils-PPU.sh by Naomi Peori (naomi@peori.ca) -BINUTILS="binutils-2.42" +BINUTILS="binutils-2.24" if [ ! -d ${BINUTILS} ]; then From 75b61972de80b402562f8cd793f9baadf037b645 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 00:49:41 -0300 Subject: [PATCH 033/136] [ppu] binutils-2.42 --- scripts/001-binutils-PPU.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/scripts/001-binutils-PPU.sh b/scripts/001-binutils-PPU.sh index 75b932fb1..eb56593c1 100755 --- a/scripts/001-binutils-PPU.sh +++ b/scripts/001-binutils-PPU.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # binutils-PPU.sh by Naomi Peori (naomi@peori.ca) -BINUTILS="binutils-2.24" +BINUTILS="binutils-2.42" if [ ! -d ${BINUTILS} ]; then @@ -34,19 +34,20 @@ fi cd ${BINUTILS}/build-ppu ## Configure the build. +unset LDFLAGS ../configure --prefix="$PS3DEV/ppu" --target="powerpc64-ps3-elf" \ - --disable-nls \ - --disable-shared \ - --disable-debug \ - --disable-dependency-tracking \ - --disable-werror \ - --enable-64-bit-bfd \ + --with-gcc \ + --with-gnu-as \ + --with-gnu-ld \ + --enable-64-bit-bfd \ --enable-lto \ - --with-gcc \ - --with-gnu-as \ - --with-gnu-ld + --disable-nls \ + --disable-shared \ + --disable-debug \ + --disable-dependency-tracking \ + --disable-werror ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? if [ ! -z $ret ]; then PROCS=4; fi -${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=host-libs/lib install +${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=`pwd`/host-libs/lib install From df37178a023f4d85361008a514c5e9819edac06e Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 01:25:03 -0300 Subject: [PATCH 034/136] [ci] add macos-latest --- .github/workflows/deploy.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1a6b24359..dac2ea1c6 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [macos-latest, ubuntu-latest] defaults: run: shell: bash @@ -33,9 +33,6 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config python@3.12 gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - # python2 - curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg - sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / - name: Runs all the stages in the shell run: | From a38290b187fc823ddd8d425c0213152356bebeaf Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 01:30:28 -0300 Subject: [PATCH 035/136] [ci-mac] remove python --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index dac2ea1c6..efd4be85f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -31,7 +31,7 @@ jobs: if: matrix.os == 'macos-latest' run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config python@3.12 gnu-sed + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - name: Runs all the stages in the shell From a4ef882019715e690bc93527088be2105f72c17d Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 01:35:21 -0300 Subject: [PATCH 036/136] [ci-mac] add python2 manually --- .github/workflows/deploy.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index efd4be85f..321844b5f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -33,6 +33,9 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc + # python2 + curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg + installer -pkg python-2.7.18-macosx10.9.pkg -target / - name: Runs all the stages in the shell run: | From f1e532fc52081b7ff8112f368b47cb36ce0ddc97 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 01:38:37 -0300 Subject: [PATCH 037/136] [ci-mac] sudo required --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 321844b5f..edfa3ec68 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -35,7 +35,7 @@ jobs: echo "alias sed='gsed'" >> ~/.bashrc # python2 curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg - installer -pkg python-2.7.18-macosx10.9.pkg -target / + sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / - name: Runs all the stages in the shell run: | From 98a03e51308e5ba53f0abaae392ec791af60b0cd Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 02:01:14 -0300 Subject: [PATCH 038/136] [docker] update ubuntu to 24.04 the last LTS --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4052d3d62..ed16fe466 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,20 @@ -FROM ubuntu:xenial +FROM ubuntu:24.04 LABEL maintainer="miigotu@gmail.com" ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin +ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:$PS3DEV/portlibs/ppu/lib/package ENV DEBIAN_FRONTEND=noninteractive RUN \ - apt-get -y update && \ - apt-get -y install \ - autoconf bison build-essential ca-certificates flex git libelf-dev\ - libgmp-dev libncurses5-dev libssl-dev libtool-bin pkg-config python-dev \ - texinfo wget zlib1g-dev && \ - apt-get -y clean autoclean autoremove && \ - rm -rf /var/lib/{apt,dpkg,cache,log}/ + apt -y update && \ + apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ + ca-certificates flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ + libtool libtool-bin make patch pkg-config python-dev-is-python3 texinfo wget xz-utils zlib1g-dev && \ + apt -y clean autoclean autoremove && \ + rm -rf /var/lib/{apt,dpkg,cache,log} RUN mkdir /build WORKDIR /build From eec7d6bf3ea82414deee7ad12e0a2d12d2f858bd Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 03:22:31 -0300 Subject: [PATCH 039/136] [spu] enable GWINSZ_IN_SYS_IOCTL using mac compiler --- scripts/007-gdb-SPU.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/007-gdb-SPU.sh b/scripts/007-gdb-SPU.sh index 8e227156f..7e0657731 100755 --- a/scripts/007-gdb-SPU.sh +++ b/scripts/007-gdb-SPU.sh @@ -34,6 +34,12 @@ fi cd ${GDB}/build-spu ## Configure the build. + +# TODO - Move it to patch file +if [ "$(uname -s)" = "Darwin" ]; then +sed -i 's/#undef GWINSZ_IN_SYS_IOCTL/#define GWINSZ_IN_SYS_IOCTL/' ../readline/config.h.in +fi + ../configure --prefix="$PS3DEV/spu" --target="spu" \ --disable-nls \ --disable-sim \ @@ -42,4 +48,4 @@ cd ${GDB}/build-spu ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$? if [ ! -z $ret ]; then PROCS=4; fi -${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=host-libs/lib install +${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=`pwd`/host-libs/lib install From 9b064aff8b9f2d91ba727866dd2befaeeef03dc2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 03:45:07 -0300 Subject: [PATCH 040/136] [spu-gdb] moving fix for mac to patch file --- patches/gdb-8.3.1-PS3.patch | 219 ++++++++++++++++++++---------------- scripts/007-gdb-SPU.sh | 5 - 2 files changed, 122 insertions(+), 102 deletions(-) diff --git a/patches/gdb-8.3.1-PS3.patch b/patches/gdb-8.3.1-PS3.patch index 979fa68ea..b2f3a1169 100644 --- a/patches/gdb-8.3.1-PS3.patch +++ b/patches/gdb-8.3.1-PS3.patch @@ -1,5 +1,48 @@ +# Updated for mac gdb 8.3.1-PS3 by humbertodias +diff --git a/gdb/Makefile.in b/gdb/Makefile.in +index 5614cc3386c..a7942e6c37f 100644 +--- a/gdb/Makefile.in ++++ b/gdb/Makefile.in +@@ -1100,6 +1100,7 @@ COMMON_SFILES = \ + remote-fileio.c \ + remote-notif.c \ + reverse.c \ ++ run-on-main-thread.c \ + rust-lang.c \ + sentinel-frame.c \ + ser-event.c \ +@@ -1362,6 +1363,7 @@ HFILES_NO_SRCDIR = \ + riscv-tdep.h \ + rs6000-aix-tdep.h \ + rs6000-tdep.h \ ++ run-on-main-thread.h \ + s390-linux-tdep.h \ + s390-tdep.h \ + score-tdep.h \ +diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py +index 3d662a7d3f1..04b9e49c229 100644 +--- a/gdb/python/lib/gdb/command/prompt.py ++++ b/gdb/python/lib/gdb/command/prompt.py +@@ -45,7 +45,7 @@ The currently defined substitutions are: + self.hook_set = False + + def get_show_string (self, pvalue): +- if self.value is not '': ++ if self.value: + return "The extended prompt is: " + self.value + else: + return "The extended prompt is not set." +@@ -57,7 +57,7 @@ The currently defined substitutions are: + return "" + + def before_prompt_hook(self, current): +- if self.value is not '': ++ if self.value: + return gdb.prompt.substitute_prompt(self.value) + else: + return None diff --git a/gdb/python/python.c b/gdb/python/python.c -index 67f362b852d0..4bdd2201abc3 100644 +index c23db2c1261..422b61bedf6 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -28,14 +28,13 @@ @@ -18,7 +61,7 @@ index 67f362b852d0..4bdd2201abc3 100644 /* Declared constants and enum for python stack printing. */ static const char python_excp_none[] = "none"; -@@ -228,13 +227,37 @@ +@@ -228,13 +227,37 @@ gdbpy_enter::~gdbpy_enter () m_error->restore (); @@ -57,7 +100,7 @@ index 67f362b852d0..4bdd2201abc3 100644 /* Set the quit flag. */ static void -@@ -248,6 +271,10 @@ +@@ -248,6 +271,10 @@ gdbpy_set_quit_flag (const struct extension_language_defn *extlang) static int gdbpy_check_quit_flag (const struct extension_language_defn *extlang) { @@ -68,7 +111,7 @@ index 67f362b852d0..4bdd2201abc3 100644 return PyOS_InterruptOccurred (); } -@@ -942,60 +969,54 @@ +@@ -942,60 +969,54 @@ gdbpy_source_script (const struct extension_language_defn *extlang, /* A single event. */ struct gdbpy_event { @@ -81,25 +124,20 @@ index 67f362b852d0..4bdd2201abc3 100644 + : m_func (func.release ()) + { + } -+ + +-/* All pending events. */ +-static struct gdbpy_event *gdbpy_event_list; +-/* The final link of the event list. */ +-static struct gdbpy_event **gdbpy_event_list_end; + gdbpy_event (gdbpy_event &&other) + : m_func (other.m_func) + { + other.m_func = nullptr; + } --/* All pending events. */ --static struct gdbpy_event *gdbpy_event_list; --/* The final link of the event list. */ --static struct gdbpy_event **gdbpy_event_list_end; -- -/* So that we can wake up the main thread even when it is blocked in - poll(). */ -static struct serial_event *gdbpy_serial_event; -- --/* The file handler callback. This reads from the internal pipe, and -- then processes the Python event queue. This will always be run in -- the main gdb thread. */ + gdbpy_event (const gdbpy_event &other) + : m_func (other.m_func) + { @@ -107,23 +145,29 @@ index 67f362b852d0..4bdd2201abc3 100644 + Py_XINCREF (m_func); + } --static void --gdbpy_run_events (int error, gdb_client_data client_data) --{ -- gdbpy_enter enter_py (get_current_arch (), current_language); +-/* The file handler callback. This reads from the internal pipe, and +- then processes the Python event queue. This will always be run in +- the main gdb thread. */ + ~gdbpy_event () + { + gdbpy_gil gil; + Py_XDECREF (m_func); + } -+ + +-static void +-gdbpy_run_events (int error, gdb_client_data client_data) +-{ +- gdbpy_enter enter_py (get_current_arch (), current_language); + gdbpy_event &operator= (const gdbpy_event &other) = delete; - /* Clear the event fd. Do this before flushing the events list, so - that any new event post afterwards is sure to re-awake the event - loop. */ - serial_event_clear (gdbpy_serial_event); -- ++ void operator() () ++ { ++ gdbpy_enter enter_py (get_current_arch (), current_language); + - while (gdbpy_event_list) - { - /* Dispatching the event might push a new element onto the event @@ -132,10 +176,7 @@ index 67f362b852d0..4bdd2201abc3 100644 - gdbpy_event_list = gdbpy_event_list->next; - if (gdbpy_event_list == NULL) - gdbpy_event_list_end = &gdbpy_event_list; -+ void operator() () -+ { -+ gdbpy_enter enter_py (get_current_arch (), current_language); - +- - gdbpy_ref<> call_result (PyObject_CallObject (item->event, NULL)); + gdbpy_ref<> call_result (PyObject_CallObject (m_func, NULL)); if (call_result == NULL) @@ -164,7 +205,7 @@ index 67f362b852d0..4bdd2201abc3 100644 if (!PyArg_ParseTuple (args, "O", &func)) return NULL; -@@ -1007,38 +1028,13 @@ +@@ -1007,38 +1028,13 @@ gdbpy_post_event (PyObject *self, PyObject *args) return NULL; } @@ -206,7 +247,7 @@ index 67f362b852d0..4bdd2201abc3 100644 /* This is the extension_language_ops.before_prompt "method". */ -@@ -1573,6 +1569,7 @@ +@@ -1573,6 +1569,7 @@ finalize_python (void *ignore) Py_Finalize (); @@ -214,7 +255,7 @@ index 67f362b852d0..4bdd2201abc3 100644 restore_active_ext_lang (previous_active); } -@@ -1701,7 +1698,6 @@ +@@ -1701,7 +1698,6 @@ do_start_initialization () || gdbpy_initialize_linetable () < 0 || gdbpy_initialize_thread () < 0 || gdbpy_initialize_inferior () < 0 @@ -222,7 +263,7 @@ index 67f362b852d0..4bdd2201abc3 100644 || gdbpy_initialize_eventregistry () < 0 || gdbpy_initialize_py_events () < 0 || gdbpy_initialize_event () < 0 -@@ -1736,8 +1732,7 @@ +@@ -1736,8 +1732,7 @@ do_start_initialization () return false; /* Release the GIL while gdb runs. */ @@ -232,39 +273,11 @@ index 67f362b852d0..4bdd2201abc3 100644 make_final_cleanup (finalize_python, NULL); ---- /dev/null 2023-07-16 09:39:45.472000000 +0200 -+++ b/gdb/run-on-main-thread.h 2023-07-30 10:43:06.264134972 +0200 -@@ -0,0 +1,28 @@ -+/* Run a function on the main thread -+ Copyright (C) 2019 Free Software Foundation, Inc. -+ -+ This file is part of GDB. -+ -+ This program 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 3 of the License, or -+ (at your option) any later version. -+ -+ This program 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 this program. If not, see . */ -+ -+#ifndef GDB_RUN_ON_MAIN_THREAD_H -+#define GDB_RUN_ON_MAIN_THREAD_H -+ -+#include -+ -+/* Send a runnable to the main thread. */ -+ -+extern void run_on_main_thread (std::function &&); -+ -+#endif /* GDB_RUN_ON_MAIN_THREAD_H */ ---- /dev/null 2023-07-16 09:39:45.472000000 +0200 -+++ b/gdb/run-on-main-thread.c 2023-07-30 10:43:03.510435316 +0200 +diff --git a/gdb/run-on-main-thread.c b/gdb/run-on-main-thread.c +new file mode 100644 +index 00000000000..86824b5af4a +--- /dev/null ++++ b/gdb/run-on-main-thread.c @@ -0,0 +1,97 @@ +/* Run a function on the main thread + Copyright (C) 2019 Free Software Foundation, Inc. @@ -363,41 +376,53 @@ index 67f362b852d0..4bdd2201abc3 100644 + runnable_event = make_serial_event (); + add_file_handler (serial_event_fd (runnable_event), run_events, nullptr); +} ---- a/gdb/Makefile.in 2023-07-30 10:45:06.611621149 +0200 -+++ b/gdb/Makefile.in 2023-07-30 10:46:04.284435216 +0200 -@@ -1100,6 +1100,7 @@ - remote-fileio.c \ - remote-notif.c \ - reverse.c \ -+ run-on-main-thread.c \ - rust-lang.c \ - sentinel-frame.c \ - ser-event.c \ -@@ -1362,6 +1363,7 @@ - riscv-tdep.h \ - rs6000-aix-tdep.h \ - rs6000-tdep.h \ -+ run-on-main-thread.h \ - s390-linux-tdep.h \ - s390-tdep.h \ - score-tdep.h \ ---- a/gdb/python/lib/gdb/command/prompt.py -+++ b/gdb/python/lib/gdb/command/prompt.py -@@ -45,7 +45,7 @@ def __init__(self): - self.hook_set = False +diff --git a/gdb/run-on-main-thread.h b/gdb/run-on-main-thread.h +new file mode 100644 +index 00000000000..fd1a2c42532 +--- /dev/null ++++ b/gdb/run-on-main-thread.h +@@ -0,0 +1,28 @@ ++/* Run a function on the main thread ++ Copyright (C) 2019 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ This program 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 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 this program. If not, see . */ ++ ++#ifndef GDB_RUN_ON_MAIN_THREAD_H ++#define GDB_RUN_ON_MAIN_THREAD_H ++ ++#include ++ ++/* Send a runnable to the main thread. */ ++ ++extern void run_on_main_thread (std::function &&); ++ ++#endif /* GDB_RUN_ON_MAIN_THREAD_H */ +diff --git a/readline/config.h.in b/readline/config.h.in +index c194e761a45..07b04fceb56 100644 +--- a/readline/config.h.in ++++ b/readline/config.h.in +@@ -234,7 +234,11 @@ + /* Definitions pulled in from aclocal.m4. */ + #undef VOID_SIGHANDLER - def get_show_string (self, pvalue): -- if self.value is not '': -+ if self.value: - return "The extended prompt is: " + self.value - else: - return "The extended prompt is not set." -@@ -57,7 +57,7 @@ def get_set_string (self): - return "" ++#if __APPLE__ ++#define GWINSZ_IN_SYS_IOCTL ++#else + #undef GWINSZ_IN_SYS_IOCTL ++#endif + + #undef STRUCT_WINSIZE_IN_SYS_IOCTL - def before_prompt_hook(self, current): -- if self.value is not '': -+ if self.value: - return gdb.prompt.substitute_prompt(self.value) - else: - return None diff --git a/scripts/007-gdb-SPU.sh b/scripts/007-gdb-SPU.sh index 7e0657731..d78de91e9 100755 --- a/scripts/007-gdb-SPU.sh +++ b/scripts/007-gdb-SPU.sh @@ -35,11 +35,6 @@ cd ${GDB}/build-spu ## Configure the build. -# TODO - Move it to patch file -if [ "$(uname -s)" = "Darwin" ]; then -sed -i 's/#undef GWINSZ_IN_SYS_IOCTL/#define GWINSZ_IN_SYS_IOCTL/' ../readline/config.h.in -fi - ../configure --prefix="$PS3DEV/spu" --target="spu" \ --disable-nls \ --disable-sim \ From 02de5f40395b137f7d26249a0098e0bfc9d05310 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 04:24:07 -0300 Subject: [PATCH 041/136] [ci] docker hub --- .github/workflows/deploy-docker.yaml | 67 ++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/deploy-docker.yaml diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml new file mode 100644 index 000000000..c51fd5866 --- /dev/null +++ b/.github/workflows/deploy-docker.yaml @@ -0,0 +1,67 @@ +name: ci-docker +on: + pull_request: + branches: + - master + + # Runs on pushes targeting the default branch + push: + branches: ['master'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + dockerhub-push: + runs-on: ubuntu-latest + environment: DockerHub + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 +# - linux/arm/v7 +# - linux/arm64/v8 +# - linux/ppc64le +# - linux/s390x + + env: + DOCKERHUB_REPONAME: ps3dev + DOCKERHUB_REPOTAG: latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: README to Dockerhub + uses: christian-korneck/update-container-description-action@v1 + env: + DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }} + with: + destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }} + provider: dockerhub + short_description: 'A Docker Image for PS3 Development' + readme_file: 'README.md' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: . + platforms: ${{ matrix.platform }} + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} \ No newline at end of file From f5bf275f174c85f8a948606d246a975cc2aed4ae Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:31:52 -0300 Subject: [PATCH 042/136] [ci] add python11 with diskutils module --- .github/workflows/deploy.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index edfa3ec68..1a0130ff8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,12 +20,15 @@ jobs: steps: - uses: actions/checkout@v4 - + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install Ubuntu requirements if: matrix.os == 'ubuntu-latest' run: | sudo apt update - sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev + sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch subversion wget zlib1g-dev libtool-bin bzip2 libgmp3-dev pkg-config libssl-dev - name: Install macOS requirements if: matrix.os == 'macos-latest' @@ -33,9 +36,6 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - # python2 - curl -O https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg - sudo installer -pkg python-2.7.18-macosx10.9.pkg -target / - name: Runs all the stages in the shell run: | From 0886e06f51541ce2552e64ee44be4e7417e8a101 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:36:19 -0300 Subject: [PATCH 043/136] [ci] python 2.7 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1a0130ff8..b2002b4db 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '2.7' - name: Install Ubuntu requirements if: matrix.os == 'ubuntu-latest' From 62c2bfc5789326046379f2927769bbcbb1c941bd Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:37:40 -0300 Subject: [PATCH 044/136] Revert "[ci] python 2.7" This reverts commit 0886e06f51541ce2552e64ee44be4e7417e8a101. --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b2002b4db..1a0130ff8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '2.7' + python-version: '3.11' - name: Install Ubuntu requirements if: matrix.os == 'ubuntu-latest' From c5de5097d75202fb29237b809f73a0489b5aeac9 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:44:25 -0300 Subject: [PATCH 045/136] [ci] install python manually for macos --- .github/workflows/deploy.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1a0130ff8..a91c56d6b 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,15 +20,12 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - + - name: Install Ubuntu requirements if: matrix.os == 'ubuntu-latest' run: | sudo apt update - sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch subversion wget zlib1g-dev libtool-bin bzip2 libgmp3-dev pkg-config libssl-dev + sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev - name: Install macOS requirements if: matrix.os == 'macos-latest' @@ -36,6 +33,9 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc + # python3 + curl -O https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg + sudo installer -pkg python-3.11.8-macos11.pkg -target / - name: Runs all the stages in the shell run: | From 6ec4cc5f92ccd459691f08ba60123f1e957bb9ce Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:48:14 -0300 Subject: [PATCH 046/136] [ci] python@3.11 support disktutils --- .github/workflows/deploy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a91c56d6b..9282466de 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -33,9 +33,9 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - # python3 - curl -O https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg - sudo installer -pkg python-3.11.8-macos11.pkg -target / + + brew install python@3.11 + brew link --overwrite python@3.11 - name: Runs all the stages in the shell run: | From 39c17bfd9a6672a4792d4213674d99126938a3eb Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:50:22 -0300 Subject: [PATCH 047/136] [ci] mac already have python installed --- .github/workflows/deploy.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9282466de..31c22c931 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -34,9 +34,6 @@ jobs: brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - brew install python@3.11 - brew link --overwrite python@3.11 - - name: Runs all the stages in the shell run: | mkdir $PWD/ps3dev From bbced149f584437d9ce925594f2dc136a3730225 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 13:56:05 -0300 Subject: [PATCH 048/136] [ci] pip install python-config --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 31c22c931..4c328cbde 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -33,6 +33,7 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc + pip install python-config - name: Runs all the stages in the shell run: | From 6eba5043ea2f6be32ce1f5794d446b6caf06f4f3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:25:19 -0300 Subject: [PATCH 049/136] [ci] macos-13 --- .github/workflows/deploy.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4c328cbde..87ca8e51d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [macos-13] defaults: run: shell: bash @@ -28,16 +28,17 @@ jobs: sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev - name: Install macOS requirements - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-13' + # act -P macos-latest=-self-hosted --container-architecture linux/amd64 run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed python@3.11 echo "alias sed='gsed'" >> ~/.bashrc - pip install python-config + #pip install python-config - name: Runs all the stages in the shell run: | - mkdir $PWD/ps3dev + mkdir -p $PWD/ps3dev export PS3DEV=$PWD/ps3dev export PSL1GHT=$PS3DEV export PATH=$PATH:$PS3DEV/bin From bb224597ed3f4adb16080a24ec5d99b4a647b07b Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:28:32 -0300 Subject: [PATCH 050/136] [ci] brew install python3 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 87ca8e51d..560e95569 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -32,7 +32,7 @@ jobs: # act -P macos-latest=-self-hosted --container-architecture linux/amd64 run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed python@3.11 + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed python3 echo "alias sed='gsed'" >> ~/.bashrc #pip install python-config From a03374566938aff464c90103ffb271debd58ea44 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:32:53 -0300 Subject: [PATCH 051/136] [ci] unlink python3 first --- .github/workflows/deploy.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 560e95569..7e41336e5 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -32,9 +32,11 @@ jobs: # act -P macos-latest=-self-hosted --container-architecture linux/amd64 run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed python3 + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - #pip install python-config + brew unlink python3 + brew install python@3.11 + pip install python-config - name: Runs all the stages in the shell run: | From a12fccb6e627f16690a53e3f0304f4a87c821484 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:36:13 -0300 Subject: [PATCH 052/136] [ci] show python installed version --- .github/workflows/deploy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7e41336e5..3bbca7e29 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -34,8 +34,7 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed echo "alias sed='gsed'" >> ~/.bashrc - brew unlink python3 - brew install python@3.11 + python --version pip install python-config - name: Runs all the stages in the shell From 59e1c5fb6df9c975c0f10f554cb5cd554d221b61 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:39:16 -0300 Subject: [PATCH 053/136] [ci] mac install makeinfo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3bbca7e29..402741930 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -32,7 +32,7 @@ jobs: # act -P macos-latest=-self-hosted --container-architecture linux/amd64 run: | brew update - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo echo "alias sed='gsed'" >> ~/.bashrc python --version pip install python-config From be59dce8948027ab89e308a5e8277112effc957a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:42:31 -0300 Subject: [PATCH 054/136] [ci] uninstall py3.12 for downgrading to 3.11 --- .github/workflows/deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 402741930..b2508ce46 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -35,7 +35,9 @@ jobs: brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo echo "alias sed='gsed'" >> ~/.bashrc python --version - pip install python-config + brew uninstall python3 + brew install python@3.11 + python --version - name: Runs all the stages in the shell run: | From 5ed350f632f93baea49c65e1de8548e74baf7c78 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:44:35 -0300 Subject: [PATCH 055/136] [ci] brew uninstall --ignore-dependencies python3 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b2508ce46..a449f53c5 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -35,7 +35,7 @@ jobs: brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo echo "alias sed='gsed'" >> ~/.bashrc python --version - brew uninstall python3 + brew uninstall --ignore-dependencies python3 brew install python@3.11 python --version From 25b89ed4f9e56ac0dbf1978bfe80c394720f283b Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:45:17 -0300 Subject: [PATCH 056/136] ignoring .vscode --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c9f22d9d2..7a894455c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ build/ .idea/** .DS_Store +ps3dev +.vscode \ No newline at end of file From c019c465903727a4503afa174b558d311192f644 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 14:51:34 -0300 Subject: [PATCH 057/136] [ci] install python3.11 using pyenv --- .github/workflows/deploy.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a449f53c5..34698a22d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-latest, ubuntu-latest] defaults: run: shell: bash @@ -28,15 +28,25 @@ jobs: sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev - name: Install macOS requirements - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-latest' # act -P macos-latest=-self-hosted --container-architecture linux/amd64 run: | brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo echo "alias sed='gsed'" >> ~/.bashrc python --version - brew uninstall --ignore-dependencies python3 - brew install python@3.11 + + + # install pyenv + brew install pyenv + # Initialize pyenv in the current shell + eval "$(pyenv init --path)" + + # Install Python 3.11 using pyenv + pyenv install 3.11.0 + # Set Python 3.11 as the global version + pyenv global 3.11.0 + python --version - name: Runs all the stages in the shell From 335c8c4944d9c5bdc8969948f69d6a37b145a1fc Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 15:10:47 -0300 Subject: [PATCH 058/136] [ci] checking python-config --- .github/workflows/deploy.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 34698a22d..e831689a7 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,12 +11,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [macos-latest] defaults: run: shell: bash - env: - BASH_ENV: "~/.bashrc" steps: - uses: actions/checkout@v4 @@ -34,8 +32,10 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo echo "alias sed='gsed'" >> ~/.bashrc + + # check current version python --version - + python-config --libs # install pyenv brew install pyenv @@ -47,7 +47,9 @@ jobs: # Set Python 3.11 as the global version pyenv global 3.11.0 + # check current version python --version + python-config --libs - name: Runs all the stages in the shell run: | From a6ca9a71ce830696164ecd68196e458a4bfacf78 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 15:20:40 -0300 Subject: [PATCH 059/136] [ci] alias python-config --- .github/workflows/deploy.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e831689a7..0d44a4ecc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -15,6 +15,8 @@ jobs: defaults: run: shell: bash + env: + BASH_ENV: "~/.bashrc" steps: - uses: actions/checkout@v4 @@ -32,7 +34,7 @@ jobs: brew update brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo echo "alias sed='gsed'" >> ~/.bashrc - + # check current version python --version python-config --libs @@ -47,7 +49,8 @@ jobs: # Set Python 3.11 as the global version pyenv global 3.11.0 - # check current version + echo "alias python-config=~/.pyenv/versions/3.11.0/bin/python-config' >> ~/.bashrc + python --version python-config --libs From f7ae248a5112099c4b428f08445dc0df727251fe Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 15:30:13 -0300 Subject: [PATCH 060/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0d44a4ecc..e93e43301 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest] + os: [ubuntu-latest] defaults: run: shell: bash From af9ea702f155f733faa38a809be7f3750a46ff03 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 16:10:06 -0300 Subject: [PATCH 061/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e93e43301..f11b54f60 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [macos-latest] defaults: run: shell: bash @@ -48,9 +48,10 @@ jobs: pyenv install 3.11.0 # Set Python 3.11 as the global version pyenv global 3.11.0 - - echo "alias python-config=~/.pyenv/versions/3.11.0/bin/python-config' >> ~/.bashrc - + dir_python=`dirname $(pyenv which python-config)` + echo $dir_path + echo "export PATH=$dir_python:$PATH" >> ~/.bashrc + source ~/.bashrc python --version python-config --libs From 38eeddb4733f7ec26e9525c60384418b609e30c2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 16:16:47 -0300 Subject: [PATCH 062/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f11b54f60..159337d2c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -48,10 +48,11 @@ jobs: pyenv install 3.11.0 # Set Python 3.11 as the global version pyenv global 3.11.0 - dir_python=`dirname $(pyenv which python-config)` + dir_python="$(pyenv which python-config)" echo $dir_path - echo "export PATH=$dir_python:$PATH" >> ~/.bashrc + echo "export PATH=$dir_python/..:$PATH" >> ~/.bashrc source ~/.bashrc + echo $PATH python --version python-config --libs From 22026d30bc1b34d1b886c3bc9dbffb49beee273c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 16:19:51 -0300 Subject: [PATCH 063/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 159337d2c..05409a238 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -37,7 +37,7 @@ jobs: # check current version python --version - python-config --libs + #python-config --libs # install pyenv brew install pyenv @@ -48,6 +48,9 @@ jobs: pyenv install 3.11.0 # Set Python 3.11 as the global version pyenv global 3.11.0 + + pip install python-config + dir_python="$(pyenv which python-config)" echo $dir_path echo "export PATH=$dir_python/..:$PATH" >> ~/.bashrc From b09a226f34b5c6a988315609e9c5234f9174a83d Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 16:31:54 -0300 Subject: [PATCH 064/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 05409a238..e30c959b6 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -53,8 +53,7 @@ jobs: dir_python="$(pyenv which python-config)" echo $dir_path - echo "export PATH=$dir_python/..:$PATH" >> ~/.bashrc - source ~/.bashrc + echo $PATH python --version python-config --libs From e3eaebdf0bbba832ff00a1cdb74582e0e9989d31 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 17:02:18 -0300 Subject: [PATCH 065/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e30c959b6..72ba2a4a6 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -57,6 +57,7 @@ jobs: echo $PATH python --version python-config --libs + echo 'pyenv global 3.11.0' >> ~/.bashrc - name: Runs all the stages in the shell run: | From b82e9177b7d3a2c16070f2a0ec8a8b3ba09fafba Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 17:38:30 -0300 Subject: [PATCH 066/136] [ci] add ubuntu-latest --- .github/workflows/deploy.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 72ba2a4a6..86db29983 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest] + os: [macos-latest, ubuntu-latest] defaults: run: shell: bash @@ -48,15 +48,7 @@ jobs: pyenv install 3.11.0 # Set Python 3.11 as the global version pyenv global 3.11.0 - pip install python-config - - dir_python="$(pyenv which python-config)" - echo $dir_path - - echo $PATH - python --version - python-config --libs echo 'pyenv global 3.11.0' >> ~/.bashrc - name: Runs all the stages in the shell From 4140ac8df5e2caf28f27c423f67db28abc8ffc34 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 20:25:13 -0300 Subject: [PATCH 067/136] [docker] add python 3.11.8 using pyenv --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ed16fe466..6f19c1e2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,34 @@ FROM ubuntu:24.04 LABEL maintainer="miigotu@gmail.com" +# Set the default shell to Bash +SHELL ["/bin/bash", "-c"] + ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:$PS3DEV/portlibs/ppu/lib/package ENV DEBIAN_FRONTEND=noninteractive +# last python version with diskutils module support +ENV PYTHON_VERSION=3.11.8 +ENV PYENV_ROOT="$HOME/.pyenv" +ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN \ apt -y update && \ apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ ca-certificates flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ - libtool libtool-bin make patch pkg-config python-dev-is-python3 texinfo wget xz-utils zlib1g-dev && \ + libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev && \ + # pyenv + apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ + llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl && \ + curl https://pyenv.run | bash && \ + pyenv update && \ + pyenv install $PYTHON_VERSION && \ + pyenv global $PYTHON_VERSION && \ + pyenv rehash && \ + # pyenv apt -y clean autoclean autoremove && \ rm -rf /var/lib/{apt,dpkg,cache,log} From e018f59874a9cd78e0b54c04e8f2877a16440e70 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 20:25:42 -0300 Subject: [PATCH 068/136] [ci] only ubuntu. mas is taking too long --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 86db29983..552ddb4e8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [ubuntu-latest] defaults: run: shell: bash From 422541b91fe3cce1068e16721ec849bfe74187c9 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 20:55:34 -0300 Subject: [PATCH 069/136] [docker] typo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6f19c1e2b..961f77c4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,6 @@ WORKDIR /build COPY . /build # Fixes certificate errors with letsencrypt in ARMv7 -RUN echo "\nca_certificate=/etc/ssl/certs/ca-certificates.crt" | tee -a /etc/wgetrc +RUN echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc RUN /build/toolchain.sh From 31d06097c1266298d5cd690de9fc6fa23914539c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 7 Mar 2024 09:52:19 -0300 Subject: [PATCH 070/136] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 961f77c4b..4cbf15783 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ SHELL ["/bin/bash", "-c"] ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin -ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:$PS3DEV/portlibs/ppu/lib/package +ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/package:/usr/lib/x86_64-linux-gnu/pkgconfig ENV DEBIAN_FRONTEND=noninteractive # last python version with diskutils module support From a8b15136e43bec7814f9ceeadd12b7b7dba9bcab Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 7 Mar 2024 09:56:12 -0300 Subject: [PATCH 071/136] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4cbf15783..76519c884 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ SHELL ["/bin/bash", "-c"] ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin -ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/package:/usr/lib/x86_64-linux-gnu/pkgconfig +ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/package ENV DEBIAN_FRONTEND=noninteractive # last python version with diskutils module support From 53a74e1a3c2c38c0346df99d3afa0608939e512f Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 7 Mar 2024 12:50:22 -0300 Subject: [PATCH 072/136] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 76519c884..6fb66a2f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ SHELL ["/bin/bash", "-c"] ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin -ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/package +ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/pkgconfig ENV DEBIAN_FRONTEND=noninteractive # last python version with diskutils module support From 46f2dbc7a563cdb5d1335a9ca56c8a2c1b3b5106 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 9 Mar 2024 00:05:23 -0300 Subject: [PATCH 073/136] Update deploy-docker.yaml --- .github/workflows/deploy-docker.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index c51fd5866..9fca0fb57 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -20,8 +20,9 @@ jobs: matrix: platform: - linux/amd64 + - linux/386 # - linux/arm/v7 -# - linux/arm64/v8 + - linux/arm64/v8 # - linux/ppc64le # - linux/s390x @@ -64,4 +65,4 @@ jobs: context: . platforms: ${{ matrix.platform }} push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} From fddd3ada017234a0827d46e62be7630f7632a94b Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 10 Mar 2024 23:04:13 -0300 Subject: [PATCH 074/136] CFLAGS=-fno-asynchronous-unwind-tables --- patches/gcc-13.2.0-PS3-PPU.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/patches/gcc-13.2.0-PS3-PPU.patch b/patches/gcc-13.2.0-PS3-PPU.patch index e4d00a592..c34645a1f 100644 --- a/patches/gcc-13.2.0-PS3-PPU.patch +++ b/patches/gcc-13.2.0-PS3-PPU.patch @@ -663,18 +663,27 @@ index c7b26d1..85e83d3 100755 ;; *le-*-freebsd*) diff --git a/libgcc/config.host b/libgcc/config.host -index 9d72120..c2b3bb8 100644 +index 9d72120..7ddde1d 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -1224,6 +1224,8 @@ powerpc-*-rtems*) +@@ -1224,6 +1224,9 @@ powerpc-*-rtems*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit" extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" ;; +powerpc64-ps3-elf) ++ tmake_file="${tmake_file} rs6000/t-crtstuff-cell64lv2" + ;; powerpc*-*-linux*) 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" tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000" +diff --git a/libgcc/config/rs6000/t-crtstuff-cell64lv2 b/libgcc/config/rs6000/t-crtstuff-cell64lv2 +new file mode 100644 +index 0000000..9eb9ca7 +--- /dev/null ++++ b/libgcc/config/rs6000/t-crtstuff-cell64lv2 +@@ -0,0 +1 @@ ++CRTSTUFF_T_CFLAGS = -fno-asynchronous-unwind-tables +\ No newline at end of file diff --git a/libstdc++-v3/src/filesystem/dir-common.h b/libstdc++-v3/src/filesystem/dir-common.h index af51375..3aedb59 100644 --- a/libstdc++-v3/src/filesystem/dir-common.h From aba3190c559c83cf8f9b1c1e31ed1a506ed33b87 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 10 Mar 2024 23:11:21 -0300 Subject: [PATCH 075/136] Update deploy-docker.yaml --- .github/workflows/deploy-docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 9fca0fb57..09fc3d52a 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -20,9 +20,9 @@ jobs: matrix: platform: - linux/amd64 - - linux/386 +# - linux/386 # - linux/arm/v7 - - linux/arm64/v8 +# - linux/arm64/v8 # - linux/ppc64le # - linux/s390x From 1fb228923fc04efc78f330cd64220f3e9edb20f3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 11 Mar 2024 01:27:08 -0300 Subject: [PATCH 076/136] Update Dockerfile --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fb66a2f3..fe0d9db43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,8 @@ RUN \ pyenv global $PYTHON_VERSION && \ pyenv rehash && \ # pyenv - apt -y clean autoclean autoremove && \ - rm -rf /var/lib/{apt,dpkg,cache,log} - + apt -y clean autoclean autoremove + RUN mkdir /build WORKDIR /build COPY . /build From c07bfc4747d7b48b08ede54d5ceafee6becbe4cc Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 11 Mar 2024 02:02:37 -0300 Subject: [PATCH 077/136] add PATH=/portlibs/ppu/bin --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe0d9db43..1ef626020 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ SHELL ["/bin/bash", "-c"] ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} -ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin +ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/pkgconfig ENV DEBIAN_FRONTEND=noninteractive From 9056e9590adacf35145aae0ec6ef012653ff6eeb Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 14 Mar 2024 14:37:40 -0300 Subject: [PATCH 078/136] Update 009-ps3libraries.sh --- scripts/009-ps3libraries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/009-ps3libraries.sh b/scripts/009-ps3libraries.sh index 67fd2adc7..71db9909e 100755 --- a/scripts/009-ps3libraries.sh +++ b/scripts/009-ps3libraries.sh @@ -2,7 +2,7 @@ # ps3libraries.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -wget --no-check-certificate https://github.com/ps3dev/ps3libraries/tarball/master -O ps3libraries.tar.gz +wget --no-check-certificate https://github.com/humbertodias/ps3libraries/tarball/master -O ps3libraries.tar.gz ## Unpack the source code. rm -Rf ps3libraries && mkdir ps3libraries && tar --strip-components=1 --directory=ps3libraries -xvzf ps3libraries.tar.gz && cd ps3libraries From 755d94127a03019b994a45565e81c89352d7561b Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 14 Mar 2024 14:39:20 -0300 Subject: [PATCH 079/136] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1ef626020..9284265f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN \ apt -y update && \ apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ - ca-certificates flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ + ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev && \ # pyenv apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ From dd90084554d8dd99f2be8f264b249a370a5151cc Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 14 Mar 2024 15:18:20 -0300 Subject: [PATCH 080/136] Update deploy.yaml --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 552ddb4e8..c6060f6ab 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,6 +3,7 @@ name: CI on: push: pull_request: + workflow_dispatch: repository_dispatch: types: [run_build] @@ -102,4 +103,4 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./ps3dev.tar.gz asset_name: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz - asset_content_type: application/gzip \ No newline at end of file + asset_content_type: application/gzip From 21a85b41fdc933f22939de356ddc8feff856d08c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 14 Mar 2024 18:28:57 -0300 Subject: [PATCH 081/136] Update 009-ps3libraries.sh --- scripts/009-ps3libraries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/009-ps3libraries.sh b/scripts/009-ps3libraries.sh index 71db9909e..5f279d34d 100755 --- a/scripts/009-ps3libraries.sh +++ b/scripts/009-ps3libraries.sh @@ -2,7 +2,7 @@ # ps3libraries.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -wget --no-check-certificate https://github.com/humbertodias/ps3libraries/tarball/master -O ps3libraries.tar.gz +wget --no-check-certificate https://github.com/humbertodias/ps3libraries/tarball/psl1ght-2.30.1 -O ps3libraries.tar.gz ## Unpack the source code. rm -Rf ps3libraries && mkdir ps3libraries && tar --strip-components=1 --directory=ps3libraries -xvzf ps3libraries.tar.gz && cd ps3libraries From e892486c1d35edeea9e0bb91bfbed923c988a16a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 15 Mar 2024 00:22:20 -0300 Subject: [PATCH 082/136] add PATH=$PATH:$PS3DEV/portlibs/ppu/bin --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c6060f6ab..b4a6a1242 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -60,6 +60,7 @@ jobs: export PATH=$PATH:$PS3DEV/bin export PATH=$PATH:$PS3DEV/ppu/bin export PATH=$PATH:$PS3DEV/spu/bin + export PATH=$PATH:$PS3DEV/portlibs/ppu/bin ./toolchain.sh - name: Get short SHA From d8e237ade4ae8598597d09553a5ac6f8cb2a558a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 15 Mar 2024 01:06:26 -0300 Subject: [PATCH 083/136] PKG_CONFIG_PATH=$PS3DEV/portlibs/ppu/lib/pkgconfig --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b4a6a1242..d8f99cbf6 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -61,6 +61,7 @@ jobs: export PATH=$PATH:$PS3DEV/ppu/bin export PATH=$PATH:$PS3DEV/spu/bin export PATH=$PATH:$PS3DEV/portlibs/ppu/bin + export PKG_CONFIG_PATH=$PS3DEV/portlibs/ppu/lib/pkgconfig ./toolchain.sh - name: Get short SHA From 1cc315aae357a7742edc461038c652a4e8227c0c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 15 Mar 2024 16:21:50 -0300 Subject: [PATCH 084/136] rm tmp files --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9284265f0..7b9a0d044 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,4 +38,5 @@ COPY . /build # Fixes certificate errors with letsencrypt in ARMv7 RUN echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc RUN /build/toolchain.sh - +# Temporary files +RUN rm -rf /build/build From 504fe345647429c1dcd22f723b8abdbdf8a41f3f Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 15 Mar 2024 18:41:27 -0300 Subject: [PATCH 085/136] Update Dockerfile --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b9a0d044..f641cafdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,4 @@ COPY . /build # Fixes certificate errors with letsencrypt in ARMv7 RUN echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc -RUN /build/toolchain.sh -# Temporary files -RUN rm -rf /build/build +RUN /build/toolchain.sh && rm -rf /build/build From 1416700e4012dde23bec07d3fcec5436dafda0a3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 15 Mar 2024 22:01:29 -0300 Subject: [PATCH 086/136] python 3.10 + pycrypto + nvidia-cg-toolkit --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f641cafdb..109e3ab99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,15 +11,16 @@ ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/pkgconfig ENV DEBIAN_FRONTEND=noninteractive # last python version with diskutils module support -ENV PYTHON_VERSION=3.11.8 +ENV PYTHON_VERSION=3.10 ENV PYENV_ROOT="$HOME/.pyenv" +ENV PIP_ROOT_USER_ACTION=ignore ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN \ apt -y update && \ apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ - libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev && \ + libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev nvidia-cg-toolkit && \ # pyenv apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl && \ @@ -28,6 +29,7 @@ RUN \ pyenv install $PYTHON_VERSION && \ pyenv global $PYTHON_VERSION && \ pyenv rehash && \ + pip install pycrypto && \ # pyenv apt -y clean autoclean autoremove From e7bc2ca826af44b201cd1cd6ed02cf5c1a4965e2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 19 Mar 2024 15:48:21 -0300 Subject: [PATCH 087/136] newlib fix to avoid duplicated values on dirent_type --- patches/gcc-13.2.0-PS3-PPU.patch | 25 ------------------------- patches/newlib-1.20.0-PS3.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/patches/gcc-13.2.0-PS3-PPU.patch b/patches/gcc-13.2.0-PS3-PPU.patch index c34645a1f..9573bf1cf 100644 --- a/patches/gcc-13.2.0-PS3-PPU.patch +++ b/patches/gcc-13.2.0-PS3-PPU.patch @@ -684,31 +684,6 @@ index 0000000..9eb9ca7 @@ -0,0 +1 @@ +CRTSTUFF_T_CFLAGS = -fno-asynchronous-unwind-tables \ No newline at end of file -diff --git a/libstdc++-v3/src/filesystem/dir-common.h b/libstdc++-v3/src/filesystem/dir-common.h -index af51375..3aedb59 100644 ---- a/libstdc++-v3/src/filesystem/dir-common.h -+++ b/libstdc++-v3/src/filesystem/dir-common.h -@@ -272,20 +272,12 @@ get_file_type(const std::filesystem::__gnu_posix::dirent& d [[gnu::unused]]) - #ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE - switch (d.d_type) - { -- case DT_BLK: -- return file_type::block; -- case DT_CHR: -- return file_type::character; - case DT_DIR: - return file_type::directory; -- case DT_FIFO: -- return file_type::fifo; - case DT_LNK: - return file_type::symlink; - case DT_REG: - return file_type::regular; -- case DT_SOCK: -- return file_type::socket; - case DT_UNKNOWN: - return file_type::unknown; - default: diff --git a/Makefile.in b/Makefile.in index 06a9398..7419f7e 100644 --- a/Makefile.in diff --git a/patches/newlib-1.20.0-PS3.patch b/patches/newlib-1.20.0-PS3.patch index 2cab6e163..e20c4ee2e 100644 --- a/patches/newlib-1.20.0-PS3.patch +++ b/patches/newlib-1.20.0-PS3.patch @@ -13178,3 +13178,30 @@ index 6932de2..4c8bdbb 100644 /* Calculate the exponent. */ if (y < 0.0) N = (int) (y * ONE_OVER_PI - 0.5); +diff --git a/newlib/libc/sys/lv2/sys/dirent.h b/newlib/libc/sys/lv2/sys/dirent.h +index 84780e9..d44d070 100644 +--- a/newlib/libc/sys/lv2/sys/dirent.h ++++ b/newlib/libc/sys/lv2/sys/dirent.h +@@ -7,14 +7,14 @@ + + #define DT_INVALID 0xff + #define DT_UNKNOWN 0 +-#define DT_FIFO DT_INVALID +-#define DT_CHR DT_INVALID +-#define DT_DIR 1 +-#define DT_BLK DT_INVALID +-#define DT_REG 2 +-#define DT_LNK 3 +-#define DT_SOCK DT_INVALID +-#define DT_WHT DT_INVALID ++#define DT_FIFO 1 ++#define DT_CHR 2 ++#define DT_DIR 4 ++#define DT_BLK 6 ++#define DT_REG 8 ++#define DT_LNK 10 ++#define DT_SOCK 12 ++#define DT_WHT 14 + + #define dirfd(dp) ((dp)->dd_fd) + From 04ddabf87814e0fec6ddde0e52d3b00173d7e121 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Tue, 19 Mar 2024 20:59:13 -0300 Subject: [PATCH 088/136] typo 006-gcc-newlib-SPU.sh --- scripts/006-gcc-newlib-SPU.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/006-gcc-newlib-SPU.sh b/scripts/006-gcc-newlib-SPU.sh index 2791cad3d..6e4f176e9 100755 --- a/scripts/006-gcc-newlib-SPU.sh +++ b/scripts/006-gcc-newlib-SPU.sh @@ -15,7 +15,7 @@ if [ ! -d ${GCC} ]; then rm -Rf ${NEWLIB} && tar xfvz ${NEWLIB}.tar.gz ## Patch the source code. - cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC} + cat ../patches/${GCC}-PS3-SPU.patch | patch -p1 -d ${GCC} cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB} ## Enter the source code directory. From 4d23a177cf01f201be1f4773c8c690898c893f04 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 3 Apr 2024 10:55:46 -0300 Subject: [PATCH 089/136] install nvidia-cg-toolkit only for x68 arch --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 109e3ab99..21b7ed3b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,8 @@ RUN \ apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev nvidia-cg-toolkit && \ + # Install dependencies specific for amd64 architecture + if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi ; \ # pyenv apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl && \ From 16a02432e63d2e7a4a82cbf6490560dfa2c8e8f6 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 3 Apr 2024 17:14:23 -0300 Subject: [PATCH 090/136] docker multi-stage image --- Dockerfile | 58 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 21b7ed3b4..a57136b2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -FROM ubuntu:24.04 -LABEL maintainer="miigotu@gmail.com" +FROM ubuntu:22.04 as builder # Set the default shell to Bash SHELL ["/bin/bash", "-c"] @@ -7,38 +6,41 @@ SHELL ["/bin/bash", "-c"] ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin -ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/pkgconfig +ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig ENV DEBIAN_FRONTEND=noninteractive # last python version with diskutils module support ENV PYTHON_VERSION=3.10 -ENV PYENV_ROOT="$HOME/.pyenv" +ENV PYENV_ROOT ${HOME}/.pyenv ENV PIP_ROOT_USER_ACTION=ignore -ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" +ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:$PATH -RUN \ - apt -y update && \ - apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ - ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ - libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev nvidia-cg-toolkit && \ - # Install dependencies specific for amd64 architecture - if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi ; \ - # pyenv - apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ - llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl && \ - curl https://pyenv.run | bash && \ - pyenv update && \ - pyenv install $PYTHON_VERSION && \ - pyenv global $PYTHON_VERSION && \ - pyenv rehash && \ - pip install pycrypto && \ - # pyenv - apt -y clean autoclean autoremove - -RUN mkdir /build +RUN apt update -y && \ + apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ + ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ + libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev && \ + # Fixes certificate errors with letsencrypt in ARMv7 + echo 'ca_certificate=/etc/ssl/certs/ca-certificates.crt' >> /etc/wgetrc && \ + # Install dependencies specific for amd64 architecture + if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi && \ + # pyenv + apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ + llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl git && \ + echo 'cacert=/etc/ssl/certs/ca-certificates.crt' >> ~/.curlrc && \ + git config --global http.sslverify 'false' && \ + curl https://pyenv.run | bash && \ + pyenv update && pyenv install $PYTHON_VERSION && pyenv global $PYTHON_VERSION && pyenv rehash && \ + pip install pycrypto && \ + # pyenv + apt -y clean autoclean autoremove && \ + mkdir /build WORKDIR /build COPY . /build +RUN /build/toolchain.sh -# Fixes certificate errors with letsencrypt in ARMv7 -RUN echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc -RUN /build/toolchain.sh && rm -rf /build/build +FROM ubuntu:22.04 as runtime +ENV PS3DEV /usr/local/ps3dev +ENV PSL1GHT ${PS3DEV} +ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin +ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig +COPY --from=builder ${PS3DEV} ${PS3DEV} \ No newline at end of file From a4910a8d00f776770dcd05e75afa4db0edb12d20 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 5 Apr 2024 22:50:25 -0300 Subject: [PATCH 091/136] add base stage --- Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index a57136b2d..bb45dab46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,16 @@ -FROM ubuntu:22.04 as builder - +FROM ubuntu:22.04 as base # Set the default shell to Bash SHELL ["/bin/bash", "-c"] - ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig - ENV DEBIAN_FRONTEND=noninteractive # last python version with diskutils module support ENV PYTHON_VERSION=3.10 ENV PYENV_ROOT ${HOME}/.pyenv ENV PIP_ROOT_USER_ACTION=ignore ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:$PATH - RUN apt update -y && \ apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ @@ -32,13 +28,15 @@ RUN apt update -y && \ pyenv update && pyenv install $PYTHON_VERSION && pyenv global $PYTHON_VERSION && pyenv rehash && \ pip install pycrypto && \ # pyenv - apt -y clean autoclean autoremove && \ - mkdir /build + apt -y clean autoclean autoremove + +FROM base as builder +RUN mkdir /build WORKDIR /build COPY . /build RUN /build/toolchain.sh -FROM ubuntu:22.04 as runtime +FROM base as runtime ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin From 899711443c6054e407c10d9d07cb1ae5738dce7f Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 09:38:09 -0300 Subject: [PATCH 092/136] download source code only if directory doesn't exist --- scripts/008-psl1ght.sh | 19 ++++++++++++------- scripts/009-ps3libraries.sh | 18 +++++++++++++----- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/scripts/008-psl1ght.sh b/scripts/008-psl1ght.sh index 0f66d90dc..1135ad172 100755 --- a/scripts/008-psl1ght.sh +++ b/scripts/008-psl1ght.sh @@ -1,14 +1,19 @@ #!/bin/sh -e # psl1ght.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --no-check-certificate https://github.com/ps3dev/PSL1GHT/tarball/master -O psl1ght.tar.gz +PSL1GHT="PSL1GHT" -## Unpack the source code. -rm -Rf psl1ght && mkdir psl1ght && tar --strip-components=1 --directory=psl1ght -xvzf psl1ght.tar.gz +if [ ! -d ${PSL1GHT} ]; then -## Create the build directory. -cd psl1ght + ## Download the source code. + wget --no-check-certificate https://github.com/ps3dev/$PSL1GHT/tarball/master -O $PSL1GHT.tar.gz + + ## Unpack the source code. + rm -Rf $PSL1GHT && mkdir $PSL1GHT && tar --strip-components=1 --directory=$PSL1GHT -xvzf $PSL1GHT.tar.gz + +fi + +cd $PSL1GHT ## Compile and install. -${MAKE:-make} install-ctrl && ${MAKE:-make} && ${MAKE:-make} install +${MAKE:-make} install-ctrl && ${MAKE:-make} && ${MAKE:-make} install \ No newline at end of file diff --git a/scripts/009-ps3libraries.sh b/scripts/009-ps3libraries.sh index 5f279d34d..4e4c65b34 100755 --- a/scripts/009-ps3libraries.sh +++ b/scripts/009-ps3libraries.sh @@ -1,11 +1,19 @@ #!/bin/sh -e # ps3libraries.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --no-check-certificate https://github.com/humbertodias/ps3libraries/tarball/psl1ght-2.30.1 -O ps3libraries.tar.gz +PS3LIBRARIES="ps3libraries" -## Unpack the source code. -rm -Rf ps3libraries && mkdir ps3libraries && tar --strip-components=1 --directory=ps3libraries -xvzf ps3libraries.tar.gz && cd ps3libraries +if [ ! -d ${PSL1GHT} ]; then + + ## Download the source code. + wget --no-check-certificate https://github.com/humbertodias/$PS3LIBRARIES/tarball/psl1ght-2.30.1 -O $PS3LIBRARIES.tar.gz + + ## Unpack the source code. + rm -Rf $PS3LIBRARIES && mkdir $PS3LIBRARIES && tar --strip-components=1 --directory=$PS3LIBRARIES -xvzf $PS3LIBRARIES.tar.gz + +fi + +cd $PS3LIBRARIES ## Compile and install. -./libraries.sh +./libraries.sh \ No newline at end of file From dea2c907d7496c67919a6b1318295ee9080274ac Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 09:38:37 -0300 Subject: [PATCH 093/136] enabling linux/arm --- .github/workflows/deploy-docker.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 09fc3d52a..af523c76e 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -20,11 +20,11 @@ jobs: matrix: platform: - linux/amd64 -# - linux/386 -# - linux/arm/v7 -# - linux/arm64/v8 -# - linux/ppc64le -# - linux/s390x + - linux/arm/v7 + - linux/arm64/v8 + # - linux/386 + # - linux/ppc64le + # - linux/s390x env: DOCKERHUB_REPONAME: ps3dev From c450e5352b518576da980b8f9fea019fbda9ccc9 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 11:03:44 -0300 Subject: [PATCH 094/136] typo --- scripts/008-psl1ght.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/008-psl1ght.sh b/scripts/008-psl1ght.sh index 1135ad172..1da1f8fab 100755 --- a/scripts/008-psl1ght.sh +++ b/scripts/008-psl1ght.sh @@ -1,19 +1,19 @@ #!/bin/sh -e # psl1ght.sh by Naomi Peori (naomi@peori.ca) -PSL1GHT="PSL1GHT" +PSL1GHT_DIR="PSL1GHT" -if [ ! -d ${PSL1GHT} ]; then +if [ ! -d ${PSL1GHT_DIR} ]; then ## Download the source code. - wget --no-check-certificate https://github.com/ps3dev/$PSL1GHT/tarball/master -O $PSL1GHT.tar.gz + wget --no-check-certificate https://github.com/ps3dev/$PSL1GHT_DIR/tarball/master -O $PSL1GHT_DIR.tar.gz ## Unpack the source code. - rm -Rf $PSL1GHT && mkdir $PSL1GHT && tar --strip-components=1 --directory=$PSL1GHT -xvzf $PSL1GHT.tar.gz + rm -Rf $PSL1GHT_DIR && mkdir $PSL1GHT_DIR && tar --strip-components=1 --directory=$PSL1GHT_DIR -xvzf $PSL1GHT_DIR.tar.gz fi -cd $PSL1GHT +cd $PSL1GHT_DIR ## Compile and install. ${MAKE:-make} install-ctrl && ${MAKE:-make} && ${MAKE:-make} install \ No newline at end of file From 6729efb39111ba5545cb6c0ec8d8d1287b2daab9 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 13:45:38 -0300 Subject: [PATCH 095/136] skip arm --- .github/workflows/deploy-docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index af523c76e..ea14c9a35 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -20,8 +20,8 @@ jobs: matrix: platform: - linux/amd64 - - linux/arm/v7 - - linux/arm64/v8 + # - linux/arm/v7 + # - linux/arm64/v8 # - linux/386 # - linux/ppc64le # - linux/s390x From 08351b75a873dbaa7ba638f59b2b0b9ec23bc255 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 13:48:49 -0300 Subject: [PATCH 096/136] typo --- scripts/009-ps3libraries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/009-ps3libraries.sh b/scripts/009-ps3libraries.sh index 4e4c65b34..5e6c806bf 100755 --- a/scripts/009-ps3libraries.sh +++ b/scripts/009-ps3libraries.sh @@ -3,7 +3,7 @@ PS3LIBRARIES="ps3libraries" -if [ ! -d ${PSL1GHT} ]; then +if [ ! -d ${PS3LIBRARIES} ]; then ## Download the source code. wget --no-check-certificate https://github.com/humbertodias/$PS3LIBRARIES/tarball/psl1ght-2.30.1 -O $PS3LIBRARIES.tar.gz From 1520f52369294d13a78e77e4d7a7cf9089dfed05 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 14:08:32 -0300 Subject: [PATCH 097/136] ci x86 install nvidia-cg-toolkit --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index d8f99cbf6..c9b0bf8da 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -26,7 +26,8 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt update - sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev + sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev && \ + if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi - name: Install macOS requirements if: matrix.os == 'macos-latest' From 9d48317adca9587c9aae96215613e607f06d95f6 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 14:14:43 -0300 Subject: [PATCH 098/136] sudo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c9b0bf8da..306bfc89e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -27,7 +27,7 @@ jobs: run: | sudo apt update sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev && \ - if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi + if [ "$(uname -m)" = "x86_64" ]; then sudo apt install -y nvidia-cg-toolkit ; fi - name: Install macOS requirements if: matrix.os == 'macos-latest' From 900a37d29e199136c600d0334138b50e92b544ec Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 15:52:35 -0300 Subject: [PATCH 099/136] add linux/arm64 --- .github/workflows/deploy-docker.yaml | 1 + .github/workflows/deploy.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index ea14c9a35..968aacf59 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -20,6 +20,7 @@ jobs: matrix: platform: - linux/amd64 + - linux/arm64 # - linux/arm/v7 # - linux/arm64/v8 # - linux/386 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 306bfc89e..da26e1e8a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,4 +1,4 @@ -name: CI +name: ci on: push: From 72bbba7359f5503acd01058826587848f5107c89 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 16:35:10 -0300 Subject: [PATCH 100/136] architecture: [x64, arm64] --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index da26e1e8a..52b73f3da 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,6 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] + architecture: [x64, arm64] defaults: run: shell: bash From b5dee4657ec52c32d0663ce1ff6792aa4f930c5e Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 17:06:49 -0300 Subject: [PATCH 101/136] doc: how to build multi platform image --- .github/workflows/deploy-docker.yaml | 9 ++------- Dockerfile | 6 +++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 968aacf59..6bddcfba9 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -13,20 +13,15 @@ on: jobs: dockerhub-push: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} environment: DockerHub strategy: fail-fast: false matrix: + os: [ubuntu-latest] platform: - linux/amd64 - linux/arm64 - # - linux/arm/v7 - # - linux/arm64/v8 - # - linux/386 - # - linux/ppc64le - # - linux/s390x - env: DOCKERHUB_REPONAME: ps3dev DOCKERHUB_REPOTAG: latest diff --git a/Dockerfile b/Dockerfile index bb45dab46..708e9b61c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,4 +41,8 @@ ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT ${PS3DEV} ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig -COPY --from=builder ${PS3DEV} ${PS3DEV} \ No newline at end of file +COPY --from=builder ${PS3DEV} ${PS3DEV} + +# How to build multi platform image +# docker buildx create --use +# docker buildx build --platform linux/amd64,linux/arm64 -t ps3dev:latest . \ No newline at end of file From 627a9c4c3d98eb665cf03ff85e512b097f6b29c2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 19:08:45 -0300 Subject: [PATCH 102/136] release tagname with arch --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 52b73f3da..43feba469 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -93,7 +93,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{matrix.os}}-${{ steps.slug.outputs.sha8 }} + tag_name: ${{matrix.os}}-${{steps.arch.outputs.arch}}-${{ steps.slug.outputs.sha8 }} release_name: ps3dev ${{matrix.os}} ${{steps.arch.outputs.arch}} (${{steps.date.outputs.date}}) draft: false prerelease: false From 73d3c690ea1fa884dd02e3a285106082fc452479 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 22:01:19 -0300 Subject: [PATCH 103/136] upload/download artifact --- .github/workflows/deploy-docker.yaml | 2 +- .github/workflows/deploy.yaml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 6bddcfba9..051774f00 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -21,7 +21,7 @@ jobs: os: [ubuntu-latest] platform: - linux/amd64 - - linux/arm64 + # - linux/arm64 env: DOCKERHUB_REPONAME: ps3dev DOCKERHUB_REPOTAG: latest diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 43feba469..76f981120 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -108,3 +108,24 @@ jobs: asset_path: ./ps3dev.tar.gz asset_name: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz asset_content_type: application/gzip + + + publish-release: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + if: startsWith(github.ref, 'refs/tags/') + with: + name: artifact + path: ${{github.workspace}} + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ${{ github.workspace }}/*.pkg \ No newline at end of file From 26bfb463e36cf19a60d189f05dcabca7cc7ac3f7 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 6 Apr 2024 22:34:06 -0300 Subject: [PATCH 104/136] publish-release --- .github/workflows/deploy.yaml | 37 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 76f981120..79f5b9cc2 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -87,45 +87,32 @@ jobs: id: arch run: echo "::set-output name=arch::$(uname -m)" - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Archive Folder + uses: actions/upload-artifact@v4 with: - tag_name: ${{matrix.os}}-${{steps.arch.outputs.arch}}-${{ steps.slug.outputs.sha8 }} - release_name: ps3dev ${{matrix.os}} ${{steps.arch.outputs.arch}} (${{steps.date.outputs.date}}) - draft: false - prerelease: false - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./ps3dev.tar.gz - asset_name: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz - asset_content_type: application/gzip - + name: artifact-${{matrix.architecture}} + path: | + ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz publish-release: needs: build runs-on: ubuntu-latest + strategy: + matrix: + architecture: [x64, arm64] steps: - name: Download Artifact uses: actions/download-artifact@v4 - if: startsWith(github.ref, 'refs/tags/') +# if: startsWith(github.ref, 'refs/tags/') with: - name: artifact + name: artifact-${{matrix.architecture}} path: ${{github.workspace}} - name: Create Release id: create_release uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + # if: startsWith(github.ref, 'refs/tags/') with: files: | - ${{ github.workspace }}/*.pkg \ No newline at end of file + ${{ github.workspace }}/*.tar.gz \ No newline at end of file From b6399bc05d85ac1d1f9bffe2ee7371e505a0affe Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 10:31:14 -0300 Subject: [PATCH 105/136] Compress ps3dev folder --- .github/workflows/deploy.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 79f5b9cc2..bd6a485a0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -87,6 +87,10 @@ jobs: id: arch run: echo "::set-output name=arch::$(uname -m)" + - name: Compress ps3dev folder + run: | + tar -czvf ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz -C /usr/local/ps3dev + - name: Archive Folder uses: actions/upload-artifact@v4 with: From b5dcf2d6b6e9094a4b18082442498076c2d8e1b5 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 10:44:46 -0300 Subject: [PATCH 106/136] Download all Artifact --- .github/workflows/deploy.yaml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index bd6a485a0..64f501d0e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -74,11 +74,6 @@ jobs: run: | tar -zcvf ps3dev.tar.gz ps3dev -# - uses: actions/upload-artifact@v2 -# with: -# name: ps3dev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}} -# path: ps3dev.tar.gz - - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" @@ -101,17 +96,10 @@ jobs: publish-release: needs: build runs-on: ubuntu-latest - strategy: - matrix: - architecture: [x64, arm64] steps: - - name: Download Artifact + - name: Download all Artifact uses: actions/download-artifact@v4 -# if: startsWith(github.ref, 'refs/tags/') - with: - name: artifact-${{matrix.architecture}} - path: ${{github.workspace}} - name: Create Release id: create_release From 0be0b57607f623796d7e2cf3450fe858b87f7c57 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 11:10:19 -0300 Subject: [PATCH 107/136] typo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 64f501d0e..e4634fdf5 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -84,7 +84,7 @@ jobs: - name: Compress ps3dev folder run: | - tar -czvf ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz -C /usr/local/ps3dev + tar -czvf ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz -C ${PS3DEV} - name: Archive Folder uses: actions/upload-artifact@v4 From 6812c43210ccf1eb73fca8c226daf7f711139ff2 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 11:52:29 -0300 Subject: [PATCH 108/136] typo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e4634fdf5..3bbee1d79 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -84,7 +84,7 @@ jobs: - name: Compress ps3dev folder run: | - tar -czvf ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz -C ${PS3DEV} + tar -czvf ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz -C "${PS3DEV}" . - name: Archive Folder uses: actions/upload-artifact@v4 From 2eac023bcdecaba7b43dc9c06e74c56c6c3ab0bb Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 13:00:44 -0300 Subject: [PATCH 109/136] typo --- .github/workflows/deploy.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3bbee1d79..82fc4e60f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -72,7 +72,7 @@ jobs: - name: Compress ps3dev folder run: | - tar -zcvf ps3dev.tar.gz ps3dev + tar -zcvf ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz ps3dev - name: Get current date id: date @@ -82,16 +82,11 @@ jobs: id: arch run: echo "::set-output name=arch::$(uname -m)" - - name: Compress ps3dev folder - run: | - tar -czvf ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz -C "${PS3DEV}" . - - name: Archive Folder uses: actions/upload-artifact@v4 with: name: artifact-${{matrix.architecture}} - path: | - ${{github.workspace}}/ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz + path: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz publish-release: needs: build From 1bc901fca8793d03595a6a170208048a3e9199d3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 14:04:37 -0300 Subject: [PATCH 110/136] typo --- .github/workflows/deploy.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 82fc4e60f..8d925c95f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -69,10 +69,6 @@ jobs: - name: Get short SHA id: slug run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - - - name: Compress ps3dev folder - run: | - tar -zcvf ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz ps3dev - name: Get current date id: date @@ -82,6 +78,10 @@ jobs: id: arch run: echo "::set-output name=arch::$(uname -m)" + - name: Compress ps3dev folder + run: | + tar -zcvf ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz ps3dev + - name: Archive Folder uses: actions/upload-artifact@v4 with: @@ -98,8 +98,8 @@ jobs: - name: Create Release id: create_release - uses: softprops/action-gh-release@v1 - # if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') with: files: | ${{ github.workspace }}/*.tar.gz \ No newline at end of file From 939526882d44696d96415eb811b08c86df3d8594 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 14:24:39 -0300 Subject: [PATCH 111/136] tag auto creation --- .github/workflows/deploy.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 8d925c95f..24843453c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -88,6 +88,12 @@ jobs: name: artifact-${{matrix.architecture}} path: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz + - name: Create Tag + run: | + TAG_NAME="v${{ steps.slug.outputs.sha8 }}" + git tag -a $TAG_NAME -m "automatic tag creation" + git push origin $TAG_NAME + publish-release: needs: build runs-on: ubuntu-latest @@ -102,4 +108,5 @@ jobs: if: startsWith(github.ref, 'refs/tags/') with: files: | - ${{ github.workspace }}/*.tar.gz \ No newline at end of file + ${{ github.workspace }}/*.tar.gz + From 883f535f7dc32a272712d899c20a3e01d423f345 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 15:08:51 -0300 Subject: [PATCH 112/136] create-tag@v1 --- .github/workflows/deploy.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 24843453c..31229b37b 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -89,10 +89,11 @@ jobs: path: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz - name: Create Tag - run: | - TAG_NAME="v${{ steps.slug.outputs.sha8 }}" - git tag -a $TAG_NAME -m "automatic tag creation" - git push origin $TAG_NAME + uses: negz/create-tag@v1 + with: + version: ${{ steps.slug.outputs.sha8 }} + message: "automatic tag creation" + token: ${{ secrets.GITHUB_TOKEN }} publish-release: needs: build From 8f655f950a1df4f4cdaceaf0c1d69e7fd4785315 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 15:49:02 -0300 Subject: [PATCH 113/136] tag name semantic version --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 31229b37b..f53e4dde8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -91,7 +91,7 @@ jobs: - name: Create Tag uses: negz/create-tag@v1 with: - version: ${{ steps.slug.outputs.sha8 }} + version: v${{steps.date.outputs.date}}-${{ steps.slug.outputs.sha8 }} message: "automatic tag creation" token: ${{ secrets.GITHUB_TOKEN }} From 77a966e4f0e694657118a586583d61ef3c75f8cf Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 16:04:23 -0300 Subject: [PATCH 114/136] steps.semver.outputs.semver --- .github/workflows/deploy.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f53e4dde8..fcb49752f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -88,10 +88,14 @@ jobs: name: artifact-${{matrix.architecture}} path: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz + - name: Set SemVer + id: semver + run: echo "::set-output name=semver::0.1.0+${{ steps.date.outputs.date }}.${{ steps.slug.outputs.sha8 }}" + - name: Create Tag uses: negz/create-tag@v1 with: - version: v${{steps.date.outputs.date}}-${{ steps.slug.outputs.sha8 }} + version: ${{steps.semver.outputs.semver}} message: "automatic tag creation" token: ${{ secrets.GITHUB_TOKEN }} From 9e951a784b14bee2aec442c32093a6e748f5248d Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 17:04:59 -0300 Subject: [PATCH 115/136] Check if Tag Exists --- .github/workflows/deploy.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index fcb49752f..dac0bfec0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -91,8 +91,21 @@ jobs: - name: Set SemVer id: semver run: echo "::set-output name=semver::0.1.0+${{ steps.date.outputs.date }}.${{ steps.slug.outputs.sha8 }}" - + + - name: Check if Tag Exists + id: check_tag + run: | + tag_exists=$(git tag --list "${{ steps.semver.outputs.semver }}" | wc -l) + if [ "$tag_exists" -eq "0" ]; then + echo "Tag does not exist." + echo "::set-output name=tag_exists::false" + else + echo "Tag already exists." + echo "::set-output name=tag_exists::true" + fi + - name: Create Tag + if: steps.check_tag.outputs.tag_exists == 'false' uses: negz/create-tag@v1 with: version: ${{steps.semver.outputs.semver}} From 8175a5a8280a74940c0ed13359603b93e8585ad1 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 17:54:19 -0300 Subject: [PATCH 116/136] git fetch --tags --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index dac0bfec0..9a56cc8a5 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -95,6 +95,7 @@ jobs: - name: Check if Tag Exists id: check_tag run: | + git fetch --tags tag_exists=$(git tag --list "${{ steps.semver.outputs.semver }}" | wc -l) if [ "$tag_exists" -eq "0" ]; then echo "Tag does not exist." @@ -123,8 +124,8 @@ jobs: - name: Create Release id: create_release uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') with: + tag_name: ${{ needs.build.outputs.semver }} files: | ${{ github.workspace }}/*.tar.gz From 52dbd3cd2b19b82196ab075c53c97349c4700cb0 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 18:06:57 -0300 Subject: [PATCH 117/136] create tag on publish job --- .github/workflows/deploy.yaml | 38 +++++++++++------------------------ 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9a56cc8a5..c4e4d6a2e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -88,32 +88,7 @@ jobs: name: artifact-${{matrix.architecture}} path: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz - - name: Set SemVer - id: semver - run: echo "::set-output name=semver::0.1.0+${{ steps.date.outputs.date }}.${{ steps.slug.outputs.sha8 }}" - - - name: Check if Tag Exists - id: check_tag - run: | - git fetch --tags - tag_exists=$(git tag --list "${{ steps.semver.outputs.semver }}" | wc -l) - if [ "$tag_exists" -eq "0" ]; then - echo "Tag does not exist." - echo "::set-output name=tag_exists::false" - else - echo "Tag already exists." - echo "::set-output name=tag_exists::true" - fi - - - name: Create Tag - if: steps.check_tag.outputs.tag_exists == 'false' - uses: negz/create-tag@v1 - with: - version: ${{steps.semver.outputs.semver}} - message: "automatic tag creation" - token: ${{ secrets.GITHUB_TOKEN }} - - publish-release: + publish: needs: build runs-on: ubuntu-latest @@ -121,6 +96,17 @@ jobs: - name: Download all Artifact uses: actions/download-artifact@v4 + - name: Set SemVer + id: semver + run: echo "::set-output name=semver::0.1.0+${{ steps.date.outputs.date }}.${{ steps.slug.outputs.sha8 }}" + + - name: Create Tag + uses: negz/create-tag@v1 + with: + version: ${{ steps.semver.outputs.semver }} + message: "automatic tag creation" + token: ${{ secrets.GITHUB_TOKEN }} + - name: Create Release id: create_release uses: softprops/action-gh-release@v2 From 10fd2341572f414c37aeac65a7a8b054f219b67c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 18:56:35 -0300 Subject: [PATCH 118/136] needs.build.outputs.sha8 --- .github/workflows/deploy.yaml | 11 ++++++++--- Dockerfile | 7 ++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c4e4d6a2e..542f6d7ca 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -10,6 +10,7 @@ on: jobs: build: runs-on: ${{ matrix.os }} + strategy: matrix: os: [ubuntu-latest] @@ -20,6 +21,10 @@ jobs: env: BASH_ENV: "~/.bashrc" + outputs: + sha8: ${{ steps.slug.outputs.sha8 }} + date: ${{ steps.date.outputs.date }} + steps: - uses: actions/checkout@v4 @@ -86,7 +91,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: artifact-${{matrix.architecture}} - path: ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz + path: ps3dev-${{matrix.os}}-${{matrix.architecture}}-${{steps.date.outputs.date}}.tar.gz publish: needs: build @@ -98,7 +103,7 @@ jobs: - name: Set SemVer id: semver - run: echo "::set-output name=semver::0.1.0+${{ steps.date.outputs.date }}.${{ steps.slug.outputs.sha8 }}" + run: echo "::set-output name=semver::0.1.0+${{ needs.build.outputs.date }}.${{ needs.build.outputs.sha8 }}" - name: Create Tag uses: negz/create-tag@v1 @@ -111,7 +116,7 @@ jobs: id: create_release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ needs.build.outputs.semver }} + tag_name: ${{ steps.semver.outputs.semver }} files: | ${{ github.workspace }}/*.tar.gz diff --git a/Dockerfile b/Dockerfile index 708e9b61c..98590a9cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,7 @@ ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/por ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig COPY --from=builder ${PS3DEV} ${PS3DEV} -# How to build multi platform image -# docker buildx create --use -# docker buildx build --platform linux/amd64,linux/arm64 -t ps3dev:latest . \ No newline at end of file +# How to build and run a multi platform image +# Tested platforms: linux/amd64 or linux/arm64 +# DOCKER_DEFAULT_PLATFORM=linux/arm64 docker build . -t ps3dev +# DOCKER_DEFAULT_PLATFORM=linux/arm64 docker run -it -v `pwd`:/build -w /build ps3dev \ No newline at end of file From f18bd35d791c20bd5ff3ce9f5e0c894dcccbbc08 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 18:58:10 -0300 Subject: [PATCH 119/136] add macos-latest --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 542f6d7ca..b64443eec 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] architecture: [x64, arm64] defaults: run: @@ -90,7 +90,7 @@ jobs: - name: Archive Folder uses: actions/upload-artifact@v4 with: - name: artifact-${{matrix.architecture}} + name: ${{matrix.os}}-${{matrix.architecture}} path: ps3dev-${{matrix.os}}-${{matrix.architecture}}-${{steps.date.outputs.date}}.tar.gz publish: From 72718dc79f24f01e34c5592c4c81af84f3ebda3d Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 19:08:55 -0300 Subject: [PATCH 120/136] docker build/push without qemu --- .github/workflows/deploy-docker.yaml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 051774f00..65d54dc04 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -21,7 +21,7 @@ jobs: os: [ubuntu-latest] platform: - linux/amd64 - # - linux/arm64 + - linux/arm64 env: DOCKERHUB_REPONAME: ps3dev DOCKERHUB_REPOTAG: latest @@ -42,12 +42,6 @@ jobs: short_description: 'A Docker Image for PS3 Development' readme_file: 'README.md' - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -56,9 +50,6 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v5 - with: - context: . - platforms: ${{ matrix.platform }} - push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} + run: | + DOCKER_DEFAULT_PLATFORM=${{ matrix.platform }} docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} . + DOCKER_DEFAULT_PLATFORM=${{ matrix.platform }} docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} \ No newline at end of file From edca12c123c82e5fccb341931ee2d24438be3955 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 19:14:06 -0300 Subject: [PATCH 121/136] arch[x64,arm64] --- .github/workflows/deploy-docker.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 65d54dc04..e1dcbfeb6 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -19,9 +19,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - platform: - - linux/amd64 - - linux/arm64 + architecture: [x64, arm64] env: DOCKERHUB_REPONAME: ps3dev DOCKERHUB_REPOTAG: latest @@ -51,5 +49,5 @@ jobs: - name: Build and push id: docker_build run: | - DOCKER_DEFAULT_PLATFORM=${{ matrix.platform }} docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} . - DOCKER_DEFAULT_PLATFORM=${{ matrix.platform }} docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} \ No newline at end of file + docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} . + docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} \ No newline at end of file From dc963ff64cafd728928bf146474403a2e0f93ff7 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 19:24:09 -0300 Subject: [PATCH 122/136] ubuntu arm not supported for gha --- .github/workflows/deploy-docker.yaml | 6 +++++- .github/workflows/deploy.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index e1dcbfeb6..7ac0477dc 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - architecture: [x64, arm64] + architecture: [x64] env: DOCKERHUB_REPONAME: ps3dev DOCKERHUB_REPOTAG: latest @@ -46,6 +46,10 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get current arch + id: arch + run: echo "::set-output name=arch::$(uname -m)" + - name: Build and push id: docker_build run: | diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b64443eec..7cd744c43 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - architecture: [x64, arm64] + architecture: [x64] defaults: run: shell: bash From ccf1da7ef1f695723c8ba115727c2fdcd16fd143 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 19:32:13 -0300 Subject: [PATCH 123/136] add qemu --- .github/workflows/deploy-docker.yaml | 34 +++++++++++++++------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 7ac0477dc..db8e579e7 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -13,16 +13,10 @@ on: jobs: dockerhub-push: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest environment: DockerHub - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - architecture: [x64] env: DOCKERHUB_REPONAME: ps3dev - DOCKERHUB_REPOTAG: latest steps: @@ -40,18 +34,26 @@ jobs: short_description: 'A Docker Image for PS3 Development' readme_file: 'README.md' + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get current arch - id: arch - run: echo "::set-output name=arch::$(uname -m)" - - - name: Build and push - id: docker_build - run: | - docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} . - docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} \ No newline at end of file + - name: Build and Push Docker Image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{env.DOCKERHUB_REPONAME}}:latest + ${{env.DOCKERHUB_REPONAME}}:amd64 + ${{env.DOCKERHUB_REPONAME}}:arm64 \ No newline at end of file From 5b403d9f7c332a984bd3e1703a6851c8ab3651d7 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 21:07:00 -0300 Subject: [PATCH 124/136] qemu matrix platform --- .github/workflows/deploy-docker.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index db8e579e7..fa23e8bb9 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -17,7 +17,10 @@ jobs: environment: DockerHub env: DOCKERHUB_REPONAME: ps3dev - + strategy: + matrix: + platform: [linux/amd64, linux/arm64] + steps: - name: Checkout @@ -36,6 +39,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + with: + platforms: ${{ matrix.platform }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -51,9 +56,8 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64 + platform: ${{ matrix.platform }} push: true tags: | - ${{env.DOCKERHUB_REPONAME}}:latest - ${{env.DOCKERHUB_REPONAME}}:amd64 - ${{env.DOCKERHUB_REPONAME}}:arm64 \ No newline at end of file + ${{env.DOCKERHUB_REPONAME}}:${{ matrix.platform }} + ${{env.DOCKERHUB_REPONAME}}:${{ matrix.platform }} \ No newline at end of file From 1c8468e87e59c0d7f9e5fa7fce8ccb88fe149ae1 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 21:08:40 -0300 Subject: [PATCH 125/136] typo --- .github/workflows/deploy-docker.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index fa23e8bb9..95f4bee89 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -58,6 +58,4 @@ jobs: file: ./Dockerfile platform: ${{ matrix.platform }} push: true - tags: | - ${{env.DOCKERHUB_REPONAME}}:${{ matrix.platform }} - ${{env.DOCKERHUB_REPONAME}}:${{ matrix.platform }} \ No newline at end of file + tags: ${{env.DOCKERHUB_REPONAME}}:${{ matrix.platform }} \ No newline at end of file From f2df629a71207c53c36fff13ab2fce25c2c05b5c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 21:09:48 -0300 Subject: [PATCH 126/136] typo --- .github/workflows/deploy-docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 95f4bee89..181b5e90e 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -58,4 +58,4 @@ jobs: file: ./Dockerfile platform: ${{ matrix.platform }} push: true - tags: ${{env.DOCKERHUB_REPONAME}}:${{ matrix.platform }} \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ matrix.platform }} \ No newline at end of file From 5b1eeaf0528fb2a99f687d0493c2b07fc941cb08 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 21:18:30 -0300 Subject: [PATCH 127/136] platforms: ${{ matrix.platform }} --- .github/workflows/deploy-docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 181b5e90e..18ea5f6bd 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -56,6 +56,6 @@ jobs: with: context: . file: ./Dockerfile - platform: ${{ matrix.platform }} + platforms: ${{ matrix.platform }} push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ matrix.platform }} \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:latest \ No newline at end of file From 03ef1e6e9a5ee11cf518c5981c89bf46be2804ed Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 21:44:42 -0300 Subject: [PATCH 128/136] typo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7cd744c43..daaa1f4ef 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -91,7 +91,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{matrix.os}}-${{matrix.architecture}} - path: ps3dev-${{matrix.os}}-${{matrix.architecture}}-${{steps.date.outputs.date}}.tar.gz + path: ps3dev-*.tar.gz publish: needs: build From 49b062ef78d84a54c3919735c5677267abacd76b Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 21:49:17 -0300 Subject: [PATCH 129/136] macos-14 --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index daaa1f4ef..2e04cee13 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-14] architecture: [x64] defaults: run: @@ -36,7 +36,7 @@ jobs: if [ "$(uname -m)" = "x86_64" ]; then sudo apt install -y nvidia-cg-toolkit ; fi - name: Install macOS requirements - if: matrix.os == 'macos-latest' + if: startsWith(matrix.os, 'macos') # act -P macos-latest=-self-hosted --container-architecture linux/amd64 run: | brew update From 2ae56962ad7a64c417e60ad237d2bb9a98bbb478 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 22:10:12 -0300 Subject: [PATCH 130/136] source ~/.bashrc --- .github/workflows/deploy.yaml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2e04cee13..b05bff7d8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,8 +18,6 @@ jobs: defaults: run: shell: bash - env: - BASH_ENV: "~/.bashrc" outputs: sha8: ${{ steps.slug.outputs.sha8 }} @@ -27,9 +25,21 @@ jobs: steps: - uses: actions/checkout@v4 - + + - name: Get short SHA + id: slug + run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + + - name: Get current arch + id: arch + run: echo "::set-output name=arch::$(uname -m)" + - name: Install Ubuntu requirements - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu') run: | sudo apt update sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev && \ @@ -61,6 +71,7 @@ jobs: - name: Runs all the stages in the shell run: | + source ~/.bashrc mkdir -p $PWD/ps3dev export PS3DEV=$PWD/ps3dev export PSL1GHT=$PS3DEV @@ -71,18 +82,6 @@ jobs: export PKG_CONFIG_PATH=$PS3DEV/portlibs/ppu/lib/pkgconfig ./toolchain.sh - - name: Get short SHA - id: slug - run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - - - name: Get current arch - id: arch - run: echo "::set-output name=arch::$(uname -m)" - - name: Compress ps3dev folder run: | tar -zcvf ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz ps3dev @@ -91,7 +90,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{matrix.os}}-${{matrix.architecture}} - path: ps3dev-*.tar.gz + path: *.tar.gz publish: needs: build From e30a10b2c26dbf9d6ea9c45b98fb8d1de2aa45a0 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 22:11:07 -0300 Subject: [PATCH 131/136] typo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b05bff7d8..79590cef5 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -90,7 +90,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{matrix.os}}-${{matrix.architecture}} - path: *.tar.gz + path: ps3dev-*.tar.gz publish: needs: build From fb853f0888cfd291f87b6ab7da239970cc316dea Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 22:21:28 -0300 Subject: [PATCH 132/136] force loading .bashrc --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 79590cef5..0d011d803 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -68,10 +68,11 @@ jobs: pyenv global 3.11.0 pip install python-config echo 'pyenv global 3.11.0' >> ~/.bashrc + echo 'echo bashrc loaded' >> ~/.bashrc - name: Runs all the stages in the shell run: | - source ~/.bashrc + . ~/.bashrc mkdir -p $PWD/ps3dev export PS3DEV=$PWD/ps3dev export PSL1GHT=$PS3DEV From 1acdfb56c538de3c2f90d8ffb6633016c34c0936 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 22:27:02 -0300 Subject: [PATCH 133/136] pyenv init --path --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0d011d803..4fdfd815a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -67,6 +67,7 @@ jobs: # Set Python 3.11 as the global version pyenv global 3.11.0 pip install python-config + echo 'eval "$(pyenv init --path)"' >> ~/.bashrc echo 'pyenv global 3.11.0' >> ~/.bashrc echo 'echo bashrc loaded' >> ~/.bashrc From 1defaf30d310373c7821dfab359333d69ed70a70 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 22:38:14 -0300 Subject: [PATCH 134/136] macos-latest --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4fdfd815a..7167ad0f0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, macos-latest] architecture: [x64] defaults: run: From 5f7ca93fdd06d1d2f6dfb483ff69047a3747a2eb Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 7 Apr 2024 23:57:05 -0300 Subject: [PATCH 135/136] remove arm64 --- .github/workflows/deploy-docker.yaml | 2 +- .github/workflows/deploy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 18ea5f6bd..ff2c88036 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -19,7 +19,7 @@ jobs: DOCKERHUB_REPONAME: ps3dev strategy: matrix: - platform: [linux/amd64, linux/arm64] + platform: [linux/amd64] steps: diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7167ad0f0..738c9022f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] architecture: [x64] defaults: run: From da9c7f75fad22e45b61fbdd286ae5de5d8ac28ce Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 8 Apr 2024 00:36:10 -0300 Subject: [PATCH 136/136] recursive file path --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 738c9022f..334b3f84d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -119,5 +119,5 @@ jobs: with: tag_name: ${{ steps.semver.outputs.semver }} files: | - ${{ github.workspace }}/*.tar.gz + ${{ github.workspace }}/**/*.tar.gz