]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[libstdc++] define zoneinfo_dir_override on vxworks
authorAlexandre Oliva <oliva@adacore.com>
Thu, 18 Apr 2024 11:00:52 +0000 (08:00 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 18 Apr 2024 11:00:52 +0000 (08:00 -0300)
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.

libstdc++-v3/src/c++20/tzdb.cc

index 890a4c53e2d442169329076794c3f36c8befb2dc..639d1c440ba16eb62ba5c835cdac9af3c5deea84 100644 (file)
@@ -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