summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2012-11-03 08:21:25 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2012-11-03 08:21:25 (GMT)
commit102f79865e21158c9153148bef189f810aad5814 (patch)
tree008a42f28df3ae18d590ad6e8e30fa3036ae342f
parentb7053563f5c4d55edac75eaf833f473b7818b6e8 (diff)
downloadbuildroot-102f79865e21158c9153148bef189f810aad5814.tar.gz
buildroot-102f79865e21158c9153148bef189f810aad5814.tar.bz2
iproute2: fix build with toolchains providing setns(2)
Fixes http://autobuild.buildroot.net/results/b2f28621bc9d6048057c406048b3f7d665cef165 ipnetns.c contains a replacement setns implementation, which is used if the toolchain doesn't provide any (HAVE_SETNS not set). We don't have any knowledge of toolchain setns support on buildroot level, but the (handwritten) configure script contains a test for it, so run the configure script before building. The configure script isn't written for cross compilation, so it needs to be massaged slightly to use the cross compiler / flags. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/iproute2/iproute2.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
index 62328ab..03767cc 100644
--- a/package/iproute2/iproute2.mk
+++ b/package/iproute2/iproute2.mk
@@ -27,6 +27,8 @@ endef
endif
define IPROUTE2_CONFIGURE_CMDS
+ $(SED) 's/gcc/$$CC $$CFLAGS/g' $(@D)/configure
+ cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure
# arpd needs berkeleydb
$(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile
echo "IPT_LIB_DIR:=/usr/lib/xtables" >>$(IPROUTE2_DIR)/Config