libtool-patches
[Top][All Lists]
Advanced

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

Re: [patch] win32: eliminate wrapper script in main build dir


From: Ralf Wildenhues
Subject: Re: [patch] win32: eliminate wrapper script in main build dir
Date: Sun, 17 Jun 2007 10:16:05 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* Charles Wilson wrote on Sun, Jun 17, 2007 at 02:43:02AM CEST:
> Ralf Wildenhues wrote:
> >
> >Is this code ever to be run on a different system than MinGW?  What
> >about cross-compile setups?  (Maybe you've addressed this in one of
> >the comments of all your patches and I've overlooked it now?)
> 
> In one of the previous patches, we added this bit of support
> 
> +           if test -n "$TARGETSHELL" ; then
> +             # no path translation at all
> +             lt_newargv0=$TARGETSHELL
> +           else
> +             case "$host" in
> +               *mingw* )
> < lots of ugly code to sniff out the 'cmd shell' >
> +                 ;;
> +               * ) lt_newargv0=$SHELL ;;
> +             esac
> +           fi
> 
> for cross-compiling in general (but mainly linux->mingw/wine cross, IIRC).
> 
> Now, in this current patch, we only use _spawnv() if $host == mingw. 
> Maybe we could be more clever than that, and only use _spawnv if mingw 
> and native.  However, we'd then need to do something about this:
> 
>             # we should really use a build-platform specific compiler
>             # here, but OTOH, the wrappers (shell script and this C one)
>             # are only useful if you want to execute the "real" binary.
>             # Since the "real" binary is built for $host, then this
>             # wrapper might as well be built for $host, too.
>             $opt_dry_run || $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource

Ah, yes.  Good, looks like your patch doesn't make things worse here.

> >The new suite fails tests 25 26 32 54 now, which it
> >didn't back on 2007-02-24, which is when I last tested it. 
> 
> I got those failures (native), until I fixed tests/destdir.at to include 
> $EXEEXT on $bindir/m:
[...]
> Perhaps that "fix" breaks cross?

No, the failure is earlier: the install command does not find the
programs.  I can "fix" them (make them skip again) by means of the patch
below.  OK?  (Seeing that we need this change, I wonder how many
packages not using Automake (and how many even using Automake) will
break by the new semantics of not having 'prog' but only 'prog.exe'
at least in the cross-compile case...)

Grepping the verbose output of the old HEAD testsuite for 'No such file
or directory' shows several bits that need adjustment, too.

> I could use some advice on the following: trying to add a new magic 
> string to the executable, I did the obvious (shown after variable 
> replacement, etc:
> 
> static const char *MAGIC_EXE = "%%%MAGIC EXE variable%%%";
> 
> But the compiler stripped the symbol and the initialization string out 
> of the executable.

For now just drop the static.  This will work until LTO (link time
optimization) is deployed.  Not sure what we'll need with that in place,
but I suppose either make the variable volatile (another non-fix) or add
a stub volatile access to it in main.

Cheers,
Ralf

Index: tests/destdir.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/destdir.at,v
retrieving revision 1.5
diff -u -r1.5 destdir.at
--- tests/destdir.at    25 Mar 2007 12:12:43 -0000      1.5
+++ tests/destdir.at    17 Jun 2007 08:09:50 -0000
@@ -60,7 +60,7 @@
 mkdir $DESTDIR$libdir $DESTDIR$bindir
 AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la],
         [], [ignore], [ignore])
-AT_CHECK([$LIBTOOL --mode=install cp m $DESTDIR$bindir/m],
+AT_CHECK([$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT],
         [], [ignore], [ignore])
 $LIBTOOL --mode=clean rm -f liba.la m
 LT_AT_MVDIR(["$DESTDIR$libdir"], ["$libdir"])
@@ -99,7 +99,7 @@
         [], [ignore], [ignore])
 AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la],
         [], [ignore], [ignore])
-AT_CHECK([$LIBTOOL --mode=install cp m $DESTDIR$bindir/m],
+AT_CHECK([$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT],
         [], [ignore], [ignore])
 $LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m
 LT_AT_MVDIR(["$DESTDIR$libdir"], ["$libdir"])




reply via email to

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