From aad0887281db4946f6498b9a4df9f7b437d5e8f4 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 29 Dec 2018 11:36:51 +0100 Subject: [PATCH] dahdi-tools: use default Build/Compile template 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 --- libs/dahdi-tools/Makefile | 9 ------- .../patches/010-fix-non-glibc-builds.patch | 26 +++++++++++++++++++ ...0-fix-undefined-reference-to-get_ver.patch | 11 ++++++++ 3 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch create mode 100644 libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile index 14444ef..dc66764 100644 --- a/libs/dahdi-tools/Makefile +++ b/libs/dahdi-tools/Makefile @@ -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 index 0000000..d60e767 --- /dev/null +++ b/libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch @@ -0,0 +1,26 @@ +--- a/xpp/xtalk/debug.c ++++ b/xpp/xtalk/debug.c +@@ -26,7 +26,9 @@ + #include + #include + #include ++#ifdef __GLIBC__ + #include ++#endif + #include + #include + +@@ -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 index 0000000..f09fcad --- /dev/null +++ b/libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch @@ -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); + }