New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build on Cygwin #6
Conversation
To clarify: yes, I saw the comments in the deleted code. However, what I am seeing while trying to build elf2flt (via crosstool-ng) on cygwin is exactly the opposite: these workarounds result in libcygwin/libiberty clash for |
3d3eaae
to
e8c3676
Compare
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. Upstream: uclinux-dev#6 Signed-off-by: Alexey Neyman <stilor@att.net>
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. Signed-off-by: Alexey Neyman <stilor@att.net>
e8c3676
to
513e866
Compare
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: uclinux-dev/elf2flt#6 Signed-off-by: Alexey Neyman <stilor@att.net>
the full history is in git, so you can simply look at the commit log to see where this code was added -- in commit 4565de8. deleting this code outright won't work, sorry. you're breaking one system to fix another. |
What about adding binutils headers dirs after the system dirs (e.g. with Or, those blocks can be specifically made dependent on OS X. The problem is, I don't have a OS X to test. |
the i'm not keen on adding how about we change how we utilize the path from |
Ok, the suggested approach: #7 |
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.
Signed-off-by: Alexey Neyman stilor@att.net