From: Gustavo Zacarias Date: Wed, 19 Nov 2014 00:47:39 +0000 (-0300) Subject: ndisc6: use LIBS for libintl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ea07d5286c00ac286615d4bc340c531fbfc5ebd;p=buildroot.git ndisc6: use LIBS for libintl Use LIBS instead of LDFLAGS for "-lintl", otherwise LDFLAGS gets evaluated to the left of object files and fails to link statically because of incorrect symbol resolution order. Fixes: http://autobuild.buildroot.net/results/21b/21bf88c9dbaecc204598e60dd9c7392a85068dd6/ Also rename patch to new naming convention. Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- diff --git a/package/ndisc6/0001-trace-tcp-upd-uClibc-fix.patch b/package/ndisc6/0001-trace-tcp-upd-uClibc-fix.patch new file mode 100644 index 0000000000..f84719cf36 --- /dev/null +++ b/package/ndisc6/0001-trace-tcp-upd-uClibc-fix.patch @@ -0,0 +1,64 @@ +From 0be2fe3a750b62cafca9794e37f040624d3a59de Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 26 Apr 2012 23:45:25 +0200 +Subject: [PATCH] trace-{tcp,udp}.c: fix build on uClibc + +Selection of the BSD variant of struct tcphdr/udphdr on uClibc fails +because of config.h. This is caused by config.h setting _GNU_SOURCE +and the compat handling (uClibc doesn't have inet6_rth_*) including +sys/types.h which in term includes features.h, which figures out +what bsd/gnu/posix variant to use because of: + + /* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ + #if defined _BSD_SOURCE && \ + !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ + defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \ + defined _GNU_SOURCE || defined _SVID_SOURCE) + # define __FAVOR_BSD 1 + #endif + +The current workaround of undefining _GNU_SOURCE after config.h doesn't +work as features.h has already been evaluated by then. Instead, simply +don't include config.h as it isn't needed in these two files. + +Signed-off-by: Peter Korsgaard +--- + src/trace-tcp.c | 5 ----- + src/trace-udp.c | 5 ----- + 2 files changed, 10 deletions(-) + +diff --git a/src/trace-tcp.c b/src/trace-tcp.c +index 6a7732d..91b64c2 100644 +--- a/src/trace-tcp.c ++++ b/src/trace-tcp.c +@@ -17,11 +17,6 @@ + * along with this program. If not, see . * + *************************************************************************/ + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#undef _GNU_SOURCE + #define _BSD_SOURCE 1 + + #include +diff --git a/src/trace-udp.c b/src/trace-udp.c +index 821c24c..1754338 100644 +--- a/src/trace-udp.c ++++ b/src/trace-udp.c +@@ -17,11 +17,6 @@ + * along with this program. If not, see . * + *************************************************************************/ + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#undef _GNU_SOURCE + #define _BSD_SOURCE 1 + + #include +-- +1.7.10 + diff --git a/package/ndisc6/ndisc6-trace-tcp-upd-uClibc-fix.patch b/package/ndisc6/ndisc6-trace-tcp-upd-uClibc-fix.patch deleted file mode 100644 index f84719cf36..0000000000 --- a/package/ndisc6/ndisc6-trace-tcp-upd-uClibc-fix.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0be2fe3a750b62cafca9794e37f040624d3a59de Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Thu, 26 Apr 2012 23:45:25 +0200 -Subject: [PATCH] trace-{tcp,udp}.c: fix build on uClibc - -Selection of the BSD variant of struct tcphdr/udphdr on uClibc fails -because of config.h. This is caused by config.h setting _GNU_SOURCE -and the compat handling (uClibc doesn't have inet6_rth_*) including -sys/types.h which in term includes features.h, which figures out -what bsd/gnu/posix variant to use because of: - - /* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ - #if defined _BSD_SOURCE && \ - !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ - defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \ - defined _GNU_SOURCE || defined _SVID_SOURCE) - # define __FAVOR_BSD 1 - #endif - -The current workaround of undefining _GNU_SOURCE after config.h doesn't -work as features.h has already been evaluated by then. Instead, simply -don't include config.h as it isn't needed in these two files. - -Signed-off-by: Peter Korsgaard ---- - src/trace-tcp.c | 5 ----- - src/trace-udp.c | 5 ----- - 2 files changed, 10 deletions(-) - -diff --git a/src/trace-tcp.c b/src/trace-tcp.c -index 6a7732d..91b64c2 100644 ---- a/src/trace-tcp.c -+++ b/src/trace-tcp.c -@@ -17,11 +17,6 @@ - * along with this program. If not, see . * - *************************************************************************/ - --#ifdef HAVE_CONFIG_H --# include --#endif -- --#undef _GNU_SOURCE - #define _BSD_SOURCE 1 - - #include -diff --git a/src/trace-udp.c b/src/trace-udp.c -index 821c24c..1754338 100644 ---- a/src/trace-udp.c -+++ b/src/trace-udp.c -@@ -17,11 +17,6 @@ - * along with this program. If not, see . * - *************************************************************************/ - --#ifdef HAVE_CONFIG_H --# include --#endif -- --#undef _GNU_SOURCE - #define _BSD_SOURCE 1 - - #include --- -1.7.10 - diff --git a/package/ndisc6/ndisc6.mk b/package/ndisc6/ndisc6.mk index b0e4caf6fd..cd43b01a3a 100644 --- a/package/ndisc6/ndisc6.mk +++ b/package/ndisc6/ndisc6.mk @@ -14,7 +14,7 @@ NDISC6_LICENSE_FILES = COPYING ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) NDISC6_DEPENDENCIES += gettext -NDISC6_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl" +NDISC6_CONF_ENV += LIBS="-lintl" endif NDISC6_BIN_ += dnssort # perl script