From patchwork Fri Nov 17 15:22:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 24310 Received: (qmail 26449 invoked by alias); 17 Nov 2017 15:22:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26013 invoked by uid 89); 17 Nov 2017 15:22:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-wm0-f52.google.com Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Nov 2017 15:22:52 +0000 Received: by mail-wm0-f52.google.com with SMTP id y80so7146370wmd.0 for ; Fri, 17 Nov 2017 07:22:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=s9MnIfRDCLa0GeNQMgNBWURXoRq0BYD69L1KH/0ZCEs=; b=dvUyvi6UzpVpleoyePN2kjmefcEjt8yKMV914rIZktDubL/7q4rv0iPiFNn5Zuu2uK k++kZ3zkfIKb8dZRYY+vglhS1+fjHd1w+4/oAUlFgYw9Q4tepkfeEQ0zS9t0QxnjzZjx ias15ipuzHft7Pi1/xYbK+ja2wPvYrM3/0MOPZzA58E3CrkeZmqVMwFXMbx/t9rkixX3 jlWwZuWLWdvvcQtqpMtHhfdy8rYFJxDDA0iYW6XGe5/YLPI83zZP4heDgP2f2LhsIf18 7rpZK91u82MxipR0MbZumPAooy1rxfimTBFShCPAQ4IoxQHcjXtaAnPZJHnjwLbxR5pw GWYw== X-Gm-Message-State: AJaThX6JRDUuwiMe31bc7YEVuYnvtiezlzBv7f1qAWm6a0DfBsAqm47g NSe8qRZIyY5jnTd6ZfhC1cTzNQ== X-Google-Smtp-Source: AGs4zMbo+puZtoUKaYNdicooG1wxezEtTpCDq9ivs0Agu92zNzvKxwNEsaPTIMtZtTc3XMGmsUl72Q== X-Received: by 10.28.213.2 with SMTP id m2mr4000630wmg.141.1510932170752; Fri, 17 Nov 2017 07:22:50 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id o22sm8965842wrb.40.2017.11.17.07.22.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 07:22:50 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] [testsuite] Pass -lpthread in libs Date: Fri, 17 Nov 2017 15:22:46 +0000 Message-Id: <1510932166-11816-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes "libs" is the right flag to pass a library to a linker, instead of additional_flags. Without this patch, the test case can't be complied by clang. gdb compile failed, clang: warning: -lpthread: 'linker' input unused gdb/testsuite: 2017-11-17 Yao Qi * gdb.base/info-os.exp: Pass -lpthread in libs. * gdb.multi/multi-attach.exp: Likewise. --- gdb/testsuite/gdb.base/info-os.exp | 2 +- gdb/testsuite/gdb.multi/multi-attach.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp index 574da26..b3109e1 100644 --- a/gdb/testsuite/gdb.base/info-os.exp +++ b/gdb/testsuite/gdb.base/info-os.exp @@ -28,7 +28,7 @@ if [gdb_skip_xml_test] then { } # Compile test program. -if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-lpthread}] } { +if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug libs=-lpthread}] } { fail "cannot compile test program" return -1 } diff --git a/gdb/testsuite/gdb.multi/multi-attach.exp b/gdb/testsuite/gdb.multi/multi-attach.exp index 9397f85..52acc91 100644 --- a/gdb/testsuite/gdb.multi/multi-attach.exp +++ b/gdb/testsuite/gdb.multi/multi-attach.exp @@ -23,7 +23,7 @@ if {![can_spawn_for_attach]} { return 0 } -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-lpthread}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug libs=-lpthread}]} { return -1 }