libosip2: fix build with ARC toolchain 258/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Sat, 3 Feb 2018 12:33:24 +0000 (13:33 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sat, 3 Feb 2018 12:33:27 +0000 (13:33 +0100)
ARC toolchain exports __arc__, which clashes with a symbol of the same
name in libosip2. This commit undefines the toolchain symbol when
building the library.

The fix was found in buildroot repo. Thanks to whoever spotted this!

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/libosip2/Makefile

index a4bb6cc7a3d1115f5955d543b546d00198958276..444088021116228ae211a97126d1e42681f2a8c4 100644 (file)
@@ -37,7 +37,8 @@ define Package/libosip2/description
  GNU oSIP library, a Session Initiation Protocol (SIP) implementation.
 endef
 
-TARGET_CFLAGS += $(FPIC)
+# toolchain __arc__ define conflicts with libosip2 source
+TARGET_CFLAGS += $(FPIC) $(if $(CONFIG_arc),-U__arc__)
 
 CONFIGURE_ARGS += \
        --enable-shared \