From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30409 invoked by alias); 11 Apr 2014 18:23:36 -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 30313 invoked by uid 89); 11 Apr 2014 18:23:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f174.google.com Received: from mail-vc0-f174.google.com (HELO mail-vc0-f174.google.com) (209.85.220.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Apr 2014 18:23:34 +0000 Received: by mail-vc0-f174.google.com with SMTP id ld13so5035642vcb.19 for ; Fri, 11 Apr 2014 11:23:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0RWITpK9WbpGsQS7PKeBxv1M8yWdVU1k2kJmMCRxF+E=; b=V6lwIOg9gXv1k4GnpEk+/ODwQYdeplu0ysTS15ebDMwXnbwAf4vHls/ur4PFHGGJFl XKGo/cIfeTh6WS3AoZGMmao9lPSlsX/PiZc/Nlz6Oj7WAeo+frFFnhhr0mS3e7cGPSpp i0ukCPTH2QIQNyg2PJKI/VEqgMXPmIWr/AdL/crtjYbm3gfxSvJUVetPnK9+MenWbxfC 14QWwFIKcGBD9MblVE7PO2SXJ7EsXmAfPpo12FG6glRhlXJWc8GObIrRZI69cdpoLFC0 UA1+0Ez5vMVBrtgl0N9WSR0qqKZPPTm58ZQFrn+FetoFmln2i/tHyhzyFV84wLcCBbBt /ugg== X-Gm-Message-State: ALoCoQk488exq3QR9zBToA8R8H574iNVz1fZKTRLCg2ARscxZ4SviAypIk3HHpOiQ/5IBxNQX4gaNZzSI+mEAsKGNEfIn+4XJEGq/UP/I5ab1MX80jLYFHw3ahxnDVhxbLigF8cdukyQYPL4EXxk73jSPm7relxBUD9ASaIB8ZAqqyLTcDWRlb5txOl/3oiU1AyXxfj1hH7MqFXN2vnxsc4cbcPYJXP3OQ== MIME-Version: 1.0 X-Received: by 10.58.219.233 with SMTP id pr9mr21644896vec.10.1397240612305; Fri, 11 Apr 2014 11:23:32 -0700 (PDT) Received: by 10.52.13.101 with HTTP; Fri, 11 Apr 2014 11:23:32 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 Apr 2014 18:23:00 -0000 Message-ID: Subject: Re: [patch] Fix unused static symbols so they're not dropped by clang From: Doug Evans To: David Blaikie Cc: gdb-patches , Eric Christopher Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00213.txt.bz2 On Thu, Apr 10, 2014 at 11:51 PM, David Blaikie wrote: > Several tests used file-static functions and variables that were not > referenced by the code. Even at -O0, clang omits these entities at the > frontend so the tests fail. > > Since it doesn't look like these tests needed this functionality for > what they were testing, I've modified the variables/functions to > either be non-static, or marked them with __attribute__((used)). > > If it's preferred that I use the attribute more pervasively, rather > than just making the entities non-static, I can provide a patch for > that (or some other preferred solution). There's certainly precedent > for both (non-static entities and __attribute__((used)) in the > testsuite already and much more of the former than the latter). > > I have commit-after-review access, so just looking for sign-off here. Yikes. This is becoming more and more painful (not your fault of course!). I can imagine this being a never ending source of regressions. Does clang perchance have a -O0-and-yes-I-really-mean-O0 option?