]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Reorder gnatmake arguments in inline-section-gc.exp, again
authorTom Tromey <tromey@adacore.com>
Wed, 12 Feb 2025 15:49:30 +0000 (08:49 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 12 Feb 2025 17:03:28 +0000 (10:03 -0700)
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.

gdb/testsuite/gdb.ada/inline-section-gc.exp

index 55cd156b1f7ec8567b1bdc558ae329a3ac71fdd0..78539aa432a8e83b56d74ecf34fa00951ebaf31c 100644 (file)
@@ -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