~alpine/aports

[alpine-aports] [PATCH] main/kamailio: fix build on mips*

alpine-mips-patches <info@mobile-stream.com>
Details
Message ID
<20181219085623.E804D5B32C@mx12.valuehost.ru>
Sender timestamp
1545205485
DKIM signature
missing
Download raw message
Patch: +33 -1
---
 main/kamailio/APKBUILD                       |  4 ++-
 main/kamailio/dont-force-mips-revision.patch | 30 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 main/kamailio/dont-force-mips-revision.patch

diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD
index fcdfeb1001..64383ee271 100644
--- a/main/kamailio/APKBUILD
+++ b/main/kamailio/APKBUILD
@@ -5,7 +5,7 @@

pkgname=kamailio
pkgver=5.1.6
pkgrel=1
pkgrel=2

# If building from a git snapshot, specify the gitcommit
# If building a proper release, leave gitcommit blank
@@ -251,6 +251,7 @@ done
source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
	0001-kamdbctl.base.patch
	0004-src_core_tcp_read_c.patch
	dont-force-mips-revision.patch
	kamailio.initd
	"

@@ -540,4 +541,5 @@ sipdump() {
sha512sums="2c0cf533cdcdf3b2b71bc625d7fa0fb070a4e61cb764272521c64da696a5203b12235e792edb5828932fc2ff917ec2de7dc36f1e9aa686eb7fd00ec50c08c98d  kamailio-5.1.6.tar.gz
6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076  0004-src_core_tcp_read_c.patch
100a40ec63eaf62f8ac794f1bb17e8109030413617e61a7d2f55a8c8efbe26c1f0f611e6d99548638001f1af678fb7129a98db175eb02190c85d31f60af52202  dont-force-mips-revision.patch
321b1b160434150bcde3c0ad7f47ddf259791b68d4ce74ba4c35034026421a2bc6f5e86f26f393f5fcdb523d8cd75f944709473065553ce860b0ea06b3dc2a1b  kamailio.initd"
diff --git a/main/kamailio/dont-force-mips-revision.patch b/main/kamailio/dont-force-mips-revision.patch
new file mode 100644
index 0000000000..154772304e
--- /dev/null
+++ b/main/kamailio/dont-force-mips-revision.patch
@@ -0,0 +1,30 @@
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -321,7 +321,8 @@
 
 mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1
 mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \
-			_MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4
+			_MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4 \
+			_MIPS_ISA_MIPS32
 mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64
 
 alpha_macros= __alpha__ __alpha _M_ALPHA_
@@ -1364,7 +1365,7 @@
 ifeq		($(CC_NAME), gcc)
 				C_DEFS+=-DCC_GCC_LIKE_ASM
 				#common stuff
-				CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE)
+				CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
 			#if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
 					CFLAGS+=-ftree-vectorize -fno-strict-overflow
@@ -1410,7 +1411,7 @@
 ifeq		($(CC_NAME), gcc)
 				C_DEFS+=-DCC_GCC_LIKE_ASM
 				#common stuff
-				CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE)
+				CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
 			#if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
 					CFLAGS+=-ftree-vectorize -fno-strict-overflow
-- 
2.19.2




---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)