Mach-O requires weak symbols to have a definition, so add a default
implementation of __gnu_cxx::zoneinfo_dir_override.
libstdc++-v3/ChangeLog:
* src/c++20/tzdb.cc [__APPLE__] (zoneinfo_dir_override): Add
definition.
# endif
#endif
+#ifndef _GLIBCXX_ZONEINFO_DIR
+# define _GLIBCXX_ZONEINFO_DIR "/usr/share/zoneinfo"
+#endif
+
namespace __gnu_cxx
{
#ifdef _AIX
const char* (*zoneinfo_dir_override)() = nullptr;
#else
[[gnu::weak]] const char* zoneinfo_dir_override();
+
+#ifdef __APPLE__
+ // Need a weak definition for Mach-O.
+ [[gnu::weak]] const char* zoneinfo_dir_override()
+ { return _GLIBCXX_ZONEINFO_DIR; }
+#endif
#endif
}
return info;
}
-#ifndef _GLIBCXX_ZONEINFO_DIR
-# define _GLIBCXX_ZONEINFO_DIR "/usr/share/zoneinfo"
-#endif
namespace
{
string