From patchwork Wed Nov 22 15:17:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 24442 Received: (qmail 97809 invoked by alias); 22 Nov 2017 15:17:33 -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 97787 invoked by uid 89); 22 Nov 2017 15:17:33 -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=Hx-languages-length:2076, complied, H*r:sk:51.2017, H*r:sk:static. X-HELO: mail-wr0-f196.google.com Received: from mail-wr0-f196.google.com (HELO mail-wr0-f196.google.com) (209.85.128.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Nov 2017 15:17:27 +0000 Received: by mail-wr0-f196.google.com with SMTP id k18so9890288wre.1 for ; Wed, 22 Nov 2017 07:17:26 -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:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=KzQk/3XdAnATOJoAzrkFICv0oTBHDOPKDAEpo+tD4aM=; b=dpM42yAO91ojemIhW45IheYZDELNhWUp7m07+UriSlYit+733PLMSeKP5EVBSnqqef lOSP81xC57llKd+tBr7CpR80JHxLOxk0QCwUR+dfy3wamxLWFS72RDJH16KP0U7b0A8v UzWE1KbOQ4S+Czn8jKfkodM0IJ8wkua6Wl1iGfqQEevyAm4bBft+Ra3WRz6toJtNcFx3 z8cPc+B7YRL4hlAM50pzYvK3BMQBcKLO7mK2ZDK7tajR8dYAG7hSoNGpajgdIOTJZIBX qsCGGQfD7+rltW5z3QUKEVqvVZppze3hn2NM+4zP64H45+Kq4VpnrXSMP16Irm5nEVum 6cug== X-Gm-Message-State: AJaThX4c7lBXKoCy/GAG1RWegrIK64+ss7Xhp61ct+1BqD7UUoEnxG96 wbBjocuLc5GecREXWydfLKcC3A== X-Google-Smtp-Source: AGs4zMaSlqYF6Vlc7mWnE7HIqQ919lXIWqDYno/HKzm7ISnXP9qBKNnOehbCQXhmrU4PuwUK6VVBig== X-Received: by 10.223.133.174 with SMTP id 43mr18782628wrt.17.1511363844846; Wed, 22 Nov 2017 07:17:24 -0800 (PST) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id y78sm14726107wrb.51.2017.11.22.07.17.23 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 22 Nov 2017 07:17:24 -0800 (PST) From: Yao Qi To: Simon Marchi Cc: Subject: Re: [PATCH] [testsuite] Pass -lpthread in libs References: <1510932166-11816-1-git-send-email-yao.qi@linaro.org> Date: Wed, 22 Nov 2017 15:17:20 +0000 In-Reply-To: (Simon Marchi's message of "Fri, 17 Nov 2017 11:54:38 -0500") Message-ID: <868teys5q7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Simon Marchi writes: > I am seeing: > > gdb compile failed, .../info-os.c:51:1: warning: control reaches end of non-void function [-Wreturn-type] > > with clang-6.0. Once I fix it, the test passes for me. Yes, it is another patch in my tree, to be posted. > > Instead of passing -lpthread directly, it would probably be better to pass the > "pthreads" option, like this: OK, how about the patch below? diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp index 574da26..3267eec 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 pthreads}] } { 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..0e54b4f 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 pthreads}]} { return -1 }