From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 5B5A53858D20; Thu, 31 Aug 2023 17:53:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B5A53858D20 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-ej1-x62c.google.com with SMTP id a640c23a62f3a-99df431d4bfso128530266b.1; Thu, 31 Aug 2023 10:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693504432; x=1694109232; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EDtGsOLChwpMk6Se/Q4Lz7mmRFcoBZ27PC1TEtLQjK8=; b=NMVr0Dy7H1cCeMDzCceirfUsvrecrkeqBb17c5CSSM9+GtyE/ZDFYmhzUnXJztwrVP kszQWrlbpfb4ydn9UezfjmJyWIX0xn8dssy7Y90uQtcED3fOrpCom8Ym4Qru7wTWsYf/ oSac+J2rF++/K6dLRvYoDQTZ2r/vszdED8XSV+4WRhGY7LYA1wxVi5Uqnb7NjF5matxO Ui4kjJPBcn4eaHMeVtV3+aWFDbGS9umXfW09rmn7X3bhuTHlKRLX5hZAxDml6447jqV5 oMdgHyvQTB0NL6S+WrqKU95ZcXfPxpgZ0bDg0pGgb4CFGdagaXA/mA4hnaciCExzVvlM x6cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693504432; x=1694109232; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EDtGsOLChwpMk6Se/Q4Lz7mmRFcoBZ27PC1TEtLQjK8=; b=YHx6MiGhQmfLtC2CvTvAAIEIyeqqxZxDO+OU6wNk9Jha55em+jORAfpL6OOO7aBQi1 rZWn8uiM4tFVbWOzYRHZu4OiApY7sq5taZTuJmkOlWECPKvnMlxL4gWbDbVAjpkB6uu9 7AcJlwOvB0+MJXDQ/8Fhplcojjmnc9lSygVgP+5qyyPETeAk8ZydQoNLsiH5saB/WxEA dhl1/ebP2QlyxrWB+axoaCczrulFUS6zzQQIfYwADwdgm3iC2DwT0sKpvmnCk7tRCzfZ n3npkkEv2OCFgZRDINFHIfrr6sWUYTV5z8Rbh02xDNClJXjpHaUT+rrNgAn5/zJ/5bO2 +yyA== X-Gm-Message-State: AOJu0YwkgGu+ztIr1oMSRAgwXeVHCUmF0crlvREWazu03xKLm7e/Ctei wlEZ28OZnzPVbELjo/fhhUcsxDBPUlzK4m0hJakCFuyN X-Google-Smtp-Source: AGHT+IEaqQmYEKTfX1GtvG50NczhtyRkYMkb0YzIT7Z5P85Lh75ks+F6gQ9B2bIVz0qHkupvPQJloyhWkK2IMTr3IQk= X-Received: by 2002:a17:907:271a:b0:9a1:bd82:de35 with SMTP id w26-20020a170907271a00b009a1bd82de35mr33109ejk.3.1693504431850; Thu, 31 Aug 2023 10:53:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 31 Aug 2023 18:53:39 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238) To: Jonathan Wakely Cc: Christophe Lyon , GCC Patches , "libstdc++" Content-Type: multipart/alternative; boundary="000000000000160a9c06043bba50" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,URI_HEX 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: --000000000000160a9c06043bba50 Content-Type: text/plain; charset="UTF-8" On Thu, 31 Aug 2023, 18:43 Jonathan Wakely via Libstdc++, < libstdc++@gcc.gnu.org> wrote: > On Thu, 31 Aug 2023 at 16:26, Christophe Lyon > wrote: > > > > As discussed in PR104167 (comments #8 and below), and PR111238, using > > -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi > > (cross-toolchain) avoids link failures for a few tests: > > > > 27_io/filesystem/path/108636.cc > > I think this one probably just needs { dg-require-filesystem-ts "" } > because there's no point testing that we can link to the > std::filesystem definitions if some of those definitions are unusable > on the target. > > // { dg-additional-options "-Wl,--gc-sections" { target gc_sections } } > Oops, ignore this line! I was going to suggest that we could work try adding this line, but I think it's better to use dg-require for the 108636.cc test, and make the ones below just work. > For the rest of them, does the attached patch help? If arm-eabi > doesn't define _GLIBCXX_HAVE_READLINK then there's no point even > trying to call filesystem::read_symlink. We can avoid a useless > dependency on it by reusing the same preprocessor condition that > filesystem::read_symlink uses. > > > std/time/clock/gps/1.cc > > std/time/clock/gps/io.cc > > std/time/clock/tai/1.cc > > std/time/clock/tai/io.cc > > std/time/clock/utc/1.cc > > std/time/clock/utc/io.cc > > std/time/clock/utc/leap_second_info.cc > > std/time/exceptions.cc > > std/time/format.cc > > std/time/time_zone/get_info_local.cc > > std/time/time_zone/get_info_sys.cc > > std/time/tzdb/1.cc > > std/time/tzdb/leap_seconds.cc > > std/time/tzdb_list/1.cc > > std/time/zoned_time/1.cc > > std/time/zoned_time/custom.cc > > std/time/zoned_time/io.cc > > std/time/zoned_traits.cc > > > > This patch achieves this by calling GLIBCXX_CHECK_LINKER_FEATURES in > > cross-build cases, like we already do for native builds. We keep not > > doing so in Canadian-cross builds. > > > > However, this would hide the fact that libstdc++ somehow forces the > > user to use -Wl,-gc-sections to avoid undefined references to chdir, > > mkdir, chmod, pathconf, ... so maybe it's better to keep the status > > quo and not apply this patch? > > I'm undecided about this for now, but let's wait for HP's cris-elf > testing anyway. > --000000000000160a9c06043bba50--