libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-users] Re: libbfd, libtool & Win32


From: Guido Draheim
Subject: Re: [Mingw-users] Re: libbfd, libtool & Win32
Date: Tue, 17 Sep 2002 20:33:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826


David Olofson wrote:
On Tuesday 17 September 2002 13:05, Max Bowsher wrote:
[...]

I think the correct approach is to use a libfoo.dll.a if it is present,


Agreed.

it should be ATM.




and do funny impgen stuff if it is not.


Just not as funny as the current approach. This "compile at library build time using HOST_CC" must *really* die, IMO.

For some strange reason, I managed to get libtool to use the right CC, but that didn't help, as gcc sent incorrect flags to as. Still don't know why this happens.

For now, I've compiled and installed impgen manually, and hacked libtool.m4 to just run it. Works great.

see below...


Somehow, I can't see why having:

    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
      else $CC -o impgen impgen.c ; fi)~
      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'


(sorry 'bout the wrapping...) in libtool.m4, when you could build impgen during the installation, and then use something like:

    extract_expsyms_cmds='impgen $dir/$soroot >$output_objdir/$soname-def'


Right, it's not a great idea to fix something the wrong way - but then again, we're talking about something that's *really* broken, inconcistent (any one else cares about HOST_CC...?), and a major PITA for a great number of users. (I might be the first, but even the established workarounds failed on my setup...)

And now I'm not even sure if anyone knows what the correct solution would be... What now?



On another e-mail, you said to have some idea of the `objdump -p` output
of an export table. If someone could work that out with a portable shell
program (sh/sed/etc), then we can let that impgen.sh be created in the
$builddir instead of an impgen.exe, and have it run through extract_expsyms_cmd.
That would atleast fix our crosscompile problem. Still, I think that the
correct solution is in the objdump itself, giving it another option to
spit out the export table in .def style format. Looking at that later thing
I'd say that I could even live with a quickhack of a impgen.sh that works
for most projects, and those projects with trickier stuff must upgrade their
binutils to a recent version. How does that sound?








reply via email to

[Prev in Thread] Current Thread [Next in Thread]