From: Gaius Mulley Date: Sun, 23 Apr 2023 20:09:45 +0000 (+0100) Subject: modula2: Add -lnsl -lsocket libraries to gcc/testsuite/lib/gm2.exp X-Git-Tag: basepoints/gcc-15~9959 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d7223f65799b170b1314a35bb98249d419e7215;p=thirdparty%2Fgcc.git modula2: Add -lnsl -lsocket libraries to gcc/testsuite/lib/gm2.exp 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 --- diff --git a/gcc/testsuite/lib/gm2.exp b/gcc/testsuite/lib/gm2.exp index 25b5e684b3a5..ab58a567e489 100644 --- a/gcc/testsuite/lib/gm2.exp +++ b/gcc/testsuite/lib/gm2.exp @@ -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"