[PATCH] osmo-tetra[master]: Fix ETSI reference codec's patch for building on 64 bit arch...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Dec 18 15:23:28 UTC 2016


Review at  https://gerrit.osmocom.org/1450

Fix ETSI reference codec's patch for building on 64 bit architectures.

merged/ported to osmocom master by Harald Welte

Change-Id: I6b16811d4a3030dfce0718f0b1d266ee1761bfef
---
D etsi_codec-patches/build_as_32bit.patch
A etsi_codec-patches/fix_64bit.patch
D etsi_codec-patches/link_static.patch
M etsi_codec-patches/makefile-cleanups.patch
M etsi_codec-patches/series
5 files changed, 37 insertions(+), 56 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/50/1450/1

diff --git a/etsi_codec-patches/build_as_32bit.patch b/etsi_codec-patches/build_as_32bit.patch
deleted file mode 100644
index 3613f0e..0000000
--- a/etsi_codec-patches/build_as_32bit.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: etsi/amr-code/makefile
-===================================================================
---- etsi.orig/amr-code/makefile	2011-05-29 11:40:11.000000000 +0200
-+++ etsi/amr-code/makefile	2011-05-29 11:40:17.000000000 +0200
-@@ -21,7 +21,7 @@
- 
- CC=gcc
- 
--CFLAGS	=	-g -I. -Wall
-+CFLAGS	=	-g -I. -Wall -m32
- 
- SRCS1		=	ccoder.c	ccod_tet.c	init_params.c	sub_cc.c \
- 			tetra_op.c
-Index: etsi/c-code/makefile
-===================================================================
---- etsi.orig/c-code/makefile	2011-05-29 11:40:02.000000000 +0200
-+++ etsi/c-code/makefile	2011-05-29 11:40:07.000000000 +0200
-@@ -23,7 +23,7 @@
- 
- CC=gcc
- 
--CFLAGS	=	-I. -Wall
-+CFLAGS	=	-I. -Wall -m32
- 
- SRCS1		=	scoder.c		scod_tet.c		sub_sc_d.c \
- 			sub_dsp.c		fbas_tet.c		fexp_tet.c \
diff --git a/etsi_codec-patches/fix_64bit.patch b/etsi_codec-patches/fix_64bit.patch
new file mode 100644
index 0000000..7c65ac7
--- /dev/null
+++ b/etsi_codec-patches/fix_64bit.patch
@@ -0,0 +1,34 @@
+diff -Nruw codec.orig/amr-code/source.h codec/amr-code/source.h
+--- codec.orig/amr-code/source.h	2016-12-18 16:17:46.238404730 +0100
++++ codec/amr-code/source.h	2016-12-18 16:18:21.358545740 +0100
+@@ -19,10 +19,11 @@
+ 
+ #ifndef TYPEDEF_H
+ #define TYPEDEF_H
++#include <stdint.h>
+ 
+ 
+-typedef short Word16;
+-typedef long  Word32;
++typedef int16_t Word16;
++typedef int32_t Word32;
+ typedef int   Flag;
+ 
+ #endif
+diff -Nruw codec.orig/c-code/source.h codec/c-code/source.h
+--- codec.orig/c-code/source.h	2016-12-18 16:17:46.242404746 +0100
++++ codec/c-code/source.h	2016-12-18 16:18:54.494678813 +0100
+@@ -19,10 +19,11 @@
+ 
+ #ifndef TYPEDEF_H
+ #define TYPEDEF_H
++#include <stdint.h>
+ 
+ 
+-typedef short Word16;
+-typedef long  Word32;
++typedef int16_t Word16;
++typedef int32_t Word32;
+ typedef int   Flag;
+ 
+ #endif
diff --git a/etsi_codec-patches/link_static.patch b/etsi_codec-patches/link_static.patch
deleted file mode 100644
index c553c5e..0000000
--- a/etsi_codec-patches/link_static.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -Nruw codec.orig/amr-code/makefile codec/amr-code/makefile
---- codec.orig/amr-code/makefile	2016-12-18 15:57:20.737366601 +0100
-+++ codec/amr-code/makefile	2016-12-18 16:00:02.166031929 +0100
-@@ -21,7 +21,7 @@
- 
- CC=gcc
- 
--CFLAGS	=	-g -I. -Wall -m32
-+CFLAGS	=	-g -I. -Wall -m32 -static
- 
- SRCS1		=	ccoder.c	ccod_tet.c	init_params.c	sub_cc.c \
- 			tetra_op.c
-diff -Nruw codec.orig/c-code/makefile codec/c-code/makefile
---- codec.orig/c-code/makefile	2016-12-18 15:57:20.737366601 +0100
-+++ codec/c-code/makefile	2016-12-18 15:59:55.146002990 +0100
-@@ -23,7 +23,7 @@
- 
- CC=gcc
- 
--CFLAGS	=	-I. -Wall -m32
-+CFLAGS	=	-I. -Wall -m32 -static
- 
- SRCS1		=	scoder.c		scod_tet.c		sub_sc_d.c \
- 			sub_dsp.c		fbas_tet.c		fexp_tet.c \
-Binary files codec.orig/c-code/scoder and codec/c-code/scoder differ
-Binary files codec.orig/c-code/sdecoder and codec/c-code/sdecoder differ
diff --git a/etsi_codec-patches/makefile-cleanups.patch b/etsi_codec-patches/makefile-cleanups.patch
index 1120dce..ca78b24 100644
--- a/etsi_codec-patches/makefile-cleanups.patch
+++ b/etsi_codec-patches/makefile-cleanups.patch
@@ -7,7 +7,7 @@
  CC=gcc
  
 -CFLAGS	=	-g -I.
-+CFLAGS	=	-g -I. -Wall
++CFLAGS	=	-g -I. -Wall -O3
  
  SRCS1		=	ccoder.c	ccod_tet.c	init_params.c	sub_cc.c \
  			tetra_op.c
@@ -36,7 +36,7 @@
 +CC=gcc
  
 -CFLAGS	=	-I.
-+CFLAGS	=	-I. -Wall
++CFLAGS	=	-I. -Wall -O3
  
  SRCS1		=	scoder.c		scod_tet.c		sub_sc_d.c \
  			sub_dsp.c		fbas_tet.c		fexp_tet.c \
diff --git a/etsi_codec-patches/series b/etsi_codec-patches/series
index a5d92be..b69c84f 100644
--- a/etsi_codec-patches/series
+++ b/etsi_codec-patches/series
@@ -1,6 +1,5 @@
 makefile-cleanups.patch
-build_as_32bit.patch
-link_static.patch
+fix_64bit.patch
 round_private.patch
 filename-case.patch
 log_stderr.patch

-- 
To view, visit https://gerrit.osmocom.org/1450
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b16811d4a3030dfce0718f0b1d266ee1761bfef
Gerrit-PatchSet: 1
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list