summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2023-01-15 10:27:53 -0500
committerPaul Smith <psmith@gnu.org>2023-01-15 16:35:57 -0500
commita8890796a439941bee9bc027b31430aec1b334e6 (patch)
treea1c5ee6ce44e7d0cbdb46646d1f847f8dba73c7b
parentbe6bb0fd687cfea24af4024a638b2fde5aad1e4b (diff)
downloadmake-git-a8890796a439941bee9bc027b31430aec1b334e6.tar.gz
* tests/scripts/features/archives: Use the configured compiler for CC
-rw-r--r--tests/scripts/features/archives5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/scripts/features/archives b/tests/scripts/features/archives
index 4e3434b5..a098d222 100644
--- a/tests/scripts/features/archives
+++ b/tests/scripts/features/archives
@@ -254,12 +254,15 @@ create_file('a.c', 'int i;');
create_file('b.c', 'int j;');
utouch(-20, 'a.c', 'b.c');
+my $cc = get_config('CC') || 'cc';
+my $vars = "CC=$cc $arvar";
+
run_make_test(q!
mylib.a: mylib.a(a.o b.o)
(%): % ;
%.a: ; $(AR) $(ARFLAGS) $@ $?
%.o : %.c ; @echo Compile $<; $(COMPILE.c) -o $@ $<
-!, $arvar, "Compile a.c\nCompile b.c\n$ar $arflags mylib.a a.o b.o\n${create2}rm b.o a.o");
+!, $vars, "Compile a.c\nCompile b.c\n$ar $arflags mylib.a a.o b.o\n${create2}rm b.o a.o");
run_make_test(undef, $arvar, "#MAKE#: 'mylib.a' is up to date.");