From: Dmitry Goncharov Date: Tue, 7 Sep 2021 00:36:15 +0000 (-0400) Subject: * src/main.c (decode_debug_flags): [SV 607777] Preserve -d options X-Git-Tag: 4.3.90~151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4488592ddae404fb11ce874d16589270b5e4c787;p=thirdparty%2Fmake.git * src/main.c (decode_debug_flags): [SV 607777] Preserve -d options * tests/scripts/options/dash-d: Test that -d --trace keeps -d. --- diff --git a/src/main.c b/src/main.c index 03db83cc..f16125e2 100644 --- a/src/main.c +++ b/src/main.c @@ -724,7 +724,7 @@ decode_debug_flags (void) db_level = DB_ALL; if (trace_flag) - db_level = DB_PRINT | DB_WHY; + db_level |= DB_PRINT | DB_WHY; if (db_flags) for (pp=db_flags->list; *pp; ++pp) diff --git a/tests/scripts/options/dash-d b/tests/scripts/options/dash-d new file mode 100644 index 00000000..ec2e39ac --- /dev/null +++ b/tests/scripts/options/dash-d @@ -0,0 +1,9 @@ +# -*-perl-*- + +$description = "Test make -d option.\n"; + +# sv 60777. +# Test that debug output is printed when both -d and --trace are specified. +run_make_test('all: ; :', '-d --trace', "/GNU Make/"); + +1;