Commit b0ea0942 authored by Rafaël Carré's avatar Rafaël Carré

contrib: remove STDC hack for android

Remove -ansi flag for packages which don't build.

-ansi (and __STRICT_ANSI__) prevent the bionic headers to define (u)int64_t

Freetype exhibits a bug in gcc headers which typedef uint64_t u_int64_t

It seems like gcc, libebml, libmatroska, and taglib rely on standard headers
to define (u)int64_t which is the case for glibc even with -ansi.
parent 7641dadb
diff -ur libebml.orig/make/linux/Makefile libebml/make/linux/Makefile
--- libebml.orig/make/linux/Makefile 2012-03-29 16:03:42.965538360 -0400
+++ libebml/make/linux/Makefile 2012-03-29 16:04:03.673538362 -0400
@@ -61,7 +61,7 @@
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
objects_so:=$(objects)
-WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -Wshadow
+WARNINGFLAGS=-Wall -Wno-unknown-pragmas -fno-gnu-keywords -Wshadow
COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
......@@ -12,6 +12,7 @@ $(TARBALLS)/libebml-$(EBML_VERSION).tar.bz2:
libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
$(UNPACK)
$(APPLY) $(SRC)/ebml/ebml-pic.patch
$(APPLY) $(SRC)/ebml/no-ansi.patch
$(MOVE)
.ebml: libebml
......
......@@ -18,6 +18,7 @@ freetype: freetype-$(FREETYPE2_VERSION).tar.gz .sum-freetype2
$(MOVE)
.freetype2: freetype
sed -i.orig s/-ansi// $</builds/unix/configure
cd $< && GNUMAKE=$(MAKE) $(HOSTVARS) ./configure $(HOSTCONF)
cd $< && $(MAKE) install
touch $@
......@@ -114,7 +114,7 @@ else
ANDROID_CPU_FLAGS = -mcpu=arm1136jf-s -mfpu=vfp
endif
endif
EXTRA_CFLAGS += -D__STDC_VERSION__=199901L -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/include
EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/include
EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ANDROID_ABI)/include
EXTRA_CFLAGS += -mfloat-abi=softfp $(ANDROID_CPU_FLAGS)
endif
......
diff -ru libmatroska.orig/make/linux/Makefile libmatroska/make/linux/Makefile
--- libmatroska.orig/make/linux/Makefile 2012-03-29 16:04:40.525538362 -0400
+++ libmatroska/make/linux/Makefile 2012-03-29 16:04:58.105538361 -0400
@@ -67,7 +67,7 @@
objects_so:=$(objects)
-WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -D_GNU_SOURCE \
+WARNINGFLAGS=-Wall -Wno-unknown-pragmas -fno-gnu-keywords -D_GNU_SOURCE \
-Wshadow
COMPILEFLAGS=$(DEBUGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(WARNINGFLAGS) $(INCLUDE)
LINKFLAGS=-L. -L$(LIBEBML_LIB_DIR) $(LDFLAGS)
......@@ -15,6 +15,7 @@ $(TARBALLS)/libmatroska-$(MATROSKA_VERSION).tar.bz2:
libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska
$(UNPACK)
$(APPLY) $(SRC)/matroska/matroska-pic.patch
$(APPLY) $(SRC)/matroska/no-ansi.patch
$(MOVE)
.matroska: libmatroska
......
diff -ru taglib.orig/CMakeLists.txt taglib/CMakeLists.txt
--- taglib.orig/CMakeLists.txt 2012-03-29 16:07:01.933538361 -0400
+++ taglib/CMakeLists.txt 2012-03-29 16:07:09.545538361 -0400
@@ -24,8 +24,8 @@
if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_SYSTEM_NAME MATCHES Linux)
- set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
- set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-check-new -fno-common")
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-check-new -fno-common")
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
endif (CMAKE_COMPILER_IS_GNUCXX)
if(MSVC)
......@@ -13,6 +13,7 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz:
taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
$(UNPACK)
$(APPLY) $(SRC)/taglib/taglib-static.patch
$(APPLY) $(SRC)/taglib/no-ansi.patch
ifdef HAVE_WIN32
$(APPLY) $(SRC)/taglib/taglib-win32.patch
endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment