From patchwork Tue Apr 16 23:06:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 32313 Received: (qmail 76538 invoked by alias); 16 Apr 2019 23:06:22 -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 76488 invoked by uid 89); 16 Apr 2019 23:06:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f41.google.com Received: from mail-wm1-f41.google.com (HELO mail-wm1-f41.google.com) (209.85.128.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Apr 2019 23:06:21 +0000 Received: by mail-wm1-f41.google.com with SMTP id z11so1046403wmi.0 for ; Tue, 16 Apr 2019 16:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=DPFOPa3Bm7wxUVah9qvLY90esj3kjsEIpK4ZdkAonbY=; b=gmAPKwoJwLNZ5+MvWk2x37D8PBsxFHO6/9gf9XWjxtViGUji3gyE/eIjGD+qWjo7QV 1cYJeBZlacndUWDgRRTr6PVKLZ2LYKpAlvO/qCPAXSVfNkS38v+d66s/Bzc1rbho52Ib u1jgO22LxBLvpQ0NE09MWZybxsUwBtHcAzrVPjgzMcVhbB5i71zQat+V3iZqfKzRBey1 z10Wlhd9e9p0put8OswosXAL6J6fNZwvbYOxDBH+7V0wmcyB0UtQ/9o+kktOCoCjviDh mEdTBmq83M0D+Fcbzrz6Ivf0TLr3fQ845oyZdmNkQl6K6whStY1J2okgYQs7oXbFu3HH 9RqQ== Return-Path: Received: from localhost (host86-164-133-98.range86-164.btcentralplus.com. [86.164.133.98]) by smtp.gmail.com with ESMTPSA id t74sm5453068wmt.3.2019.04.16.16.06.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 16:06:17 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 2/5] gdb/testsuite: Don't add gcc flags when compiling rust tests Date: Wed, 17 Apr 2019 00:06:07 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes We currently add the -fno-stack-protector option to the compiler flags when compiling rust tests, as this is not a valid rustcc flag, this means non of the test tests will compile. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_compile): Don't add -fno-stack-protector option if we're using rustcc. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/gdb.exp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 1176fdded14..6c0f243eef8 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3566,7 +3566,11 @@ proc gdb_compile {source dest type options} { && !([test_compiler_info {gcc-[0-3]-*}] || [test_compiler_info {gcc-4-0-*}]) } { # Put it at the front to not override any user-provided value. - lappend new_options "early_flags=-fno-stack-protector" + if {[lsearch -exact $options rust] != -1} { + # -fno-stack-protector is not a rustcc option. + } else { + lappend new_options "early_flags=-fno-stack-protector" + } } # Because we link with libraries using their basename, we may need