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 <sebastian_ml@gmx.net>
This commit is contained in:
parent
2f77859b3b
commit
aad0887281
3 changed files with 37 additions and 9 deletions
|
@ -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/
|
||||
|
|
26
libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch
Normal file
26
libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch
Normal file
|
@ -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
|
||||
}
|
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue