From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@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:00 -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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00494.txt.bz2 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 pas= s the > "pthreads" option, like this: OK, how about the patch below? --=20 Yao (=E9=BD=90=E5=B0=A7) =46rom c7392e6f937bf342daee99dfd5bcc6daf91af417 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Fri, 17 Nov 2017 13:04:10 +0000 Subject: [PATCH] [testsuite] Pass pthreads in prepare_for_testing "pthreads" in the right flag to pass in prepare_for_testing to 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-22 Yao Qi * gdb.base/info-os.exp: Pass pthreads. * gdb.multi/multi-attach.exp: Likewise. diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/in= fo-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 { } =20 # Compile test program. -if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug ad= ditional_flags=3D-lpthread}] } { +if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pt= hreads}] } { fail "cannot compile test program" return -1 } diff --git a/gdb/testsuite/gdb.multi/multi-attach.exp b/gdb/testsuite/gdb.m= ulti/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 } =20 -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug add= itional_flags=3D-lpthread}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pth= reads}]} { return -1 } =20