From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id D1CC63858D37; Thu, 18 Apr 2024 11:14:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1CC63858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713438880; bh=9o3g4mQYyfVG88dyTmczpS448BD8aAnju8XIsyEM5wY=; h=From:To:Subject:Date:From; b=xkBJt10TyQDH9ZF8f9JHm5n1yRYaF2C+ukErZ0UMC0UWzMAnLTZKbCzl+rGtCPY0y DNuTEXKBiojehiSg2oGlXXpIsxcGhEDaiCyr+rnrMwZqVQLWt3LM9ZvtfH5N9IASC5 U7WEsVutGfoKnR3ZgBQKJMDVofIF3RBNT+N7Hbuw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-10015] [libstdc++] define zoneinfo_dir_override on vxworks X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/heads/master X-Git-Oldrev: a2f4be3dae04fa8606d1cc8451f0b9d450f7e6e6 X-Git-Newrev: da3504ae4d1e6872585b1107a4932efd3824e943 Message-Id: <20240418111440.D1CC63858D37@sourceware.org> Date: Thu, 18 Apr 2024 11:14:40 +0000 (GMT) List-Id: https://gcc.gnu.org/g:da3504ae4d1e6872585b1107a4932efd3824e943 commit r14-10015-gda3504ae4d1e6872585b1107a4932efd3824e943 Author: Alexandre Oliva Date: Thu Apr 18 08:00:52 2024 -0300 [libstdc++] define zoneinfo_dir_override on vxworks VxWorks fails to load kernel-mode modules with weak undefined symbols. In RTP mode modules, that undergo final linking, weak undefined symbols are not a problem. This patch adds kernel-mode VxWorks multilibs to the set of targets that don't support weak undefined symbols without special flags, in which tzdb's zoneinfo_dir_override is given a weak definition. for libstdc++-v3/ChangeLog * src/c++20/tzdb.cc (__gnu_cxx::zoneinfo_dir_override): Define on VxWorks non-RTP. Diff: --- libstdc++-v3/src/c++20/tzdb.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc index 890a4c53e2d..639d1c440ba 100644 --- a/libstdc++-v3/src/c++20/tzdb.cc +++ b/libstdc++-v3/src/c++20/tzdb.cc @@ -70,8 +70,9 @@ namespace __gnu_cxx #else [[gnu::weak]] const char* zoneinfo_dir_override(); -#if defined(__APPLE__) || defined(__hpux__) - // Need a weak definition for Mach-O. +#if defined(__APPLE__) || defined(__hpux__) \ + || (defined(__VXWORKS__) && !defined(__RTP__)) + // Need a weak definition for Mach-O et al. [[gnu::weak]] const char* zoneinfo_dir_override() { #ifdef _GLIBCXX_ZONEINFO_DIR