From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id C23BB3858403 for ; Thu, 6 Oct 2022 12:15:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C23BB3858403 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x536.google.com with SMTP id e18so2532918edj.3 for ; Thu, 06 Oct 2022 05:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=X1Lu3cWqY2Tk3/8NwvzkYST4HD1NPnFf6YVpBDXCpVk=; b=e/mYEqooz2/bz4r9M7SRxxyTdzZdtCtF0Xodif3ccD+M20DdpeKSZoIe+pSDIuaNI+ s9it9r8gjfSoc0N8E1T7PGKD3+T8ANtuXrPOmMMA5xbWvYQJzPEAAJFmdfXzyOt+1toc 6LLgIDodxtOsYR+QlVTi7yqUuwAjvRxNqn5JH/uHervQ0umyEMmSjFokcAzipQtfMGj4 Ksnmgb2qwIW5YkGF7qQJlPlAxePjKb45b/YhbUIFh+bzTwmxL8xCwO4l5FENwI67x/Rg sMrnB9ZtMb9dRHOaDYfmU8Xr81teEwRXgTmxgfJaQxzNKzUipkdQxAVUs71PNL+1Fmyd rT/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=X1Lu3cWqY2Tk3/8NwvzkYST4HD1NPnFf6YVpBDXCpVk=; b=vRtQauU9b1ht7lFOc6ehQS9VF8gYYhSJIGNEKQByrK5N83wzXeeyI8Y7DNAiEt1aSf 9TrhAOO2Jnl04fLjg5/tJcHiksI8Zpozv1g1j2zbvUYu1qDdINM1JYdT2/mxhO0kPWFR qt3UAKQl2QNxmB9rz9g8X0a1kCvpV4qXGQdr8DFD2AGQ2naZAXSs0vYjyuKRfCr0IUPw g3IDgCbcEtDVY10dZl+BS+mS0YbG17tNBf29J1Vkdn2PciFJWuAk9Mua9BWf5PzVrpnx pWwU4ES9vnXO73089DIhUq2WrvuAa+5ztso5f9IOEnwkSfNJJXubWCCXrDjTxyw4MsKY 12EA== X-Gm-Message-State: ACrzQf3ar8Z5pNBT+bEO+NShTc4+nrk4W+Wh/hjmo1nSbF6Ktkjm7rqh z79ejuwL58dVhOTjJJ32jF3jev8resvoq4RzjaA= X-Google-Smtp-Source: AMsMyM5cpWZ4sqgpVenuZuIHNY+xXoE4sJTISg8X45P4T0DdViFFu7/8UKsesNQz7VOlgtcfpojEHRbiJE7E47TIId8= X-Received: by 2002:a05:6402:550c:b0:443:7d15:d57f with SMTP id fi12-20020a056402550c00b004437d15d57fmr4354795edb.147.1665058515376; Thu, 06 Oct 2022 05:15:15 -0700 (PDT) MIME-Version: 1.0 References: <30A5CEC6-062F-4DE3-8A36-E6A34C2EE4BB@adacore.com> In-Reply-To: <30A5CEC6-062F-4DE3-8A36-E6A34C2EE4BB@adacore.com> From: Richard Biener Date: Thu, 6 Oct 2022 14:15:03 +0200 Message-ID: Subject: Re: [PATCH] Introduce DWARF_VERSION_DEFAULT (and redefine for VxWorks) To: Olivier Hainque Cc: gcc-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 30, 2022 at 6:18 PM Olivier Hainque via Gcc-patches wrote: > > Hello, > > This change is a proposal to introduce a target overridable macro > to replace the hardcoded value used in common.opt to initialize > dwarf_version. > > The main advantage compared to special code in a target > override_options hook is that redefinitions by target config files > are visible by both the compiler proper and by the driver, which > might refer to dwarf_version in ASM_DEBUG_SPECs and friends. > > This is useful at least on VxWorks, where we usually need to > default to dwarf 4 or even 2 to accommodate non-gdb debuggers > provided by the environment, including for assembly sources > used in libgcc for some ports (witnessed with lse.S on aarch64). > > We have been using this in a lot of gcc-11 based toolchains > for various configurations for a while, cross and native. > > This is a noop for anything but VxWorks and helped cure crashes > of target debuggers in VxWorks environments. > > Bootstrapped and regression tested for mainline on x86_64-linux. > > Is this ok to commit? I think this is reasonable, thus OK. Thanks, Richard. > Thanks in advance! > > Best Regards, > > Olivier > > 2022-09-30 Olivier Hainque > > gcc/ > * defaults.h (DWARF_DEFAULT_VERSION): Define if not > defined already. > * common.opt (gdwarf-): Use it. > * doc/tm.texi.in (DWARF_DEFAULT_VERSION): Document. > * doc/tm.texi: Update accordingly. > > * config/vxworks.h (DWARF_DEFAULT_VERSION): Redefine. > * config/vxworks.cc: Remove code setting dwarf_version, now > handled by the DWARF_DEFAULT_VERSION redefinition. >