autoconf-patches
[Top][All Lists]
Advanced

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

Re: Why was handling of program_prefix changed?


From: Franz Sirl
Subject: Re: Why was handling of program_prefix changed?
Date: Tue, 14 May 2002 15:57:18 +0200

At 15:26 14.05.2002, Paul Eggert wrote:
> From: Franz Sirl <address@hidden>
> Date: Mon, 13 May 2002 23:11:18 +0200
>
> > how can I set $target_alias for a native build now?
> >
> > AFAICS this does not happen with the suggested --host --build setup, or?
> > So, to replace the commonly used "configure nativealias" I now have to use
> > "configure --host=nativealias --build=nativealias --target=nativealias
> > --program-prefix=NONE" (I think).
> >
> > Is this also intentional? Or is this a bug? Am I overlooking something?
> >
> > BTW, it would be nice if one would be notified during configure what
> > happens to $program_prefix, like:
> >     checking for program prefix to use.. none
>
> Well, nobody cares to answer, so I'm suggesting the appended patch,
> so one can set $target_alias again without triggering a
> cross-compile.

Sorry, I'm a bit lost.  Which of the problems mentioned above does the
following patch fix?

If you pass either do a "./configure ppc-linux" or "./configure --host=ppc-linux --build=ppc-linux --target=ppc-linux" or"./configure --target=ppc-linux" $program_prefix won't be set automatically.

Also, not that I understand the problem or your fix, but it seems to
me that the test isn't quite right.  $host, $build, and $target are
backward-compatibility names.  And you can't concatenate them without
a separator, or you'll get false matches (in theory, at least).  So
shouldn't the added line be something like this instead?

  test "$host_alias,$build_alias" != "$target_alias,$target_alias" &&

Hmm, yeah, a separator would be better. And are $build, $host, $target really deprecated? I thought they were just the canonicalized versions of $build_alias, $host_alias, $target_alias and in this case the canonicalized versions seemed the better choice to me.

What I want is a way to set $target_alias on "native" builds without

        a) triggering a cross-compile
        b) setting $program_prefix

Franz.



> * lib/autoconf/general.m4: Only default $program_prefix to $target_alias if
>       we have some kind of crosscompile.
>
>
> --------------Boundary-00=_UUI2VNWPMQ9C1R824GDF
> Content-Type: text/plain;
>   charset="iso-8859-1";
>   name="autoconf-target_alias.diff"
> Content-Transfer-Encoding: 8bit
> Content-Disposition: attachment; filename="autoconf-target_alias.diff"
>
> Index: lib/autoconf/general.m4
> ===================================================================
> RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
> retrieving revision 1.797
> diff -u -p -r1.797 general.m4
> --- lib/autoconf/general.m4   25 Apr 2002 08:54:47 -0000      1.797
> +++ lib/autoconf/general.m4   13 May 2002 21:09:00 -0000
> @@ -1640,6 +1640,7 @@ _AC_CANONICAL_SPLIT([target])
>  # The aliases save the names the user supplied, while $host etc.
>  # will get canonicalized.
>  test -n "$target_alias" &&
> +  test "$host$build$target" != "$target$target$target" &&
>    test "$program_prefix$program_suffix$program_transform_name" = \
>      NONENONEs,x,x, &&
>    program_prefix=${target_alias}-[]dnl
>
> --------------Boundary-00=_UUI2VNWPMQ9C1R824GDF--




reply via email to

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