autoconf 2.57+ migration
Daniel Jacobowitz
drow@mvista.com
Tue Oct 21 18:31:00 GMT 2003
On Tue, Oct 21, 2003 at 08:30:01PM +0200, Sylvain BERTRAND wrote:
> Then autoconf 2.57+ is successful at generating all configure scripts
> for binutils?
No, why do you think that? I've been converting directories one at a
time. Nothing has been tried that has not been posted.
> I did a quick brain dead scan on configure.in scripts from a today CVS
> snapshot in order to check if the new build, host and target behavior
> has some chance to work:
> ---------------------------------------
> ./bfd/configure.in:176:if test "${target}" = "${host}"; then
> ./gas/configure.in:986:if test "${host}" = "${target}"; then
> ./configure.in:195:if test x"${host}" = x"${target}" ; then
> ./configure.in:237:# Remove these if host!=target.
> ./configure.in:241:# Remove these if host=target.
> ./configure.in:1906: # Here host == target, so we don't need to
> build gcc,
> ./configure.in:1945:elif test "$host" = "$target"; then
> ./configure.in:1956:elif test "$host" = "$target"; then
> ./configure.in:1979:elif test "$host" = "$target"; then
> ---------------------------------------
>
> and
>
> ---------------------------------------
> ./configure.in:176:# Only make build modules if build != host.
> ./configure.in:178:if test ${host_alias} != ${build_alias} ; then
> ./configure.in:1270:if test -z "${CC}" && test "${build}" = "${host}" ; then
> ./configure.in:1348:if test "${build}" != "${host}" ; then
> ./configure.in:1885: if test "${build}" != "${host}"; then
> ./configure.in:1906: # Here host == target, so we don't need to
> build gcc,
> ./configure.in:1930:if test "${build}" = "${host}" && test -d
> ${srcdir}/gcc; then
> ./configure.in:2092:if test "x${build}" = "x${host}" ; then
> ---------------------------------------
>
> If I understood well the autoconf documentation, a package should toggle
> to cross compilation mode if there is a --host option and *not* if
> host!=build, or in the equivalent case should assume native compilation
> if no --host option was provided and *not* build=host.
>
> The case of building cross tools is exactly the same.
>
> As an example, I should be able to cross compile from
> build=i686-pc-linux-gnu to host=i686-pc-linux-gnu by only providing the
> --host=i686-pc-linux-gnu option. In a similar fashion, I should be able
> to toggle the build of cross tools from host=i686-pc-linux-gnu to
> target=i686-pc-linux-gnu by only providing the
> --target=i686-pc-linux-gnu option. And again, we can extend the case for
> canadian build.
> Am I wrong? Do I miss something? If not, we need some clean-up in
> configure.in scripts and maybe elsewhere because I'm not aware of the
> binutils internals so I could miss related things.
Oh, so this is about build/host/target.
The autoconf people redefined the meaning of these options without, as
far as I can tell, much discussion outside of the autoconf lists. Kind
of unfortunate. There is no real plan for binutils to switch to the
"new" meanings of the options - certainly not before all of the src and
gcc repositories have been converted to autoconf 2.5x.
Save yourself a lot of suffering, do this the easy way:
--build=i686-mypc-linux-gnu --host=i686-pc-linux-gnu.
^^
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Binutils
mailing list