This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH for fatal with gcc-2.95 on sparc-sun-solaris2.6: libio/config.if not found with srcdir == builddir


Trying to "make bootstrap" with srcdir == builddir (plain
./configure) gives an error that is not sufficiently ignored in
all shells, for example on Solaris 2.6.  In the /bin/sh used
there, doing ". sourcefile" when there's no "sourcefile"
apparently is fatal.

Please consider this for gcc-2.95, if building with srcdir ==
builddir is important...

 On i686-pc-linux-gnulibc1 I get:
...
tiomisc.exp		..linked
tstdiomisc.exp		..linked
Appending ./config/linuxlibc1.mt to target-mkfrag
Created "Makefile" in /home/hp/tmp/egcs_ss_withsrc/egcs/i686-pc-linux-gnulibc1/libio using "target-mkfrag"
Adding multilib support to Makefile in .
multidirs=
with_multisubdir=
/home/hp/tmp/egcs_ss_withsrc/egcs/configure: ./../config.if: No such file or directory
Configuring tests...
Created "Makefile" in /home/hp/tmp/egcs_ss_withsrc/egcs/i686-pc-linux-gnulibc1/libio/tests
Configuring dbz...
Linked "rdbz.c" to "./dbz.c".
Linked "rdbzmain.c" to "./dbzmain.c".
Created "Makefile" in /home/hp/tmp/egcs_ss_withsrc/egcs/i686-pc-linux-gnulibc1/libio/dbz
Configuring stdio...
Created "Makefile" in /home/hp/tmp/egcs_ss_withsrc/egcs/i686-pc-linux-gnulibc1/libio/stdio
Configuring testsuite...
Created "Makefile" in /home/hp/tmp/egcs_ss_withsrc/egcs/i686-pc-linux-gnulibc1/libio/testsuite
Configuring in i686-pc-linux-gnulibc1/libiberty
COPYING.LIB		..linked
...

And goes on to seemingly succesfully build.  The effect may or
may not be limited to a misnamed gxx_include_dir.

 But on sparc-sun-solaris2.6:

...
tiomisc.exp             ..linked
tstdiomisc.exp          ..linked
Makefile.in             ..linked
Created "Makefile" in /tmp/hp-testar-egcs/egcs/sparc-sun-solaris2.6/libio using "target-mkfrag"
Adding multilib support to Makefile in .
multidirs=
with_multisubdir=
/tmp/hp-testar-egcs/egcs/configure: ./../config.if: not found
*** Error code 1
make: Fatal error: Command failed for target `configure-target-libio'
Current working directory /tmp/hp-testar-egcs/egcs
*** Error code 1
make: Fatal error: Command failed for target `bootstrap'

It seems the post-target chunk of libio/configure.in incorrectly
uses ${srcdir}/../config.if which is not valid when srcdir ==
builddir - then ${srcdir} is "." and is a not a "real" source
directory, but is *another* build-directory with symbolic links
to the real source files (named something like
/somewhere/to/egcs/i686-pc-linux-gnulibc1/libio).  There's
no config.if one dirlevel up.  Instead, ${topsrcdir} holds the
right dir, and is used in all other lib*/configure.in files
when accessing "config.if" (only gcc/configure.in uses
"${srcdir}/../config.if", but that's a whole other config
story).

In libio:
Mon Jun 28 09:25:23 1999  Hans-Peter Nilsson  <hp@bitrange.com>

	* configure.in (post-target): Use "$(topsrcdir)", not "$(srcdir)/..".

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libio/configure.in,v
retrieving revision 1.20.4.1
diff -p -c -r1.20.4.1 configure.in
*** configure.in	1999/05/20 02:28:50	1.20.4.1
--- configure.in	1999/06/27 21:31:14
*************** if test x${gxx_include_dir} = x; then
*** 188,194 ****
    if test x${enable_version_specific_runtime_libs} = xyes; then
      gxx_include_dir='${libsubdir}/include/g++'
    else
!     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
      gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
    fi
  fi
--- 188,194 ----
    if test x${enable_version_specific_runtime_libs} = xyes; then
      gxx_include_dir='${libsubdir}/include/g++'
    else
!     . ${topsrcdir}/config.if
      gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
    fi
  fi

Whoa, that's a lot of text for a one-line "obvious" patch.
I just hope the important bits were not lost in the process...

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]