]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
modula2: Add -lnsl -lsocket libraries to gcc/testsuite/lib/gm2.exp
authorGaius Mulley <gaiusmod2@gmail.com>
Sun, 23 Apr 2023 20:09:45 +0000 (21:09 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Sun, 23 Apr 2023 20:09:45 +0000 (21:09 +0100)
Solaris requires -lnsl -lsocket (present in the driver) but not when
running the testsuite.  This patch tests target for *-*-solaris2
and conditionally appends the above libraries.

gcc/testsuite/ChangeLog:

* lib/gm2.exp (gm2_target_compile_default): Conditionally
append -lnsl -lsocket to ldflags.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/testsuite/lib/gm2.exp

index 25b5e684b3a58f6519c14270b4bc6ef744f30675..ab58a567e48917aa16bfb07b1c84414f879f79cb 100644 (file)
@@ -218,6 +218,10 @@ proc gm2_target_compile_default { source dest type options } {
     if [info exists TOOL_OPTIONS] {
        lappend options "additional_flags=$TOOL_OPTIONS"
     }
+    if [istarget *-*-solaris2*] {
+       lappend options "ldflags=-lnsl -lsocket"
+    }
+
     lappend options "timeout=[timeout_value]"
     lappend options "compiler=$GCC_UNDER_TEST"
     # puts stderr "options = $options\n"