public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: ZhengYu He <hezhy472013@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/asterisk] epel8: Add support for riscv64
Date: Mon, 02 Nov 2026 14:33:29 GMT	[thread overview]
Message-ID: <179363000948.1.18166506572887082674.rpms-asterisk-e23323a9a8a4@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/asterisk
            Branch : epel8
            Commit : e23323a9a8a4c2883c8b24300fb25d3bff6fde5c
            Author : ZhengYu He <hezhy472013@gmail.com>
            Date   : 2024-11-24T21:15:56+08:00
            Stats  : +80/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/asterisk/c/e23323a9a8a4c2883c8b24300fb25d3bff6fde5c?branch=epel8

            Log:
            Add support for riscv64

- Do not use -m32/-m64 on riscv64
- Fix pjproject build failure on RISC-V

---
diff --git a/asterisk.spec b/asterisk.spec
index bdb6a24..fe1fc72 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -5,7 +5,7 @@
 %global           jansson_version 2.14
 
 %global           optflags        %{optflags} -Werror-implicit-function-declaration -DLUA_COMPAT_MODULE -fPIC
-%ifarch s390 %{arm} aarch64 %{mips}
+%ifarch s390 %{arm} aarch64 %{mips} riscv64
 %global           ldflags         -Wl,--as-needed,--library-path=%{_libdir} %{__global_ldflags}
 %else
 %global           ldflags         -m%{__isa_bits} -Wl,--as-needed,--library-path=%{_libdir} %{__global_ldflags}
@@ -51,7 +51,7 @@
 Summary:          The Open Source PBX
 Name:             asterisk
 Version:          18.12.1
-Release:          %{?_rc||?_beta:0.}1%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}.10
+Release:          %{?_rc||?_beta:0.}1%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}.11
 # Automatically converted from old format: GPLv2 - review is highly recommended.
 License:          GPL-2.0-only
 URL:              http://www.asterisk.org/
@@ -98,6 +98,10 @@ Patch3:           asterisk-18.12.1-ilbc_macros.patch
 
 Patch4:           asterisk-configure-c99.patch
 
+# Fix pjproject build failure on RISC-V architecture
+# https://github.com/pjsip/pjproject/pull/4173.patch
+Patch5:           pjproject-add-riscv-support.patch
+
 # Asterisk now builds against a bundled copy of pjproject, as they apply some patches
 # directly to pjproject before the build against it
 Provides:         bundled(pjproject) = %{pjsip_version}
@@ -663,6 +667,7 @@ echo '*************************************************************************'
 
 %patch -P4 -p1
 
+%patch -P5 -p1
 cp %{S:3} menuselect.makedeps
 cp %{S:4} menuselect.makeopts
 
@@ -1690,6 +1695,10 @@ fi
 %endif
 
 %changelog
+* Sun Nov 24 2024 Zhengyu He <hezhy472013@gmail.com> - 18.12.1-1.11
+- Do not use -m32/-m64 on riscv64
+- Fix pjproject build failure on RISC-V
+
 * Tue Oct 22 2024 Richard W.M. Jones <rjones@redhat.com> - 18.12.1-1.10
 - Rebuild for Jansson 2.14
   (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/)

diff --git a/pjproject-add-riscv-support.patch b/pjproject-add-riscv-support.patch
new file mode 100644
index 0000000..43c46c9
--- /dev/null
+++ b/pjproject-add-riscv-support.patch
@@ -0,0 +1,69 @@
+diff --git a/third-party/pjproject/patches/4173.patch b/third-party/pjproject/patches/4173.patch
+new file mode 100644
+index 0000000..a893cbf
+--- /dev/null
++++ b/third-party/pjproject/patches/4173.patch
+@@ -0,0 +1,63 @@
++From 7067fc36c97eb4b09a5c0500327ac99f04512078 Mon Sep 17 00:00:00 2001
++From: Guoguo <i@qwq.trade>
++Date: Sun, 24 Nov 2024 17:31:07 +0800
++Subject: [PATCH] Add support for RISC-V
++
++---
++ config.guess                             | 3 +++
++ config.sub                               | 2 ++
++ third_party/webrtc/src/webrtc/typedefs.h | 7 +++++++
++ 3 files changed, 12 insertions(+)
++
++diff --git a/config.guess b/config.guess
++index aa04f04bda..b6f948fdc5 100755
++--- a/config.guess
+++++ b/config.guess
++@@ -979,6 +979,9 @@ EOF
++     ppc:Linux:*:*)
++ 	echo powerpc-unknown-linux-gnu
++ 	exit ;;
+++    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+++	exit ;;
++     s390:Linux:*:* | s390x:Linux:*:*)
++ 	echo ${UNAME_MACHINE}-ibm-linux
++ 	exit ;;
++diff --git a/config.sub b/config.sub
++index 62220cd592..b4c73e19d8 100755
++--- a/config.sub
+++++ b/config.sub
++@@ -304,6 +304,7 @@ case $basic_machine in
++ 	| pdp10 | pdp11 | pj | pjl \
++ 	| powerpc | powerpc64 | powerpc64le | powerpcle \
++ 	| pyramid \
+++	| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
++ 	| rl78 | rx \
++ 	| score \
++ 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
++@@ -419,6 +420,7 @@ case $basic_machine in
++ 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
++ 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
++ 	| pyramid-* \
+++	| riscv-* | riscv32-* | riscv32be-* | riscv64-* | riscv64be-* \
++ 	| rl78-* | romp-* | rs6000-* | rx-* \
++ 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
++ 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
++diff --git a/third_party/webrtc/src/webrtc/typedefs.h b/third_party/webrtc/src/webrtc/typedefs.h
++index 9385befc96..308f5fe982 100644
++--- a/third_party/webrtc/src/webrtc/typedefs.h
+++++ b/third_party/webrtc/src/webrtc/typedefs.h
++@@ -47,6 +47,13 @@
++ #elif defined(__pnacl__)
++ #define WEBRTC_ARCH_32_BITS
++ #define WEBRTC_ARCH_LITTLE_ENDIAN
+++#elif defined(__riscv) || defined(__riscv__)
+++#define WEBRTC_ARCH_LITTLE_ENDIAN
+++#if __riscv_xlen == 64
+++#define WEBRTC_ARCH_64_BITS
+++#else
+++#define WEBRTC_ARCH_32_BITS
+++#endif
++ #else
++ #error Please add support for your architecture in typedefs.h
++ #endif

                 reply	other threads:[~2026-11-02 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179363000948.1.18166506572887082674.rpms-asterisk-e23323a9a8a4@fedoraproject.org \
    --to=hezhy472013@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox