From 3a9149a7b79b1fc673d3068ab2d3a6b311bf2cdc Mon Sep 17 00:00:00 2001 From: Jeffrey Wheat Date: Fri, 10 Sep 1993 16:37:47 +0000 Subject: [PATCH] Fixed RUNTEST* CXX CXXFLAGS macros and check rule. --- ld/ChangeLog | 4 +++ ld/Makefile.in | 92 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 66 insertions(+), 30 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index cd8cd728751..a1bf64789fe 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 10 09:34:29 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule. + Fri Sep 10 07:26:57 1993 David J. Mackenzie (djm@thepub.cygnus.com) * Makefile.in (TAGS): Use shell wildcards. diff --git a/ld/Makefile.in b/ld/Makefile.in index 6083cca595f..0ecc29bb093 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -1,5 +1,5 @@ # Makefile for the GNU linker ld (version 2) -# Copyright (C) 1989-1992 Free Software Foundation, Inc. +# Copyright (C) 1989-1993 Free Software Foundation, Inc. # This file is part of GNU ld.. @@ -19,6 +19,7 @@ srcdir = . +objdir = . prefix = /usr/local @@ -106,7 +107,25 @@ HOSTING_CRT0=/lib/crt0.o HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc HOSTING_EMU=-m $(EMUL) -C++ = g++ -fgnu-linker +CXX = `if [ -f ../gcc/xgcc ] ; then \ + echo ../gcc/xgcc -B../gcc/; \ + else echo gcc; \ + fi` +CXXFLAGS = -fgnu-linker + +# Setup the testing framework, if you have one +RUNTEST = runtest +RUNTEST_FLAGS = +RUNTEST_CC = `if [ -f ../gcc/xgcc ] ; then \ + echo ../gcc/xgcc -B../gcc/; \ + else echo gcc; \ + fi` +RUNTEST_CFLAGS = $(CFLAGS) +RUNTEST_CXX = `if [ -f ../gcc/xgcc ] ; then \ + echo ../gcc/xgcc -B../gcc/; \ + else echo gcc; \ + fi` +RUNTEST_CXXFLAGS = $(CXXFLAGS) all: @@ -123,7 +142,7 @@ LINTFLAGS = $(INCLUDES) $(EXTRA_DEF) .y.c: .cc.o: - $(C++) -c -I$(srcdir) $(CFLAGS) $< + $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $< .c.o: $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(CFLAGS) $< @@ -402,41 +421,51 @@ lderror.o: lderror.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/fopen-same.h $(BFDDIR)/seclet.h ld.h \ ldmisc.h -# START OF CHECK TARGETS +# CYGNUS LOCAL targets. +# These targets are for the dejagnu testsuites. The file site.exp +# contains global variables that all the testsuites will use. +# There is a current debate as to how and where to generate test +# outputs. Rob feels each test should be built in $(objdir) with +# a unique name. Cassidy feels that we should create a directory +# called $(objdir)/tmpdir and do the work there. This way, there +# is no potential conflict with existing objects, ie: as there +# was in the past with loop.o and flow.o, and, there is no chance +# of filling /tmp, which would cause other problems. Lastly, this +# allow retention of the testcase name making debugging easier. +# +testdir = $(objdir)/tmpdir + site.exp: ./config.status Makefile + @if [ -d $(testdir) ]; then true; else mkdir $(testdir); fi @echo "Making a new config file..." - -@rm -f ./tmp? + @rm -f ./tmp? @touch site.exp - - -@mv site.exp site.bak + @mv site.exp site.bak @echo "## variables are automatically generated by make ##" > ./tmp0 @echo "# Do not edit here. If you wish to override these" >> ./tmp0 @echo "# values, add them to the last section" >> ./tmp0 - @echo "set host_os ${host_os}" >> ./tmp0 - @echo "set host_alias ${host_alias}" >> ./tmp0 - @echo "set host_cpu ${host_cpu}" >> ./tmp0 - @echo "set host_vendor ${host_vendor}" >> ./tmp0 - @echo "set target_os ${target_os}" >> ./tmp0 - @echo "set target_alias ${target_alias}" >> ./tmp0 - @echo "set target_cpu ${target_cpu}" >> ./tmp0 - @echo "set target_vendor ${target_vendor}" >> ./tmp0 - @echo "set host_triplet ${host_canonical}" >> ./tmp0 - @echo "set target_triplet ${target_canonical}" >> ./tmp0 - @echo "set srcdir ${srcdir}/testsuite" >> ./tmp0 + @echo "# HOST AND TARGET INFO" >> ./tmp0 + @echo "set host_os $(host_os)" >> ./tmp0 + @echo "set host_alias $(host_alias)" >> ./tmp0 + @echo "set host_cpu $(host_cpu)" >> ./tmp0 + @echo "set host_vendor $(host_vendor)" >> ./tmp0 + @echo "set target_os $(target_os)" >> ./tmp0 + @echo "set target_alias $(target_alias)" >> ./tmp0 + @echo "set target_cpu $(target_cpu)" >> ./tmp0 + @echo "set target_vendor $(target_vendor)" >> ./tmp0 + @echo "set host_triplet $(host_canonical)" >> ./tmp0 + @echo "set target_triplet $(target_canonical)" >> ./tmp0 + @echo "# DIRECTORY INFO" >> ./tmp0 @echo "set objdir `pwd`" >> ./tmp0 - @echo "set tool ld" >> ./tmp0 + @echo "set tmpdir `cd $(testdir); pwd`" >> ./tmp0 @echo "" >> ./tmp0 - @echo "# GCC DEPENDANCIES" >> ./tmp0 - @echo "set CC \"${CC}\"" >> ./tmp0 - @echo "set CXX \"${C++}\"" >> ./tmp0 - @echo "set CFLAGS \"${CFLAGS}\"" >> ./tmp0 @echo "# LD DEPENDANCIES" >> ./tmp0 - @echo "set OFILES \"${OFILES}\"" >> ./tmp0 - @echo "set BFDLIB \"${BFDLIB}\"" >> ./tmp0 - @echo "set LIBIBERTY \"${LIBIBERTY}\"" >> ./tmp0 - @echo "set HOSTING_EMU \"${HOSTING_EMU}\"" >> ./tmp0 - @echo "set HOSTING_CRT0 \"${HOSTING_CRT0}\"" >> ./tmp0 - @echo "set HOSTING_LIBS \"${HOSTING_LIBS}\"" >> ./tmp0 + @echo "set OFILES \"$(OFILES)\"" >> ./tmp0 + @echo "set BFDLIB \"$(BFDLIB)\"" >> ./tmp0 + @echo "set LIBIBERTY \"$(LIBIBERTY)\"" >> ./tmp0 + @echo "set HOSTING_EMU \"$(HOSTING_EMU)\"" >> ./tmp0 + @echo "set HOSTING_CRT0 \"$(HOSTING_CRT0)\"" >> ./tmp0 + @echo "set HOSTING_LIBS \"$(HOSTING_LIBS)\"" >> ./tmp0 @echo "" >> ./tmp0 @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0 @cat ./tmp0 > site.exp @@ -445,7 +474,10 @@ site.exp: ./config.status Makefile -@rm -f ./tmp? check: ld.new site.exp - $(RUNTEST) $(RUNTESTFLAGS) + $(RUNTEST) --tool ld \ + --srcdir $(srcdir)/testsuite $(RUNTEST_FLAGS) \ + CC="$(RUNTEST_CC)" CFLAGS="$(RUNTEST_CFLAGS)" \ + CXX="$(RUNTEST_CXX)" CXXFLAGS="$(RUNTEST_CXXFLAGS)" installcheck: -- 2.30.2