* src/main.c (decode_debug_flags): [SV 607777] Preserve -d options

* tests/scripts/options/dash-d: Test that -d --trace keeps -d.
This commit is contained in:
Dmitry Goncharov 2021-09-06 20:36:15 -04:00 committed by Paul Smith
parent e7eb8b5962
commit 4488592dda
2 changed files with 10 additions and 1 deletions

View file

@ -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)

View file

@ -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;