path: root/scripts
diff options
authorAlexey Neyman <>2017-02-22 07:56:59 (GMT)
committerAlexey Neyman <>2017-02-23 06:17:49 (GMT)
commit8397ad2c1a71992b441d73802f45be582c37b1e7 (patch)
tree6380992467e685751135f59f4becd784c2c771df /scripts
parent1468e996f75fe7b9c23c883d9367633cf3d0177e (diff)
Fix the build of elf2flt on Cygwin
The -lcygwin -lc actually breaks the build: elf2flt picks up the symbols for getopt/optarg via <getopt.h> 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: Signed-off-by: Alexey Neyman <>
Diffstat (limited to 'scripts')
1 files changed, 0 insertions, 1 deletions
diff --git a/scripts/build/binutils/ b/scripts/build/binutils/
index 38c9461..e57be76 100644
--- a/scripts/build/binutils/
+++ b/scripts/build/binutils/
@@ -300,7 +300,6 @@ do_elf2flt_backend() {
CT_DoExecLog CFG \
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
- LIBS="-ldl" \
"${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \
--build=${CT_BUILD} \