diff mbox

libosip2: arc: Undefine __arc__ when building for ARC processors

Message ID 1373891962-32493-1-git-send-email-mjonker@synopsys.com
State Accepted
Headers show

Commit Message

Mischa Jonker July 15, 2013, 12:39 p.m. UTC
libosip2 appears to have support for the "ARC standard" (Advanced
RISC Computing), which is unrelated to Synopsys DesignWare ARC
processors. The check for this involves verifying the existence of
the "__arc__" macro. Unfortunately, this macro is also present
as a predefined built-in for the ARC processors, resulting into
build failures.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
---
 package/libeXosip2/libeXosip2.mk |    4 ++++
 package/libosip2/libosip2.mk     |    4 ++++
 2 files changed, 8 insertions(+)

Comments

Peter Korsgaard July 15, 2013, 8:54 p.m. UTC | #1
>>>>> "Mischa" == Mischa Jonker <Mischa.Jonker@synopsys.com> writes:

 Mischa> libosip2 appears to have support for the "ARC standard" (Advanced
 Mischa> RISC Computing), which is unrelated to Synopsys DesignWare ARC
 Mischa> processors. The check for this involves verifying the existence of
 Mischa> the "__arc__" macro. Unfortunately, this macro is also present
 Mischa> as a predefined built-in for the ARC processors, resulting into
 Mischa> build failures.

Committed with a short comment in the .mk file about why we're doing
this, thanks.
diff mbox

Patch

diff --git a/package/libeXosip2/libeXosip2.mk b/package/libeXosip2/libeXosip2.mk
index 4be2f05..76c4947 100644
--- a/package/libeXosip2/libeXosip2.mk
+++ b/package/libeXosip2/libeXosip2.mk
@@ -12,6 +12,10 @@  LIBEXOSIP2_LICENSE_FILES = COPYING
 
 LIBEXOSIP2_DEPENDENCIES = host-pkgconf libosip2
 
+ifeq ($(BR2_arc),y)
+LIBEXOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__"
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBEXOSIP2_DEPENDENCIES += openssl
 LIBEXOSIP2_CONF_OPT += --enable-openssl
diff --git a/package/libosip2/libosip2.mk b/package/libosip2/libosip2.mk
index 6ae8149..6d5c516 100644
--- a/package/libosip2/libosip2.mk
+++ b/package/libosip2/libosip2.mk
@@ -10,6 +10,10 @@  LIBOSIP2_INSTALL_STAGING = YES
 LIBOSIP2_LICENSE = LGPLv2.1+
 LIBOSIP2_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_arc),y)
+LIBOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__"
+endif
+
 LIBOSIP2_CONF_OPT = \
 	--enable-mt=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,no)