From 4f24417d599590ff15a9a6aed7449ca6f62b037d Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Wed, 22 Jun 2016 14:26:46 +0200 Subject: [PATCH] build.sh: set LDFLAGS=-lrt for glibc < 2.17 in lwip build The link step for the native lwip build fails on platforms that use a glibc version prior 2.17. The reason is that librt is needed for clock_gettime() in that environment. configure detects this correctly but the lwip example comes with a simple hand-craftet Makefile that does not use the configure results. This quick hack checks for the output of the check for clock_gettime() and includes the required libraries in order to fix the travis build. --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 18d157db..74b24fd4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -15,7 +15,7 @@ case "${PLATFORM}" in ;; lwip) config "--disable-tests --disable-documentation --disable-examples" && \ make -C examples/lwip lwip lwip-contrib - make -C examples/lwip + make -C examples/lwip LDFLAGS=`grep ac_cv_search_clock_gettime=- config.log|cut -d= -f2` ;; posix|*) config "$WITH_TESTS --enable-documentation --enable-examples" && \ make