From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1499) id 6B9803858C83; Sun, 23 Apr 2023 20:11:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B9803858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682280709; bh=bqDCoew4a4+VANsjsoq+tah7/QUCxL77NoZoro+zcg8=; h=From:To:Subject:Date:From; b=KBBjm9qKJJoO6uzoHzBi+oJCmjqDgF5QdoSW36Ol66uLwq0IKsE9/GvL9E64U7wCP bVMh/D0E0ZI6/MGe+9h5nKev4Xf6/Yydaq9fz+SsnggtT823lYWpseWNEtTtG13pmY kz1sAfScArCqdIhbowEBprfOd6fgBpjWKrxA40LM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Gaius Mulley To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-180] modula2: Add -lnsl -lsocket libraries to gcc/testsuite/lib/gm2.exp X-Act-Checkin: gcc X-Git-Author: Gaius Mulley X-Git-Refname: refs/heads/master X-Git-Oldrev: 7e26fd6bcd39f53bc917f55f8cce6101180c1dcd X-Git-Newrev: 8d7223f65799b170b1314a35bb98249d419e7215 Message-Id: <20230423201149.6B9803858C83@sourceware.org> Date: Sun, 23 Apr 2023 20:11:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8d7223f65799b170b1314a35bb98249d419e7215 commit r14-180-g8d7223f65799b170b1314a35bb98249d419e7215 Author: Gaius Mulley Date: Sun Apr 23 21:09:45 2023 +0100 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: --- gcc/testsuite/lib/gm2.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/testsuite/lib/gm2.exp b/gcc/testsuite/lib/gm2.exp index 25b5e684b3a..ab58a567e48 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"