Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions 0ad/0ad-fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- a/build.sh 2023-04-20 17:19:57.567640306 +0800
+++ b/build.sh 2023-04-20 17:20:56.920551226 +0800
@@ -140,6 +140,7 @@
${CONF_OPTS} \
--enable-debug \
--disable-optimize \
+ --disable-new-pass-manager \
--enable-gczeal
${MAKE} ${MAKE_OPTS}
cd ..
@@ -151,6 +152,7 @@
LLVM_OBJDUMP="${LLVM_OBJDUMP}" \
${CONF_OPTS} \
+ --disable-new-pass-manager \
--enable-optimize
${MAKE} ${MAKE_OPTS}
cd ..

97 changes: 97 additions & 0 deletions 0ad/0ad-la64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/build/gyp_base.mozbuild b/libraries/source/spidermonkey/mozjs-78.6.0/build/gyp_base.mozbuild
index 9344cc4e7..6c3f64524 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/build/gyp_base.mozbuild
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/build/gyp_base.mozbuild
@@ -32,6 +32,7 @@ arches = {
'x86_64': 'x64',
'x86': 'ia32',
'aarch64': 'arm64',
+ 'loongarch64': 'loongarch64',
}

gyp_vars['host_arch'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH'])
diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/build/moz.configure/init.configure b/libraries/source/spidermonkey/mozjs-78.6.0/build/moz.configure/init.configure
index 2fdeb5497..3a906aef8 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/build/moz.configure/init.configure
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/build/moz.configure/init.configure
@@ -738,6 +738,9 @@ def split_triplet(triplet, allow_msvc=False):
elif cpu.startswith('aarch64'):
canonical_cpu = 'aarch64'
endianness = 'little'
+ elif cpu.startswith('loongarch64'):
+ canonical_cpu = 'loongarch64'
+ endianness = 'little'
elif cpu == 'sh4':
canonical_cpu = 'sh4'
endianness = 'little'
diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/intl/icu/source/i18n/double-conversion-utils.h b/libraries/source/spidermonkey/mozjs-78.6.0/intl/icu/source/i18n/double-conversion-utils.h
index 8c6a0e16e..afb63176d 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/intl/icu/source/i18n/double-conversion-utils.h
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/intl/icu/source/i18n/double-conversion-utils.h
@@ -123,6 +123,7 @@ int main(int argc, char** argv) {
defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
defined(__SH4__) || defined(__alpha__) || \
+ defined(__loongarch64) || \
defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
defined(__riscv) || defined(__e2k__) || \
diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/js/src/jit/AtomicOperations.h b/libraries/source/spidermonkey/mozjs-78.6.0/js/src/jit/AtomicOperations.h
index 0486cbad1..0a95e11e7 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/js/src/jit/AtomicOperations.h
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/js/src/jit/AtomicOperations.h
@@ -391,7 +391,7 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
#elif defined(__ppc__) || defined(__PPC__) || defined(__sparc__) || \
defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) || \
- defined(__sh__) || defined(__s390__) || defined(__s390x__)
+ defined(__loongarch64) || defined(__sh__) || defined(__s390__) || defined(__s390x__)
# include "jit/shared/AtomicOperations-feeling-lucky.h"
#else
# error "No AtomicOperations support provided for this platform"
diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/double-conversion/double-conversion/utils.h b/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/double-conversion/double-conversion/utils.h
index f031495b7..55a40ab39 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/double-conversion/double-conversion/utils.h
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/double-conversion/double-conversion/utils.h
@@ -93,6 +93,7 @@ int main(int argc, char** argv) {
#if defined(_M_X64) || defined(__x86_64__) || \
defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
defined(__hppa__) || defined(__ia64__) || \
+ defined(__loongarch__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/tests/TestPoisonArea.cpp b/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/tests/TestPoisonArea.cpp
index fbd336471..1de67549e 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/tests/TestPoisonArea.cpp
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/mfbt/tests/TestPoisonArea.cpp
@@ -141,6 +141,9 @@
#elif defined __hppa
# define RETURN_INSTR 0xe840c002 /* bv,n r0(rp) */

+#elif defined __loongarch64
+# define RETURN_INSTR 0x4c000020 /* jirl */
+
#elif defined __mips
# define RETURN_INSTR 0x03e00008 /* jr ra */

diff --git a/libraries/source/spidermonkey/mozjs-78.6.0/python/mozbuild/mozbuild/configure/constants.py b/libraries/source/spidermonkey/mozjs-78.6.0/python/mozbuild/mozbuild/configure/constants.py
index 7542dcdc6..87e1461be 100644
--- a/libraries/source/spidermonkey/mozjs-78.6.0/python/mozbuild/mozbuild/configure/constants.py
+++ b/libraries/source/spidermonkey/mozjs-78.6.0/python/mozbuild/mozbuild/configure/constants.py
@@ -45,6 +45,7 @@ CPU_bitness = {
'arm': 32,
'hppa': 32,
'ia64': 64,
+ 'loongarch64': 64,
'mips32': 32,
'mips64': 64,
'ppc': 32,
@@ -83,6 +84,7 @@ CPU_preprocessor_checks = OrderedDict((
('ppc', '__powerpc__'),
('Alpha', '__alpha__'),
('hppa', '__hppa__'),
+ ('loongarch64', '__loongarch64'),
('sparc64', '__sparc__ && __arch64__'),
('sparc', '__sparc__'),
('mips64', '__mips64'),
14 changes: 12 additions & 2 deletions 0ad/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ source=("https://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz"
fix_python_3.11_ftbfs.patch
https://github.com/0ad/0ad/commit/839edc3a.patch
https://github.com/0ad/0ad/commit/093e1eb2.patch
https://github.com/0ad/0ad/commit/d2426312.patch)
https://github.com/0ad/0ad/commit/d2426312.patch
0ad-fix-build.patch
0ad-la64.patch)
sha512sums=('aaf647d5d8454c244015d2a198beeaaebc571a5bc96446f3acff8dbd05f9843029c500bf4162651a5e1fcdb42bd5fb5b4f5c512c78372479fbd8565dd093f272'
'3a0f935ab05e1c0d6a926ba02a5ed72afbb94b6910acaad77661b927680f192a06c7614287fad2ff8a54e3e1ee814614c9abfc9497a27e86b9e58ae1f6eebbfb'
'748a75420541947e2a215b3a8789a0e137179e4981d0977e1c4b20cd7b86af2d96b9976e04d60ace8d5ee465d542cadc42ee9bceedaaa97d2b320f533e3e3892'
'1dfc8a0c6ac29040f72d9bbf6b631a74cbdec444b9078a015345139228666354d9b5059f85b640ce3afc0f590bcbe8afd5e158509a0c95751e1cd69fece46876'
'a7fd1454385f56b7c8cb0fc6ac001761d4419df4aeec570ba846c7df4eb327d25b9ff1a7946cb334315109fa90ca2c1820583619f4e1ec5d53805afa08e10093'
'5f32d47f01d845e07b2f919c9b04ac5e50dc9977fa97f981eba4a53677a29d797d0d76bc385ac047dd7c7d24af7d95cd8256d433bd43ce1a6606763c0ea736cb')
'5f32d47f01d845e07b2f919c9b04ac5e50dc9977fa97f981eba4a53677a29d797d0d76bc385ac047dd7c7d24af7d95cd8256d433bd43ce1a6606763c0ea736cb'
'956effc37bbad8ca44a5e82a8750ca82c1c2347152dd684ebc2921953d4fa81ef9291b5bb5de05559b2b4ef79c336b837216892f0bcf806e50aac8c4ea42edde'
'c01e52a4241736eda82f6002c3627d9c4b5b505109969fc608d95dd71db8681df8f3de6a372bca8fe977bee14f5180f4c27681e40d26b0a06ddc556122886d04')

prepare() {
cd "$pkgname-$_pkgver"
Expand All @@ -36,6 +40,12 @@ prepare() {
patch -p1 -i ../839edc3a.patch # Fix build with fmt 10
patch -p1 -i ../093e1eb2.patch # Fix build with GCC 13
patch -p1 -i ../d2426312.patch # Fix build with libxml2 2.12

patch -d libraries/source/spidermonkey -p1 -i $srcdir/0ad-fix-build.patch
cp $srcdir/0ad-la64.patch libraries/source/spidermonkey/0ad-la64.patch
echo "patch -p5 < ../0ad-la64.patch" >> libraries/source/spidermonkey/patch.sh

echo "cp /usr/share/automake-1.16/config.* build/autoconf/" >> libraries/source/spidermonkey/patch.sh
}

build() {
Expand Down
2 changes: 2 additions & 0 deletions a2ps/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ prepare() {

build() {
cd ${pkgname}-${pkgver}
CFLAGS=${CFLAGS/-Wformat -Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Wformat -Werror=format-security/}
libtoolize --force --copy
autoreconf --force --install -I m4
LIBS+="-lm" ./configure --prefix=/usr --sysconfdir=/etc/a2ps \
Expand Down
2 changes: 1 addition & 1 deletion aardvark-dns/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pkgver() {

prepare() {
cd $pkgname
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
cargo fetch --locked --target "`uname -m`-unknown-linux-gnu"
}

build() {
Expand Down
7 changes: 5 additions & 2 deletions abseil-cpp/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ license=('Apache')
depends=('gcc-libs')
makedepends=('cmake' 'gtest')
source=("https://github.com/abseil/abseil-cpp/archive/$pkgver/$pkgname-$pkgver.tar.gz"
scoped-mock-log.patch)
scoped-mock-log.patch
abseil-cpp-la64.patch)
sha256sums=('987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed'
'a6cbc612a2b96fcbd52d081e03e8581107ceb4827edb19d96510a31c568e1396')
'a6cbc612a2b96fcbd52d081e03e8581107ceb4827edb19d96510a31c568e1396'
'8817cf256a94dd9059bccd540a4d6bbe0d9606c600e8543a1b1011226c350b23')

prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 -i ../scoped-mock-log.patch # Install target needed by protobuf
patch -p1 -i $srcdir/abseil-cpp-la64.patch
}

build() {
Expand Down
13 changes: 13 additions & 0 deletions abseil-cpp/abseil-cpp-la64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: abseil-cpp-20211102.0/absl/debugging/internal/examine_stack.cc
===================================================================
--- abseil-cpp-20211102.0.orig/absl/debugging/internal/examine_stack.cc
+++ abseil-cpp-20211102.0/absl/debugging/internal/examine_stack.cc
@@ -57,6 +57,8 @@ void* GetProgramCounter(void* vuc) {
return reinterpret_cast<void*>(context->uc_mcontext.gregs[14]);
#elif defined(__ia64__)
return reinterpret_cast<void*>(context->uc_mcontext.sc_ip);
+#elif defined(__loongarch64)
+ return reinterpret_cast<void*>(context->uc_mcontext.__pc);
#elif defined(__m68k__)
return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]);
#elif defined(__mips__)
11 changes: 9 additions & 2 deletions acme-redirect/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ validpgpkeys=("64B13F7117D6E07D661BBCE0FE763A64F5E54FD6")

prepare() {
cd "${pkgname}-${pkgver}"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
mkdir .cargo
cat > .cargo/config.toml <<EOF
[source]
[source.crates-io]
registry = "https://gitee.com/yetist/crates.io-index"
EOF
cargo update
cargo fetch --target "`uname -m`-unknown-linux-gnu"
}

build() {
cd "${pkgname}-${pkgver}"
CFLAGS+=' -ffat-lto-objects'
cargo build --frozen --release
cargo build --release
make docs
}

Expand Down
2 changes: 1 addition & 1 deletion acpi_call-lts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package() {
_kernver=$(</usr/src/linux-lts/version)

install -Dt "$pkgdir/usr/lib/modules/$_kernver/extramodules" -m0644 \
acpi_call/${pkgver}/$_kernver/$CARCH/module/*
acpi_call/${pkgver}/$_kernver/`uname -m`/module/*

# compress each module individually
find "$pkgdir" -name '*.ko' -exec xz -T1 {} +
Expand Down
2 changes: 1 addition & 1 deletion acpi_call/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package() {
_kernver=$(</usr/src/linux/version)

install -Dt "$pkgdir/usr/lib/modules/$_kernver/extramodules" -m0644 \
acpi_call/${pkgver}/$_kernver/$CARCH/module/*
acpi_call/${pkgver}/$_kernver/`uname -m`/module/*

# compress each module individually
find "$pkgdir" -name '*.ko' -exec xz -T1 {} +
Expand Down
10 changes: 9 additions & 1 deletion acpica/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ options=(!makeflags)
# https://github.com/acpica/acpica/issues/886
# https://github.com/acpica/acpica/issues/883
# https://github.com/acpica/acpica/issues/857
source=(https://downloadmirror.intel.com/783534/$pkgname-unix-$pkgver.tar.gz)
source=(https://downloadmirror.intel.com/783534/$pkgname-unix-$pkgver.tar.gz
acpica-fix-build.patch
acpica-unix-la64.patch)
sha512sums=('d726e69ebd8b8110690e3aff8d1919b43b0a2185efdeb9131ea8d89d321ca3a318a89c721ea740ae366f31ed3d1c11c2906f8807ee8a190e6f67fe5b2023cea4')
b2sums=('c560b8ea1f91f46aa505929d04133636f31fe01a06463e9a4cfafef6f40136a2321de17a9165fca22ee67a64267bc823ed12b2b6054451cf8346540e509c284b')

prepare() {
cd acpica-unix-${pkgver}
patch -p1 -i "$srcdir/acpica-fix-build.patch"
patch -p1 -i "$srcdir/$pkgname-unix-la64.patch"
}

build() {
NOWERROR=TRUE make -C $pkgname-unix-$pkgver
}
Expand Down
13 changes: 13 additions & 0 deletions acpica/acpica-fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: acpica-unix-20211217/source/components/utilities/utdebug.c
===================================================================
--- acpica-unix-20211217.orig/source/components/utilities/utdebug.c
+++ acpica-unix-20211217/source/components/utilities/utdebug.c
@@ -182,7 +182,7 @@ void
AcpiUtInitStackPtrTrace (
void)
{
- ACPI_SIZE CurrentSp;
+ static ACPI_SIZE CurrentSp;


AcpiGbl_EntryStackPointer = &CurrentSp;
39 changes: 39 additions & 0 deletions acpica/acpica-unix-la64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Index: acpica-unix-20210331/source/include/platform/acefi.h
===================================================================
--- acpica-unix-20210331.orig/source/include/platform/acefi.h
+++ acpica-unix-20210331/source/include/platform/acefi.h
@@ -173,7 +173,7 @@

#endif

-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__loongarch64)
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
#define USE_MS_ABI 1
#endif
@@ -189,11 +189,11 @@

#define VOID void

-#if defined(__ia64__) || defined(__x86_64__)
+#if defined(__ia64__) || defined(__x86_64__) || defined(__loongarch64)

#define ACPI_MACHINE_WIDTH 64

-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__loongarch64)

/* for x86_64, EFI_FUNCTION_WRAPPER must be defined */

Index: acpica-unix-20210331/source/include/platform/aclinux.h
===================================================================
--- acpica-unix-20210331.orig/source/include/platform/aclinux.h
+++ acpica-unix-20210331/source/include/platform/aclinux.h
@@ -325,6 +325,7 @@
#if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\
defined(__aarch64__) || defined(__PPC64__) ||\
defined(__s390x__) ||\
+ defined(__loongarch64) ||\
(defined(__riscv) && (defined(__LP64__) || defined(_LP64)))
#define ACPI_MACHINE_WIDTH 64
#define COMPILER_DEPENDENT_INT64 long
2 changes: 1 addition & 1 deletion aida-x/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,5 @@ package_aida-x-vst3() {
)

# mv -v $pkgname/* "$pkgdir"
install -vDm 755 build/bin/$_name.vst3/Contents/$CARCH-linux/*.so -t "$pkgdir/usr/lib/vst3/$_name.vst3/Contents/$CARCH-linux/"
install -vDm 755 build/bin/$_name.vst3/Contents/`uname -m`-linux/*.so -t "$pkgdir/usr/lib/vst3/$_name.vst3/Contents/`uname -m`-linux/"
}
9 changes: 7 additions & 2 deletions aiksaurus/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,24 @@ arch=('loong64' 'x86_64')
depends=('gcc-libs')
source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
aiksaurus-gcc44.patch
format-security.patch)
format-security.patch
aiksaurus-fix-build.patch)
sha512sums=('48591850f28f1a8f4b4986df14090ef7bd57cbfbad739cb0013db021f6f5bcb3c592b38e36774735499e27b9e99330504f8d9c6022158e25469cbc81d13f7463'
'66db53f7499425eb1ff572df4a674f378ed681edeb48ea5926b21d39c8a399c36740e03de101e23a47e043fcce29f66a03c64dc813dc5beda1043d0057711fa5'
'72ebdc63cbb2c56bd8274f92501cbbae8c66e7d81b11b8fdeda38149da4bf44ab88699d248093eedc9813f6cd60e2a1f360fb39d778b4b7827777b1d003ab1dc')
'72ebdc63cbb2c56bd8274f92501cbbae8c66e7d81b11b8fdeda38149da4bf44ab88699d248093eedc9813f6cd60e2a1f360fb39d778b4b7827777b1d003ab1dc'
'bcbffca8b6632b708550da7c15c46457f6e9b74e4bd5705c0310a51f0bf37ba215e328a88e7f4d870276414d646aa64c88933ab22dd64d6b69215030958b1a4e')

prepare() {
cd $pkgname-$pkgver
patch -p1 < ../format-security.patch
patch -p0 < ../aiksaurus-gcc44.patch
patch -p1 -i $srcdir/aiksaurus-fix-build.patch
}

build() {
cd ${pkgname}-${pkgver}
CFLAGS=${CFLAGS/-Wformat -Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Wformat -Werror=format-security/}

export CXXFLAGS+=' -std=c++14'
./configure --prefix=/usr
Expand Down
Loading