From patchwork Thu Mar 23 03:38:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 95880 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp544510qgd; Wed, 22 Mar 2017 20:38:54 -0700 (PDT) X-Received: by 10.99.176.6 with SMTP id h6mr442302pgf.184.1490240334819; Wed, 22 Mar 2017 20:38:54 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id k66si2825207pfk.333.2017.03.22.20.38.54; Wed, 22 Mar 2017 20:38:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3D53D77AC0; Thu, 23 Mar 2017 03:38:52 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) by mail.openembedded.org (Postfix) with ESMTP id 1464277A98 for ; Thu, 23 Mar 2017 03:38:22 +0000 (UTC) Received: by mail-pg0-f54.google.com with SMTP id w20so13811678pgc.0 for ; Wed, 22 Mar 2017 20:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S8WYxDWubyY8ywczdXQjR1FiJo1k6/zJNdUA89pGpHk=; b=Oa0c3C/liNcFYiChpdU/n8iQkG9cOjlgWIQqmTSv3xjmuhLRfNYjN9kqwrRh5qb/Eh ezcgZS8j/BhWxV7c0GJhVoy8K3guNP27Ar2/SkiAFwzP/13+Aws/JCQCtQ5+29BHrHt9 myMWu+AzjSRQR2XJdappuE5UgcaZ6jLMPRhSkL5NbqlC43TebU2O9Au0zBWORywwkzic zW1TqkmF0J4DVJbegyR5Bwq82aWeHosNYzRGUP+bclYgyd2XZTWYakp4np9E6U/0S87W EJuclHNE3Kz4yZFUlxP2ouBWp3YdFEjP35Y2cZBcQUHUHzVrmNZ4cegndH+2v9V/Ynix aUQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S8WYxDWubyY8ywczdXQjR1FiJo1k6/zJNdUA89pGpHk=; b=YDcjpBoW49HCLVXwnlno+sSY++WpM+iNviYTSuunn27vab8TtLQ11ujQ6UfFjD0TQm CytU2NPlL/RM+rRshekBXZ1NahMNHY1h0Gg4dBLo5Trr9ZzfLZhngutJ5KSyNKLQ0aOi m3mh8xLHATub5nyvUeWApuPdw361KorvYfdhiyjvjqsbETvukJ21t6OXJIhm/3HJ/v2h 4q3WYiqxZhJpTow1SJMTOjoayrRCWhsaRFLLAkwgXbPGVde4IZTXOnvc7Z8k/O9hfSRP Hen4NI+qoB9naOhlagwuMOQQ3AsF8TkPGCXt6NoxWJx6agULS/ytOL8vZZ9Jv0mIrx3O at4g== X-Gm-Message-State: AFeK/H2ANip4qHVq3dc87BCfIGan3V3lnmyrwQ3oZB270PvQi02B6sVzE5jLv7YiblOaGw== X-Received: by 10.98.31.20 with SMTP id f20mr422933pff.193.1490240303756; Wed, 22 Mar 2017 20:38:23 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id i124sm6277651pgd.66.2017.03.22.20.38.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 20:38:22 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 22 Mar 2017 20:38:13 -0700 Message-Id: X-Mailer: git-send-email 2.12.1 In-Reply-To: References: Subject: [OE-core] [PATCH 1/2] db: Fix atomic function namespace clash with clang builtins X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Rename local function to avoid conflicts with compiler intrinsics Signed-off-by: Khem Raj --- ...me-local-__atomic_compare_exchange-to-avo.patch | 45 ++++++++++++++++++++++ meta/recipes-support/db/db_5.3.28.bb | 1 + 2 files changed, 46 insertions(+) create mode 100644 meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch -- 2.12.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch b/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch new file mode 100644 index 0000000000..571708e03e --- /dev/null +++ b/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch @@ -0,0 +1,45 @@ +From 29621d637e30982489693f2e207ce6a1790e3337 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 22 Mar 2017 15:32:26 +0000 +Subject: [PATCH] atomic: Rename local __atomic_compare_exchange to avoid clash + with builtins + +Helps building with clang + +Fixes + +../db-5.3.28/src/dbinc/atomic.h:179:19: error: definition of builtin function '__atomic_compare_exchange' +static inline int __atomic_compare_exchange( + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/dbinc/atomic.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h +index 6a858f7..1b49de5 100644 +--- a/src/dbinc/atomic.h ++++ b/src/dbinc/atomic.h +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __db_atomic_compare_exchange((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __db_atomic_compare_exchange( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was; +-- +1.8.3.1 + diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb index b7232fc894..26065bbb0b 100644 --- a/meta/recipes-support/db/db_5.3.28.bb +++ b/meta/recipes-support/db/db_5.3.28.bb @@ -21,6 +21,7 @@ PE = "1" SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" SRC_URI += "file://arm-thumb-mutex_db5.patch \ file://fix-parallel-build.patch \ + file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ " SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24" From patchwork Thu Mar 23 03:38:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 95881 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp544537qgd; Wed, 22 Mar 2017 20:39:02 -0700 (PDT) X-Received: by 10.98.198.138 with SMTP id x10mr446770pfk.85.1490240342023; Wed, 22 Mar 2017 20:39:02 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id e3si3984952plk.205.2017.03.22.20.39.01; Wed, 22 Mar 2017 20:39:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 686AD77AA6; Thu, 23 Mar 2017 03:38:59 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by mail.openembedded.org (Postfix) with ESMTP id 659A577AC7 for ; Thu, 23 Mar 2017 03:38:23 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id p189so24093751pfp.0 for ; Wed, 22 Mar 2017 20:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h9Lj4BajrbR8QxuI5mQnVqYssn0jnXPGzLAQ3Jt1wEQ=; b=GKZ6+WDpfcqIzle3OV1vWA3+n6MMH5PGxvOBsh8GmjySA3SA7CZ66YaW7xQrKBsKBO 5DX1ypt9MNEZB8ffq1KrE+Oh9aYdLTxvTu/lcAwfdNjerOVM1fsCL7ZmJgQf7ofba5GS V/aRx1q35Ijc24VI/fdyEE22I7HE2eyJfam5JIekV0ndCyhUJxT2ajEnTS40CCmayw2f M4pGy8jfXiW0hGV2UbqBOixcEOHjHw7fCnCPYI9+bQ75JrqARl0WbjBbyZaehIBn2mTO HQJGvJLDyn4pJ1Jqx8Xm4R6vBzq4/GeM9sOSIk8dp1LcyBG8V2f/041vRlF/CZN4FwaB Wujw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h9Lj4BajrbR8QxuI5mQnVqYssn0jnXPGzLAQ3Jt1wEQ=; b=A0lkMkU9khrNeGxh5ZJdUlxvOK9B5I3YhK9iu5UuYpuRJmoL3Ai6nkJ23yGlT7EKp7 pwnDYmqkJdd2MOgGP924Yo393/tLU9nXRMfrD9VDt+704358Ry40fC6XNtsj80j9Oyxv S8GD3YSqDBNx6tQziSU8kQdoSb6w9AX9T6qSaDttJfukNOHrwMhpp0/m7t9T28E7ZnJ0 eypvyG9OY7BYJ4BI1nEaR8FeMdhovzh2pxHBliQg/LBq+eSv3wtDGfrcJYyS+D38139i zkglopPkMClKbMePqg6iufSnEGE9LuNDPbxGp212QMle41UyIeHm2cBVZGPMwJUEe+0Z DXkw== X-Gm-Message-State: AFeK/H0oW64N0hMMI+kJh+Xn7Q/tC+eW6fIjdn0d6UCef6hZNbZmqFpvAiRaVGT4pWCHLw== X-Received: by 10.98.100.88 with SMTP id y85mr455510pfb.112.1490240305139; Wed, 22 Mar 2017 20:38:25 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id i124sm6277651pgd.66.2017.03.22.20.38.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 20:38:24 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 22 Mar 2017 20:38:14 -0700 Message-Id: <48d4089afac5042cfa742120e79f561f9b415d2b.1490240196.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.12.1 In-Reply-To: References: Subject: [OE-core] [PATCH 2/2] libvorbis: Contain gcc specific compiler flags using configure option X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../libvorbis/0001-configure-Check-for-clang.patch | 56 ++++++++++++++++++++++ .../libvorbis/libvorbis_1.3.5.bb | 4 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch -- 2.12.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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 +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 +--- +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"