[Boehm-GC] Minor configuration tweaks

Roger Sayle roger@eyesopen.com
Sun Jul 27 01:15:00 GMT 2003


Hans Boehm recently pointed out that the test that I introduced in
http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00395.html
works fine inside the GCC tree but has problems outside of GCC
where the $GCC variable may be undefined.  This isn't a problem as
gcc and the upstream boehm-gc don't share configuration machinery,
but its good to fix the problem consistently anyway.

The patch below fixes this oversight replacing 'test $GCC != "yes" ;'
with the safer 'test x"$GCC" != x"yes" ;' which appears to be one
of the prefered solutions to the problem.

Whilst testing this change on hppa2.0w-hp-hpux11.00, I notice a
second minor problem, configure was leaking an error message that
the gcc I was using as a host compiler didn't recognize the command
line option -print-multi-os-directory.  This diagnostic is silenced
by redirecting stderr in the relevant multi_os_directory test.


The patch below has been tested on hppa2.0w-hp-hpux11.00 with a
"./configure", "make" and "make check" in the boehm-gc directory.
All tests pass.  Note that libjava isn't currently enabled on
this platform, so the code in question isn't normally exercised.

Ok for mainline?


2003-07-26  Roger Sayle  <roger@eyesopen.com>

	* configure.in: Redirect stderr in multi_os_directory test.
	* configure.host: Handle undefined GCC in hppa*-*-hpux* test.
	* configure: Regenerate.


Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.in,v
retrieving revision 1.47
diff -c -3 -p -r1.47 configure.in
*** configure.in	28 Apr 2003 20:54:37 -0000	1.47
--- configure.in	27 Jul 2003 00:42:02 -0000
*************** else
*** 278,284 ****
    toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
    toolexeclibdir='$(libdir)'
  fi
! multi_os_directory=`$CC -print-multi-os-directory`
  case $multi_os_directory in
    .) ;; # Avoid trailing /.
    *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
--- 278,284 ----
    toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
    toolexeclibdir='$(libdir)'
  fi
! multi_os_directory=`$CC -print-multi-os-directory 2> /dev/null`
  case $multi_os_directory in
    .) ;; # Avoid trailing /.
    *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.host,v
retrieving revision 1.6
diff -c -3 -p -r1.6 configure.host
*** configure.host	25 Jul 2003 14:32:55 -0000	1.6
--- configure.host	27 Jul 2003 00:42:02 -0000
*************** case "$host" in
*** 25,31 ****
      gc_cflags=-fexceptions
      ;;
      hppa*-*-hpux* )
!     if test $GCC != "yes" ; then
          gc_cflags=+ESdbgasm
      fi
      ;;
--- 25,31 ----
      gc_cflags=-fexceptions
      ;;
      hppa*-*-hpux* )
!     if test x"$GCC" != x"yes" ; then
          gc_cflags=+ESdbgasm
      fi
      ;;

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833



More information about the Gcc-patches mailing list