From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by sourceware.org (Postfix) with ESMTPS id AFE213858C5E for ; Thu, 12 Oct 2023 17:22:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AFE213858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4060b623e64so7963815e9.0 for ; Thu, 12 Oct 2023 10:22:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697131340; x=1697736140; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+a/dqQKVTuxTcKeshZQoF78g/xXE7+kT9cw8aCTyFS0=; b=fDpm0vcNB6X2dKVUG3uuXNQZ4vb9EkUhm+h9xPgmUhQgv3VE5ztk0AptXkjEl17g1W TZ66Dv9JeRn5SxWKygDTHPB0YezBT2a0Myl4cdOpuuMu/1tFPXUW4r94VmVRm1Pt2/eE St1sIuXY2z6JFjlxfEGkeXB1afXAvQ/ObOCQZNfMmD/bCT9mJfzVHppngJ/zT2Rd/LVk L7Ph2K4aHR1Rwe9YLF7DeDIrabZS7mv7h/6A4d6A3a5Lc8zwT43HD18sSMxiv7T7oonI a5BtDos3ez5+hgNHFnNVsDWMBMsyo54M1L37HKfzzT8gixgrf22h1B0cHa3Q0xxMxHJS ABwQ== X-Gm-Message-State: AOJu0YwdTZseUCIKc++/1J0lmCnvBZR6XmIjEofh1URLEpdenmHMk/SL bAh18mc24hizG+PspbfFaakWK3inn88bug== X-Google-Smtp-Source: AGHT+IGxWTR86AAazQdbAvBSnpryZSXuLaeK/hVRSJKmq8UYZPyZtINfELKCgB+6i73StfdYSogdWA== X-Received: by 2002:a05:600c:3795:b0:401:b92f:eec5 with SMTP id o21-20020a05600c379500b00401b92feec5mr19000892wmr.9.1697131340240; Thu, 12 Oct 2023 10:22:20 -0700 (PDT) Received: from ?IPV6:2001:8a0:f939:d200:dedd:c263:b7d3:9ba1? ([2001:8a0:f939:d200:dedd:c263:b7d3:9ba1]) by smtp.gmail.com with ESMTPSA id y4-20020a1c4b04000000b004075d5664basm373373wma.8.2023.10.12.10.22.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Oct 2023 10:22:19 -0700 (PDT) Message-ID: <1a90eccf-8814-4b46-a56f-aaf2a8f30248@palves.net> Date: Thu, 12 Oct 2023 18:22:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] [gdb/build] Require c++17 compiler Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org References: <20231005065449.32643-1-tdevries@suse.de> From: Pedro Alves In-Reply-To: <20231005065449.32643-1-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 2023-10-05 07:54, Tom de Vries via Gdb-patches wrote: > Consequently, the NEWS item mentions gcc 9 as an example compiler to use. > > My understanding of using gcc 5-8 is that it works as long as gdb doesn't use > not yet available language features. Of course the set of used language > features may change in time, so what compiler still works may change. > > Problems can arise when shared libs starts to have C++17 based APIs (or > somehow expose instantiations of such classes). If compiled with a compiler > in which c++17 support was still experimental, it may be incompatible when > linking with: > - code compiled with a compiler with non-experimental c++17 support, or > - code compiled with a different compiler with experimental c++17 support. > > Looking at the current implementation of our only shared lib: > libinproctrace.so, I couldn't spot any c++ usage in the API, so I'm assuming > this problem is not likely to happen. I think this concern goes beyond libinproctrace.co, and extends to APIs exposed by libstdc++. E.g., (and I haven't checked), say that the libstdc++ from GCC 6 implemented some C++17 library feature that we start using, but then the API/ABI of that library feature changed in later GCCs. Compiling GDB with GCC 6 and expecting that it runs on a system with libstdc++ from GCC 9 may not work. I don't know whether there's some document or page or wiki or some such somewhere documenting such ABI breakages. +1 on requiring GCC 9, unless it proves troublesomely "too new" in practice, which I hope not.