From: Tom Tromey Date: Wed, 12 Feb 2025 15:49:30 +0000 (-0700) Subject: Reorder gnatmake arguments in inline-section-gc.exp, again X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03667c68a6e52e859895c236c9ac2a19b0dae915;p=thirdparty%2Fbinutils-gdb.git Reorder gnatmake arguments in inline-section-gc.exp, again Tom de Vries pointed out that commit 8cfa1fc4 ("Reorder gnatmake arguments in inline-section-gc.exp") caused a regression with an older version of dejagnu. This patch works around that problem by further reordering the arguments to gnatmake and also arranging to leave gnatmake in "-margs" mode. --- diff --git a/gdb/testsuite/gdb.ada/inline-section-gc.exp b/gdb/testsuite/gdb.ada/inline-section-gc.exp index 55cd156b1f7..78539aa432a 100644 --- a/gdb/testsuite/gdb.ada/inline-section-gc.exp +++ b/gdb/testsuite/gdb.ada/inline-section-gc.exp @@ -19,14 +19,20 @@ require allow_ada_tests standard_ada_testfile caller +# The ordering here works around a bug in older versions of dejagnu. +# In particular we use "additional_flags" and not "ldflags" to ensure +# the ordering (this is ok because the distinction doesn't really +# matter for gnatmake anyway) and furthermore we take care to end with +# "-margs" so that any flags appended by dejagnu are applied in the +# correct mode. set options { debug optimize=-O2 additional_flags=-ffunction-sections - ldflags=-margs additional_flags=-gnatn - ldflags=-largs - ldflags=-Wl,--gc-sections + additional_flags=-largs + additional_flags=-Wl,--gc-sections + additional_flags=-margs } if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $options] != ""} { return -1