libosip2: arc: Undefine __arc__ when building for ARC processors
authorMischa Jonker <mischa.jonker@synopsys.com>
Mon, 15 Jul 2013 12:39:22 +0000 (14:39 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 15 Jul 2013 20:53:42 +0000 (22:53 +0200)
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.

[Peter: add short comment in .mk files as well]
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libeXosip2/libeXosip2.mk
package/libosip2/libosip2.mk

index 4be2f05a98a06cb5a3f6ae74d1323650ed2be280..6abdaab8a0a65802657ac55fea1e58f15729c644 100644 (file)
@@ -12,6 +12,11 @@ LIBEXOSIP2_LICENSE_FILES = COPYING
 
 LIBEXOSIP2_DEPENDENCIES = host-pkgconf libosip2
 
+ifeq ($(BR2_arc),y)
+# toolchain __arc__ define conflicts with libeXosip2 source
+LIBEXOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__"
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBEXOSIP2_DEPENDENCIES += openssl
 LIBEXOSIP2_CONF_OPT += --enable-openssl
index 6ae8149a31948f54ac28d341b2665cbb42d25dd6..0b672d86d26b277c8625a2df18502a6bdd25f529 100644 (file)
@@ -10,6 +10,11 @@ LIBOSIP2_INSTALL_STAGING = YES
 LIBOSIP2_LICENSE = LGPLv2.1+
 LIBOSIP2_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_arc),y)
+# toolchain __arc__ define conflicts with libosip2 source
+LIBOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__"
+endif
+
 LIBOSIP2_CONF_OPT = \
        --enable-mt=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,no)