summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-03-22 20:38:14 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-23 16:57:26 +0000
commitb6cdbf50e5c26c406e4ddecd66202ff7324f5468 (patch)
tree6c2e830b1aa1c5386c10f3d054fcb9e831b069ff
parentfcfbbae9fdda539665a1e8bfe292f917bd5a1927 (diff)
downloadopenembedded-core-b6cdbf50e5c26c406e4ddecd66202ff7324f5468.tar.gz
openembedded-core-b6cdbf50e5c26c406e4ddecd66202ff7324f5468.tar.bz2
openembedded-core-b6cdbf50e5c26c406e4ddecd66202ff7324f5468.zip
libvorbis: Contain gcc specific compiler flags using configure option
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch56
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb4
2 files changed, 59 insertions, 1 deletions
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
new file mode 100644
index 0000000000..7dad0cd8a5
--- /dev/null
+++ b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
@@ -0,0 +1,56 @@
+From 44b4511784f9b51c514dff4ceb3cbeaf9c374d08 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Mar 2017 16:06:55 +0000
+Subject: [PATCH] configure: Check for clang
+
+Disable gcc specific options if using clang
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index eddd02d..00ecba5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -93,6 +93,16 @@ AC_ARG_ENABLE(examples,
+
+ AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
+
++AC_MSG_CHECKING([whether C compiler is clang])
++$CC -x c /dev/null -dM -E > conftest.txt 2>&1
++if grep "__clang__" conftest.txt >/dev/null 2>&1; then
++ AC_SUBST([CC_CLANG], [1])
++ AC_MSG_RESULT([yes])
++ else
++ AC_SUBST([CC_CLANG], [0])
++ AC_MSG_RESULT([no])
++fi
++
+ dnl --------------------------------------------------
+ dnl Set build flags based on environment
+ dnl --------------------------------------------------
+@@ -127,10 +137,15 @@ else
+ AC_MSG_RESULT([$GCC_VERSION])
+ case $host in
+ *86-*-linux*)
++ if test "$CC_CLANG" = "1"; then
++ ieeefp=""
++ else
++ ieefp="-mno-ieee-fp"
++ fi
+ DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
+- CFLAGS="-O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
++ CFLAGS="-O3 -ffast-math -D_REENTRANT -fsigned-char ${ieefp}"
+ # PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
+- PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline"
++ PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math ${ieefp} -D_REENTRANT -fsigned-char -fno-inline"
+
+ # glibc < 2.1.3 has a serious FP bug in the math inline header
+ # that will cripple Vorbis. Look to see if the magic FP stack
+--
+1.8.3.1
+
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
index 636e0f307b..56c5b0a9cb 100644
--- a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
+++ b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7d2c487d2fc7dd3e3c7c465a5b7f6217 \
file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=d1c1d138863d6315131193d4046d81cb"
DEPENDS = "libogg"
-SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz"
+SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \
+ file://0001-configure-Check-for-clang.patch \
+ "
SRC_URI[md5sum] = "28cb28097c07a735d6af56e598e1c90f"
SRC_URI[sha256sum] = "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1"