From 8397ad2c1a71992b441d73802f45be582c37b1e7 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 21 Feb 2017 23:56:59 -0800 Subject: Fix the build of elf2flt on Cygwin The -lcygwin -lc actually breaks the build: elf2flt picks up the symbols for getopt/optarg via in binutils-X.Y/include, where optarg is declared without dllimport attribute. Therefore it pulls in getopt() from libc/libcygwin, but since optarg is not prefixed with _imp__, it is pulled from libiberty. But the object file in libiberty also contains getopt() thus resulting in multiple definitions thereof. While there, kill extraneous -ldl passed into configure - configure detects -ldl successfully. Upstream: https://github.com/uclinux-dev/elf2flt/pull/6 Signed-off-by: Alexey Neyman --- scripts/build/binutils/binutils.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/build') diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 38c94613..e57be766 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -300,7 +300,6 @@ do_elf2flt_backend() { CT_DoExecLog CFG \ CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ - LIBS="-ldl" \ ${CONFIG_SHELL} \ "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \ --build=${CT_BUILD} \ -- cgit v1.2.3