Message ID | 20240910212039.4166074-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] libstdc++: Only use std::ios_base_library_init() for ELF [PR116159] | expand |
diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream index 4f4fa6880d5..4a6dc584d38 100644 --- a/libstdc++-v3/include/std/iostream +++ b/libstdc++-v3/include/std/iostream @@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if !(_GLIBCXX_USE_INIT_PRIORITY_ATTRIBUTE \ && __has_attribute(__init_priority__)) static ios_base::Init __ioinit; -#elif defined(_GLIBCXX_SYMVER_GNU) +#elif defined(_GLIBCXX_SYMVER_GNU) && defined(__ELF__) __extension__ __asm (".globl _ZSt21ios_base_library_initv"); #endif diff --git a/libstdc++-v3/src/c++98/ios_init.cc b/libstdc++-v3/src/c++98/ios_init.cc index 1422e20d940..6e2e5014cf0 100644 --- a/libstdc++-v3/src/c++98/ios_init.cc +++ b/libstdc++-v3/src/c++98/ios_init.cc @@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __ret; } -#ifdef _GLIBCXX_SYMVER_GNU +#if defined(_GLIBCXX_SYMVER_GNU) && defined(__ELF__) #pragma GCC diagnostic ignored "-Wattribute-alias" void ios_base_library_init (void)