aboutsummaryrefslogtreecommitdiff
path: root/libctf
diff options
context:
space:
mode:
Diffstat (limited to 'libctf')
-rw-r--r--libctf/Makefile.am5
-rw-r--r--libctf/Makefile.in5
-rw-r--r--libctf/testsuite/config/default.exp14
-rw-r--r--libctf/testsuite/lib/ctf-lib.exp8
4 files changed, 17 insertions, 15 deletions
diff --git a/libctf/Makefile.am b/libctf/Makefile.am
index e586d25..7688184 100644
--- a/libctf/Makefile.am
+++ b/libctf/Makefile.am
@@ -86,8 +86,9 @@ check-DEJAGNU: site.exp development.exp
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
- CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
+ CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \
+ CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
+ LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
diff --git a/libctf/Makefile.in b/libctf/Makefile.in
index 5cfa100..bb3b88f 100644
--- a/libctf/Makefile.in
+++ b/libctf/Makefile.in
@@ -1374,8 +1374,9 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
@TCL_TRY_TRUE@ runtest=$(RUNTEST); \
@TCL_TRY_TRUE@ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
@TCL_TRY_TRUE@ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
-@TCL_TRY_TRUE@ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
-@TCL_TRY_TRUE@ CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
+@TCL_TRY_TRUE@ CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \
+@TCL_TRY_TRUE@ CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
+@TCL_TRY_TRUE@ LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
@TCL_TRY_TRUE@ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
@TCL_TRY_TRUE@ fi
diff --git a/libctf/testsuite/config/default.exp b/libctf/testsuite/config/default.exp
index 32e882d..f2aba56 100644
--- a/libctf/testsuite/config/default.exp
+++ b/libctf/testsuite/config/default.exp
@@ -43,18 +43,18 @@ if {![file isdirectory tmpdir/libctf]} then {
set gcc_B_opt "-B[pwd]/tmpdir/libctf/"
set ld_L_opt ""
-# The "make check" target in the Makefile passes in
-# "CC=$(CC_FOR_TARGET)". But, if the user invokes runtest directly,
-# these flags may not be set.
if {![info exists CC]} {
- set CC [find_gcc]
-}
-if {![info exists CC_FOR_HOST]} {
- set CC_FOR_HOST $CC
+ set CC gcc
}
if {![info exists CFLAGS]} {
set CFLAGS "-g -O2"
}
+if {![info exists CC_FOR_TARGET]} {
+ set CC_FOR_TARGET [find_gcc]
+}
+if {![info exists CFLAGS_FOR_TARGET]} {
+ set CFLAGS_FOR_TARGET $CFLAGS
+}
# load the utility procedures
load_lib ctf-lib.exp
diff --git a/libctf/testsuite/lib/ctf-lib.exp b/libctf/testsuite/lib/ctf-lib.exp
index 0fb0958..f2908f7 100644
--- a/libctf/testsuite/lib/ctf-lib.exp
+++ b/libctf/testsuite/lib/ctf-lib.exp
@@ -48,10 +48,10 @@ proc run_native_host_cmd { command } {
# Compile and link a C source file for execution on the host.
proc compile_link_one_host_cc { src output additional_args } {
- global CC_FOR_HOST
+ global CC
global CFLAGS
- return [run_native_host_cmd "./libtool --quiet --tag=CC --mode=link $CC_FOR_HOST $CFLAGS $src -o $output $additional_args" ]
+ return [run_native_host_cmd "./libtool --quiet --tag=CC --mode=link $CC $CFLAGS $src -o $output $additional_args" ]
}
# run_lookup_test FILE
@@ -110,7 +110,7 @@ proc compile_link_one_host_cc { src output additional_args } {
# regexps in FILE.d.
#
proc run_lookup_test { name } {
- global CC CFLAGS LIBS
+ global CC_FOR_TARGET CFLAGS_FOR_TARGET LIBS
global copyfile env runtests srcdir subdir verbose
if ![runtest_file_p $runtests $name] then {
@@ -217,7 +217,7 @@ proc run_lookup_test { name } {
}
}
- set comp_output [run_host_cmd "$CC" "$CFLAGS $lookup_flags [concat $src] -o $lookup_output"]
+ set comp_output [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET $lookup_flags [concat $src] -o $lookup_output"]
if { $comp_output != ""} {
send_log "compilation of CTF program [concat $src] failed with <$comp_output>"