public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* A patch for dejagnu
@ 1998-03-11  9:39 H.J. Lu
  1998-03-12 17:00 ` Jim Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 1998-03-11  9:39 UTC (permalink / raw)
  To: egcs

Hi,

Some people have reported problems with the latest dejagnu and
egcs that dejagnu cannot find the correct libstdc++ and libio.
Here is a patch which seems to work for me.


-- 
H.J. Lu (hjl@gnu.org)
---
--- libgloss.exp.orig	Wed Mar 11 08:26:07 1998
+++ libgloss.exp	Wed Mar 11 09:33:34 1998
@@ -425,14 +425,17 @@
 
 
     # search for the top level multilib directory
-    set multitop [lookfor_file "${comp_base_dir}" "${target_alias}"]
+    set multitop [lookfor_file "${comp_base_dir}" "libraries"]
     if { $multitop == "" } {
-	set multitop [lookfor_file "${comp_base_dir}" "libraries"]
-	if { $multitop == "" } {
-	    set multitop "[lookfor_file ${comp_base_dir} gcc/xgcc]"
-	    if { $multitop != "" } {
-		set multitop [file dirname [file dirname $multitop]];
-	    } else {
+	set multitop "[lookfor_file ${comp_base_dir} gcc/xgcc]"
+	if { $multitop != "" } {
+	    set multitop [file dirname [file dirname $multitop]];
+	} else {
+	    # We search ${target_alias} last since it is only valid
+	    # when we are running dejagnu on an installed gcc. We
+	    # don't want to get it by accident.
+	    set multitop [lookfor_file "${comp_base_dir}" "${target_alias}"]
+	    if { $multitop == "" } {
 		return ""
 	    }
 	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A patch for dejagnu
  1998-03-11  9:39 A patch for dejagnu H.J. Lu
@ 1998-03-12 17:00 ` Jim Wilson
  1998-03-16 20:04   ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Wilson @ 1998-03-12 17:00 UTC (permalink / raw)
  To: H.J. Lu; +Cc: egcs, wilson

	+	    # We search ${target_alias} last since it is only valid
	+	    # when we are running dejagnu on an installed gcc. We
	+	    # don't want to get it by accident.

This is due to an unfortunate difference between the Cygnus source tree and
the EGCS source tree.  In EGCS, we build libraries in a subdirectory called
`libraries'.  In the Cygnus source tree, we build libraries in a subdirectory
called `${target_alias}'.  Hence searching target_alias first is correct
for the Cygnus sources, but not correct for EGCS.

Historical info: The Cygnus source tree creates the subdirectory only if
we are doing a cross, in which case --target=foo must have been specified,
and using foo for the subdirectory name was reasonable.  EGCS always creates
the subdirectory, so as to make multilibbed native builds work.  Since there
is usually no --target=foo option, using target_alias is unsafe, as it might
not be a valid filename.  I changed EGCS to use libraries instead, but this
change never got propagated back into the Cygnus sources.

I probably should make an attempt to get this `libraries' change into the
Cygnus sources, so that the two source trees will be consistent, and then
we can make a dejagnu that will work for both of them.

Jim

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A patch for dejagnu
  1998-03-12 17:00 ` Jim Wilson
@ 1998-03-16 20:04   ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-03-16 20:04 UTC (permalink / raw)
  To: Jim Wilson; +Cc: H.J. Lu, egcs

  In message < 199803130100.RAA22598@rtl.cygnus.com >you write:
  > I probably should make an attempt to get this `libraries' change into the
  > Cygnus sources, so that the two source trees will be consistent, and then
  > we can make a dejagnu that will work for both of them.
This is probably best.

The core issue which caused us to create "libraries" is also an issue
we need to solve for Cygnus releases.

Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* A patch for dejagnu
  1998-05-28  6:19 none Jeffrey A Law
@ 1998-05-28 17:47 ` H.J. Lu
  0 siblings, 0 replies; 4+ messages in thread
From: H.J. Lu @ 1998-05-28 17:47 UTC (permalink / raw)
  To: law; +Cc: amylaar, oliva, egcs, wilson

> That's only an issue for folks doing parallel "make check" for multilibbed
> configs.  Granted it'd be nice to handle that, but I don't think that's

While we are on parallel "make check", can you consider this patch
for dejagnu? Several calls to config.guess may be made at the same
time from the same directory during parallel "make check" on a SMP
machine. The current config.guess assumes only one call per directory
at any time. It is not always true.

Thanks.


H.J.
---
--- config.guess.orig	Fri Oct 31 13:26:24 1997
+++ config.guess	Fri Oct 31 13:28:31 1997
@@ -46,7 +46,9 @@
 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+dummy=$$
