dahdi-tools: use default Build/Compile template
authorSebastian Kemper <sebastian_ml@gmx.net>
Sat, 29 Dec 2018 10:36:51 +0000 (11:36 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sat, 29 Dec 2018 10:36:53 +0000 (11:36 +0100)
Add two patches to fix general compile issues. The first masks out some
glibc specific extensions if using a different libc.

The second fixes a compile issue with newer compilers.

Like this it's possible to easily add more executables to the packages
should the need (or wish) arise. This also gets rid of the following
warnings:

cc1: note: someone does not honour COPTS correctly, passed 2 times

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/dahdi-tools/Makefile
libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch [new file with mode: 0644]
libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch [new file with mode: 0644]

index 14444ef7edc325db6e430833248bfc539eb87003..dc66764fc5e9c68e22d5664b20ba5a06a469a7e5 100644 (file)
@@ -50,15 +50,6 @@ endef
 
 CONFIGURE_ARGS+=--disable-silent-rules
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               HOSTCC="$(HOSTCC)" \
-               CROSS_COMPILE="$(TARGET_CROSS)" \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               CPPFLAGS="$(TARGET_CPPFLAGS)" \
-               dahdi_cfg dahdi_monitor dahdi_scan dahdi_speed dahdi_test fxotune
-endef
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/
diff --git a/libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch b/libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch
new file mode 100644 (file)
index 0000000..d60e767
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/xpp/xtalk/debug.c
++++ b/xpp/xtalk/debug.c
+@@ -26,7 +26,9 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <syslog.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <xtalk/debug.h>
+ #include <autoconfig.h>
+@@ -61,6 +63,7 @@ void dump_packet(int loglevel, int mask,
+ /* from glibc info(1) */
+ void print_backtrace(FILE *fp)
+ {
++#ifdef __GLIBC__
+       void    *array[10];
+       size_t  size;
+       char    **strings;
+@@ -71,4 +74,5 @@ void print_backtrace(FILE *fp)
+       for (i = 0; i < size; i++)
+               fprintf(fp, "%s\n", strings[i]);
+       free(strings);
++#endif
+ }
diff --git a/libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch b/libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch
new file mode 100644 (file)
index 0000000..f09fcad
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/xpp/echo_loader.c
++++ b/xpp/echo_loader.c
+@@ -564,7 +564,7 @@ UINT32 Oct6100UserDriverReadBurstApi(tPO
+       return cOCT6100_ERR_OK;
+ }
+-inline int get_ver(struct astribank *astribank)
++static inline int get_ver(struct astribank *astribank)
+ {
+       return spi_send(astribank, 0, 0, 1, 1);
+ }