⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glibc-2.2.5-allow-gcc-3.4-weakextern.patch

📁 armlinux的交叉编译链,适合redhat9.0 嵌入式
💻 PATCH
字号:
------------Bad patch.  Seems to cause breakages like this:../include/libc-symbols.h:116: warning: `weak_alias' redefined../include/libc-symbols.h:105: warning: this is the location of the previous definition../include/libc-symbols.h:117: warning: `weak_extern' redefined../include/libc-symbols.h:110: warning: this is the location of the previous definition../include/libc-symbols.h:21: unterminated `#if' conditionalmake[2]: *** [/home/dank/wk/crosstool-0.28-rc31/build/alpha-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/build-glibc/csu/init-first.o] Error 1------------See http://sources.redhat.com/ml/libc-alpha/2003-01/msg00036.htmlfor the origin of the glibc-2.3.2 fix, andhttp://sources.redhat.com/ml/crossgcc/2004-07/msg00169.html for the sourceof this backport to glibc-2.2.5. Fixes gcc-3.4 optimizing out comparisons to weak external symbols in code like:  if (__pthread_mutex_init != NULL)    __pthread_mutex_init(...); that causes segfaults during libc init when not linked to libpthreaddiff -uNr glibc-2.2.5-orig/include/libc-symbols.h glibc-2.2.5/include/libc-symbols.h--- glibc-2.2.5-orig/include/libc-symbols.h	2001-08-03 16:02:52.000000000 -0700+++ glibc-2.2.5/include/libc-symbols.h	2004-07-27 22:54:50.000000000 -0700@@ -109,10 +109,7 @@ /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined).  */ #  define weak_extern(symbol) _weak_extern (symbol) #  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE-#   define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);-#  else-#   define _weak_extern(symbol)    asm (".weak " __SYMBOL_PREFIX #symbol);-#  endif+#  define _weak_extern(expr) _Pragma (#expr)  # else diff -uNr glibc-2.2.5-orig/resolv/res_libc.c glibc-2.2.5/resolv/res_libc.c--- glibc-2.2.5-orig/resolv/res_libc.c	2001-02-12 12:23:34.000000000 -0800+++ glibc-2.2.5/resolv/res_libc.c	2004-07-27 22:56:32.000000000 -0700@@ -84,7 +84,8 @@  #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2) # undef res_init-strong_alias (__res_init, __res_init_weak);+extern int __res_init_weak (void); weak_extern (__res_init_weak);+strong_alias (__res_init, __res_init_weak); compat_symbol (libc, __res_init_weak, res_init, GLIBC_2_0); #endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -