1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Date: Thu, 30 Oct 2014 12:46:42 +0000
From: Dejan Latinovic <Dejan.Latinovic@imgtec.com>
Subject: fix for kamailio
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767500
package kamailio FTBFS on mipsel with an error:
> gcc: error: unrecognized command line option '-minline-all-stringops'
https://buildd.debian.org/status/fetch.php?pkg=kamailio&arch=mipsel&ver=4.2.0-1&stamp=1414487406
The patch below fixes this issue.
Index: kamailio-4.2.0/Makefile.defs
===================================================================
--- kamailio-4.2.0.orig/Makefile.defs
+++ kamailio-4.2.0/Makefile.defs
@@ -1360,12 +1360,13 @@ ifeq ($(CC_NAME), gcc)
CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE)
#if gcc 4.5+ or 4.2+
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
- CFLAGS+=-minline-all-stringops -ftree-vectorize \
- -fno-strict-overflow
+ CFLAGS+=-ftree-vectorize -fno-strict-overflow
+ # not supported on mips: -minline-all-stringops
else
#if gcc 4.0+
ifeq ($(CC_SHORTVER), 4.x)
- CFLAGS+=-minline-all-stringops -ftree-vectorize
+ CFLAGS+=-ftree-vectorize
+ # not supported on mips: -minline-all-stringops
else
#if gcc 3.4+
ifeq ($(CC_SHORTVER), 3.4)
@@ -1405,12 +1406,13 @@ ifeq ($(CC_NAME), gcc)
CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE)
#if gcc 4.5+ or 4.2+
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
- CFLAGS+=-minline-all-stringops -ftree-vectorize \
- -fno-strict-overflow
+ CFLAGS+=-ftree-vectorize -fno-strict-overflow
+ # not supported on mips64: -minline-all-stringops
else
#if gcc 4.0+
ifeq ($(CC_SHORTVER), 4.x)
- CFLAGS+=-minline-all-stringops -ftree-vectorize
+ CFLAGS+=-ftree-vectorize
+ # not supported on mips64: -minline-all-stringops
else
#if gcc 3.4+
ifeq ($(CC_SHORTVER), 3.4)
|