+
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
 
 # Note: order is significant - the case branches are not exclusive.
 
@@ -59,7 +61,7 @@
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	cat <<EOF >dummy.s
+	cat <<EOF >$dummy.s
 	.globl main
 	.ent main
 main:
@@ -71,9 +73,9 @@
 	ret \$31,(\$26),1
 	.end main
 EOF
-	${CC-cc} dummy.s -o dummy 2>/dev/null
+	${CC-cc} $dummy.s -o $dummy 2>/dev/null
 	if test "$?" = 0 ; then
-		./dummy
+		./$dummy
 		case "$?" in
 			1)
 				UNAME_MACHINE="alphaev5"
@@ -83,7 +85,7 @@
 				;;
 		esac
 	fi
-	rm -f dummy.s dummy
+	rm -f $dummy.s $dummy
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
 	exit 0 ;;
     21064:Windows_NT:50:3)
@@ -172,6 +174,18 @@
 		;;
 	esac
 	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
 	exit 0 ;;
@@ -215,7 +229,7 @@
 	echo clipper-intergraph-clix${UNAME_RELEASE}
 	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	sed 's/^	//' << EOF >dummy.c
+	sed 's/^	//' << EOF >$dummy.c
 	int main (argc, argv) int argc; char **argv; {
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
@@ -231,10 +245,10 @@
 	  exit (-1);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy \
-	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	${CC-cc} $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
@@ -286,7 +300,7 @@
 	exit 0 ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		sed 's/^		//' << EOF >dummy.c
+		sed 's/^		//' << EOF >$dummy.c
 		#include <sys/systemcfg.h>
 
 		main()
@@ -297,8 +311,8 @@
 			exit(0);
 			}
 EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
+		${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -351,7 +365,7 @@
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
     3050*:HI-UX:*:*)
-	sed 's/^	//' << EOF >dummy.c
+	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
 	main ()
@@ -376,8 +390,8 @@
 	  exit (0);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -497,7 +511,7 @@
 	esac
 
 	if test "${UNAME_MACHINE}" = "alpha" ; then
-		sed 's/^	//'  <<EOF >dummy.s
+		sed 's/^	//'  <<EOF >$dummy.s
 		.globl main
 		.ent main
 	main:
@@ -510,9 +524,9 @@
 		.end main
 EOF
 		LIBC=""
-		${CC-cc} dummy.s -o dummy 2>/dev/null
+		${CC-cc} $dummy.s -o $dummy 2>/dev/null
 		if test "$?" = 0 ; then
-			./dummy
+			./$dummy
 			case "$?" in
 				1)
 					UNAME_MACHINE="alphaev5"
@@ -522,16 +536,16 @@
 				;;	
 			esac	
 
-			objdump --private-headers dummy | \
+			objdump --private-headers $dummy | \
 			  grep ld.so.1 > /dev/null
 			if test "$?" = 0 ; then
 				LIBC="libc1"
 			fi
 		fi	
-		rm -f dummy.s dummy
+		rm -f $dummy.s $dummy
 		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
 	elif test "${UNAME_MACHINE}" = "mips" ; then
-	  cat >dummy.c <<EOF
+	  cat >$dummy.c <<EOF
 main(argc, argv)
      int argc;
      char *argv[];
@@ -545,8 +559,8 @@
   return 0;
 }
 EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
+	  ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+	  rm -f $dummy.c $dummy
 	else
 	  # Either a pre-BFD a.out linker (linux-gnuoldld)
 	  # or one that does not give us useful --help.
@@ -565,7 +579,7 @@
 	    ;;
 	  esac
 	  # Determine whether the default compiler is a.out or elf
-	  cat >dummy.c <<EOF
+	  cat >$dummy.c <<EOF
 #include <features.h>
 main(argc, argv)
      int argc;
@@ -587,8 +601,8 @@
   return 0;
 }
 EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
+	  ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+	  rm -f $dummy.c $dummy
 	fi ;;
 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
 # are messed up and put the nodename in both sysname and nodename.
@@ -719,7 +733,7 @@
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
-cat >dummy.c <<EOF
+cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
 # include <sys/utsname.h>
@@ -817,8 +831,8 @@
 }
 EOF
 
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-05-28 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-11  9:39 A patch for dejagnu H.J. Lu
1998-03-12 17:00 ` Jim Wilson
1998-03-16 20:04   ` Jeffrey A Law
1998-05-28  6:19 none Jeffrey A Law
1998-05-28 17:47 ` A patch for dejagnu H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).