diff options
Diffstat (limited to 'binutils/testsuite/Makefile.in')
-rw-r--r-- | binutils/testsuite/Makefile.in | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/binutils/testsuite/Makefile.in b/binutils/testsuite/Makefile.in index 19c92bb..3fb5fc5 100644 --- a/binutils/testsuite/Makefile.in +++ b/binutils/testsuite/Makefile.in @@ -1,6 +1,7 @@ srcdir = . prefix = /usr/local +program_transform_name = exec_prefix = $(prefix) bindir = $(exec_prefix)/bin libdir = $(exec_prefix)/lib @@ -34,9 +35,36 @@ CFLAGS = -g CHILLFLAGS = $(CFLAGS) CHILL_LIB = -lchill $(end-sanitize-chill) + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../../gcc/xgcc ] ; then \ + echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../../gcc/xgcc ] ; then \ + echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + CXXFLAGS = -g -O +EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; \ + then echo $${rootme}/../../expect/expect ; \ + else echo expect; fi` + LINK= ln -s SUBDIRS= @@ -44,6 +72,7 @@ RUNTEST = runtest RUNTESTFLAGS = FLAGS_TO_PASS = \ "CC=$(CC)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ "CFLAGS=$(CFLAGS)" #### host, target, and site specific Makefile frags come in here. @@ -62,13 +91,12 @@ install-info: $(MAKE) subdir_do DO=install-info "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS) check: site.exp all - $(RUNTEST) $(RUNTESTFLAGS) $(FLAGS_TO_PASS) --tool binutils --srcdir $(srcdir) + $(RUNTEST) $(RUNTESTFLAGS) site.exp: ./config.status Makefile @echo "Making a new config file..." -@rm -f ./tmp? @touch site.exp - -@mv site.exp site.bak @echo "## these variables are automatically generated by make ##" > ./tmp0 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 @@ -76,6 +104,14 @@ site.exp: ./config.status Makefile @echo "set host_triplet ${host_canonical}" >> ./tmp0 @echo "set target_triplet ${target_canonical}" >> ./tmp0 @echo "set tool binutils" >> ./tmp0 + @echo "set srcdir ${srcdir}" >> ./tmp0 + @echo "set RANLIB [findfile \$$base_dir/../ranlib]" >> ./tmp0 + @echo "set OBJCOPY [findfile \$$base_dir/../objcopy]" >> ./tmp0 + @echo "set STRIP [findfile \$$base_dir/../strip]" >> ./tmp0 + @echo "set STRINGS [findfile \$$base_dir/../strings]" >> ./tmp0 + @echo "set NM [findfile \$$base_dir/../nm]" >> ./tmp0 + @echo "set OBJDUMP [findfile \$$base_dir/../objdump]" >> ./tmp0 + @echo "set SIZE [findfile \$$base_dir/../size]" >> ./tmp0 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 @cat ./tmp0 > site.exp @cat site.bak | sed \ |