From 57426168ad2c7e8367786ed466c86f6aeb49b3c3 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 27 May 2017 00:01:49 -0700 Subject: Convert the rest of packages to new framework Signed-off-by: Alexey Neyman diff --git a/TODO b/TODO index b48e54d..fd91244 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,10 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag -- Alexey Neyman (@stilor) +[ ] updates + [ ] linux + [ ] mingw-w64 + [ ] newlib [ ] clean up GDB versions - no X.Y if X.Y.1 is present [ ] Check other packages, leave only the most recent on each branch [ ] arm_neon.h - offer as a companion "library" for the target diff --git a/config/cc.in b/config/cc.in index 81f168c..03bc8d7 100644 --- a/config/cc.in +++ b/config/cc.in @@ -135,4 +135,6 @@ config CC_LANG_OTHERS Eg. gcc-4.1+ has a toy programming language, treelang. As it is not useful in real life, it is not available in the selection above. +source "config/gen/cc.in.2" + endmenu diff --git a/config/cc/gcc.in b/config/cc/gcc.in index c0feaef..cdcda9d 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -15,412 +15,3 @@ ## help output, and lots of other features. source "config/versions/gcc.in" - -# Only enable gcc's support for plugins if binutils has it as well -# They are useful only when doing LTO, but it does no harm enabling -# them even without LTO. -config CC_GCC_ENABLE_PLUGINS - bool - depends on BINUTILS_PLUGINS - depends on ! STATIC_TOOLCHAIN - default y - -# If binutils installs gold, enable support for gold in gcc -config CC_GCC_GOLD - bool - depends on BINUTILS_GOLD_INSTALLED - default y - -config CC_GCC_HAS_LIBMPX - depends on GCC_5_or_later - bool - -config CC_LANG_JAVA_USE_ECJ - bool - default y - depends on CC_LANG_JAVA - -config CC_GCC_ENABLE_CXX_FLAGS - string - prompt "Flags to pass to --enable-cxx-flags" - default "" - help - Enter here the value of the gcc's ./configure option --enable-cxx-flags. - Leave empty if you don't know better. - - Note: just pass in the option _value_, that is only the part that goes - after the '=' sign. - -config CC_GCC_CORE_EXTRA_CONFIG_ARRAY - string - prompt "Core gcc extra config" - default "" - depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED - help - Extra flags to pass onto ./configure when configuring the core gcc. - - The core gcc is a stripped down, C-only compiler needed to build - the C library. Kinda bootstrap gcc, if you wish. - - You can enter multiple arguments here, and arguments can contain spaces - if they are properly quoted (or escaped, but prefer quotes). Eg.: - --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space - -config CC_GCC_EXTRA_CONFIG_ARRAY - string - prompt "gcc extra config" - default "" - help - Extra flags to pass onto ./configure when configuring gcc. - - You can enter multiple arguments here, and arguments can contain spaces - if they are properly quoted (or escaped, but prefer quotes). Eg.: - --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space - -config CC_GCC_MULTILIB_LIST - string - prompt "List of multilib variants" - depends on MULTILIB - help - Architecture-specific option of expanding or restricting the list of - the multilib variants to be built. Refer to GCC installation manual - for the format of this option for a particular architecture. - Leave empty to use the default list for this architecture. - -config STATIC_TOOLCHAIN - bool - select CC_GCC_STATIC_LIBSTDCXX - -config CC_GCC_STATIC_LIBSTDCXX - bool - prompt "Link libstdc++ statically into the gcc binary" - default y - depends on CONFIGURE_has_static_link || CANADIAN || CROSS_NATIVE - select WANTS_STATIC_LINK if CROSS || NATIVE - select WANTS_STATIC_LINK_CXX if CROSS || NATIVE - help - Newer gcc versions require some c++ libraries. So statically - linking libstdc++ increases the likeliness that the gcc binary will - run on machines other than the one which it was built on, without - having to worry about distributing the matching version of libstdc++ - along with it. - -config CC_GCC_SYSTEM_ZLIB - bool - prompt "Use system zlib" - help - Do not use bundled zlib, and use the zlib already available for - the host (eg. the system library). - - If zlib is built as a companion library, selecting this option - will use it. - - If you want to build a static toolchain, you will need to also - install the static version of zlib for your host. - - If unsure, say 'n'. - -config CC_GCC_CONFIG_TLS - tristate - prompt "Configure TLS (Thread Local Storage)" - default m - help - Specify that the target supports TLS (Thread Local Storage). Usually - configure can correctly determine if TLS is supported. In cases where - it guesses incorrectly, TLS can be explicitly enabled or disabled. - This can happen if the assembler supports TLS but the C library does - not, or if the assumptions made by the configure test are incorrect. - - Option | TLS use | Associated ./configure switch - ---------+--------------------+-------------------------------- - Y | forcibly used | --enable-tls - M | auto | (none, ./configure decides) - N | forcibly not used | --disable-tls - - If unsure, say 'M'. - -#----------------------------------------------------------------------------- -# Optimisation features - -comment "Optimisation features" - -# Defined in config/cc/gcc.in -# For graphite: gcc needs cloog and isl -# In >= gcc-5.x, cloog is no longer needed, but isl is. -# Prompt in config/cc/gcc.in.2 -config CC_GCC_USE_GRAPHITE - bool "Enable GRAPHITE loop optimisations" - default y - select CLOOG_NEEDED if !CC_GCC_5_or_later - select ISL_NEEDED - help - Enable the GRAPHITE loop optimsations. - - On some systems (eg. Cygwin), CLooG and ISL (required to enable - GRAPHITE) may not build properly (yet), so you'll have to say 'N' - here (or help debug the issues) - - TODO: Is this still true on Cygwin? - -# The way LTO works is a bit twisted. -# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements -# Basically: -# - if binutils has plugins: LTO is handled by ld/gold by loading -# the plugin when linking -# - if binutils does not have plugins: LTO is handled by collect2 -# In any case, LTO support does not depend on plugins, but takes -# advantage of it -config CC_GCC_USE_LTO - bool "Enable LTO" - default y - depends on ! STATIC_TOOLCHAIN - help - Enable the Link Time Optimisations. - -#----------------------------------------------------------------------------- -comment "Settings for libraries running on target" - -config CC_GCC_ENABLE_TARGET_OPTSPACE - bool - prompt "Optimize gcc libs for size" - default y - help - Pass --enable-target-optspace to crossgcc's configure. - - This will compile crossgcc's libs with -Os. - -config CC_GCC_LIBMUDFLAP - bool - prompt "Compile libmudflap" - help - libmudflap is a pointer-use checking tool, which can detect - various mis-usages of pointers in C and (to some extents) C++. - - You should say 'N' here, as libmduflap generates instrumented - code (thus it is a bit bigger and a bit slower) and requires - re-compilation and re-link, while it exists better run-time - alternatives (eg. DUMA, dmalloc...) that need neither re- - compilation nor re-link. - -config CC_GCC_LIBGOMP - bool - prompt "Compile libgomp" - depends on !THREADS_NONE - help - libgomp is "the GNU implementation of the OpenMP Application Programming - Interface (API) for multi-platform shared-memory parallel programming in - C/C++ and Fortran". See: - http://gcc.gnu.org/onlinedocs/libgomp/ - - GNU OpenMP support requires threading. - - The default is 'N'. Say 'Y' if you need it, and report success/failure. - -config CC_GCC_LIBSSP - bool - prompt "Compile libssp" - help - libssp is the run-time Stack-Smashing Protection library. - - The default is 'N'. Say 'Y' if you need it, and report success/failure. - -config CC_GCC_LIBQUADMATH - bool - prompt "Compile libquadmath" - help - libquadmath is a library which provides quad-precision mathematical - functions on targets supporting the __float128 datatype. See: - http://gcc.gnu.org/onlinedocs/libquadmath/ - - The default is 'N'. Say 'Y' if you need it, and report success/failure. - -config CC_GCC_LIBSANITIZER - bool - prompt "Compile libsanitizer" - depends on THREADS_NATIVE - depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h) - help - libsanitizer is a library which provides run-time sanitising of either - or both of: - - memory access patterns (out-of-bonds, use-after-free) - - racy data accesses (in multi-threaded programs) - - The default is 'N'. Say 'Y' if you need it, and report success/failure. - -config CC_GCC_LIBMPX - bool - default y - prompt "Compile libmpx" - depends on CC_GCC_HAS_LIBMPX - depends on ARCH_x86 - # MUSL does not define libc types that GCC requires. Mingw lacks certain headers. - depends on !LIBC_musl && ! LIBC_mingw - help - Enable GCC support for Intel Memory Protection Extensions (MPX). - -#----------------------------------------------------------------------------- - -comment "Misc. obscure options." - -config CC_CXA_ATEXIT - bool - prompt "Use __cxa_atexit" - default y - depends on ! BARE_METAL || LIBC_PROVIDES_CXA_ATEXIT - help - If you get the missing symbol "__cxa_atexit" when building C++ programs, - you might want to try disabling this option. - -config CC_GCC_DISABLE_PCH - bool - prompt "Do not build PCH" - help - Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain. - at the expense of speed when compiling C++ code. - - For some configurations (most notably canadian?), PCH are broken, and - need to be disabled. Please see: - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974 - -config CC_GCC_SJLJ_EXCEPTIONS - tristate - prompt "Use sjlj for exceptions" - depends on ! BARE_METAL - default m - help - 'sjlj' is short for setjmp/longjmp. - - On some architectures, stack unwinding during exception handling - works perfectly well without using sjlj, while on some others, - use of sjlj is required for proper stack unwinding. - - Option | sjlj use | Associated ./configure switch - ---------+--------------------+-------------------------------- - Y | forcibly used | --enable-sjlj-exceptions - M | auto | (none, ./configure decides) - N | forcibly not used | --disable-sjlj-exceptions - - It should be safe to say 'M' or 'N'. - - It can happen that ./configure is wrong in some cases. Known - case is for ARM big endian, where you should say 'N'. - -config CC_GCC_LDBL_128 - tristate - prompt "Enable 128-bit long doubles" - default m - help - Saying 'Y' will force gcc to use 128-bit wide long doubles - Saying 'N' will force gcc to use 64-bit wide long doubles - Saying 'M' will let gcc choose (default is 128-bit for - glibc >= 2.4, 64-bit otherwise) - - If in doubt, keep the default, ie. 'M'. - -config CC_GCC_BUILD_ID - bool - prompt "Enable build-id" - help - Tells GCC to pass --build-id option to the linker for all final - links (links performed without the -r or --relocatable option), - if the linker supports it. If you say 'y' here, but your linker - does not support --build-id option, a warning is issued and this - option is ignored. - - The default is off. - -choice CC_GCC_LNK_HASH_STYLE_CHOICE - bool - prompt "linker hash style" - depends on BINUTILS_HAS_HASH_STYLE - -config CC_GCC_LNK_HASH_STYLE_DEFAULT - bool - prompt "Default" - help - Do not specify any value, and use the default value (sysv). - -config CC_GCC_LNK_HASH_STYLE_SYSV - bool - prompt "sysv" - help - Force use of the SYSV hash style. - -config CC_GCC_LNK_HASH_STYLE_GNU - bool - prompt "gnu" - help - Force use of the GNU hash style. - -config CC_GCC_LNK_HASH_STYLE_BOTH - bool - prompt "both" - help - Force use of both hash styles. - -endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE - -config CC_GCC_LNK_HASH_STYLE - string - default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT - default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV - default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU - default "both" if CC_GCC_LNK_HASH_STYLE_BOTH - -choice CC_GCC_DEC_FLOATS_CHOICE - bool "Decimal floats" - default CC_GCC_DEC_FLOATS_AUTO - help - Choose what type of decimal floats to support. - - Note that using decimal floats requires a C library that provides - support for fenv (namely, the fenv.h header). This is the case - for (e)glibc, and uClibc on x86/32. For other C libraries, or - uClibc on other archs, this might not be the case, so you should - disable support for decimal floats. - - The default is to let ./configure decide. - -config CC_GCC_DEC_FLOAT_AUTO - bool "auto" - help - Let ./configure decide. If you say 'y' here, gcc will default to: - - 'bid' for x86 (32- and 64-bit) - - 'dpd' for powerpc - - 'no' for the other architectures - -config CC_GCC_DEC_FLOAT_BID - bool "bid" - help - Use the 'binary integer decimal' format for decimal floats. - -config CC_GCC_DEC_FLOAT_DPD - bool "dpd" - help - Use the 'densely packed decimal' for decimal floats. - -config CC_GCC_DEC_FLOATS_NO - bool "no" - help - Do not support decimal floats. The default. - -endchoice # CC_GCC_DEC_FLOATS_CHOICE - -config CC_GCC_DEC_FLOATS - string - default "" if CC_GCC_DEC_FLOATS_AUTO - default "bid" if CC_GCC_DEC_FLOATS_BID - default "dpd" if CC_GCC_DEC_FLOATS_DPD - default "no" if CC_GCC_DEC_FLOATS_NO - -#----------------------------------------------------------------------------- - -config CC_GCC_HAS_ARCH_OPTIONS - bool - -comment "archictecture-specific options" - depends on CC_GCC_HAS_ARCH_OPTIONS - -if ARCH_mips -source "config/cc/gcc.in.mips" -endif # ARCH_mips diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 new file mode 100644 index 0000000..e238076 --- /dev/null +++ b/config/cc/gcc.in.2 @@ -0,0 +1,408 @@ +# Only enable gcc's support for plugins if binutils has it as well +# They are useful only when doing LTO, but it does no harm enabling +# them even without LTO. +config CC_GCC_ENABLE_PLUGINS + bool + depends on BINUTILS_PLUGINS + depends on ! STATIC_TOOLCHAIN + default y + +# If binutils installs gold, enable support for gold in gcc +config CC_GCC_GOLD + bool + depends on BINUTILS_GOLD_INSTALLED + default y + +config CC_GCC_HAS_LIBMPX + depends on GCC_5_or_later + bool + +config CC_LANG_JAVA_USE_ECJ + bool + default y + depends on CC_LANG_JAVA + +config CC_GCC_ENABLE_CXX_FLAGS + string + prompt "Flags to pass to --enable-cxx-flags" + default "" + help + Enter here the value of the gcc's ./configure option --enable-cxx-flags. + Leave empty if you don't know better. + + Note: just pass in the option _value_, that is only the part that goes + after the '=' sign. + +config CC_GCC_CORE_EXTRA_CONFIG_ARRAY + string + prompt "Core gcc extra config" + default "" + depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED + help + Extra flags to pass onto ./configure when configuring the core gcc. + + The core gcc is a stripped down, C-only compiler needed to build + the C library. Kinda bootstrap gcc, if you wish. + + You can enter multiple arguments here, and arguments can contain spaces + if they are properly quoted (or escaped, but prefer quotes). Eg.: + --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space + +config CC_GCC_EXTRA_CONFIG_ARRAY + string + prompt "gcc extra config" + default "" + help + Extra flags to pass onto ./configure when configuring gcc. + + You can enter multiple arguments here, and arguments can contain spaces + if they are properly quoted (or escaped, but prefer quotes). Eg.: + --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space + +config CC_GCC_MULTILIB_LIST + string + prompt "List of multilib variants" + depends on MULTILIB + help + Architecture-specific option of expanding or restricting the list of + the multilib variants to be built. Refer to GCC installation manual + for the format of this option for a particular architecture. + Leave empty to use the default list for this architecture. + +config STATIC_TOOLCHAIN + bool + select CC_GCC_STATIC_LIBSTDCXX + +config CC_GCC_STATIC_LIBSTDCXX + bool + prompt "Link libstdc++ statically into the gcc binary" + default y + depends on CONFIGURE_has_static_link || CANADIAN || CROSS_NATIVE + select WANTS_STATIC_LINK if CROSS || NATIVE + select WANTS_STATIC_LINK_CXX if CROSS || NATIVE + help + Newer gcc versions require some c++ libraries. So statically + linking libstdc++ increases the likeliness that the gcc binary will + run on machines other than the one which it was built on, without + having to worry about distributing the matching version of libstdc++ + along with it. + +config CC_GCC_SYSTEM_ZLIB + bool + prompt "Use system zlib" + help + Do not use bundled zlib, and use the zlib already available for + the host (eg. the system library). + + If zlib is built as a companion library, selecting this option + will use it. + + If you want to build a static toolchain, you will need to also + install the static version of zlib for your host. + + If unsure, say 'n'. + +config CC_GCC_CONFIG_TLS + tristate + prompt "Configure TLS (Thread Local Storage)" + default m + help + Specify that the target supports TLS (Thread Local Storage). Usually + configure can correctly determine if TLS is supported. In cases where + it guesses incorrectly, TLS can be explicitly enabled or disabled. + This can happen if the assembler supports TLS but the C library does + not, or if the assumptions made by the configure test are incorrect. + + Option | TLS use | Associated ./configure switch + ---------+--------------------+-------------------------------- + Y | forcibly used | --enable-tls + M | auto | (none, ./configure decides) + N | forcibly not used | --disable-tls + + If unsure, say 'M'. + +#----------------------------------------------------------------------------- +# Optimisation features + +comment "Optimisation features" + +# Defined in config/cc/gcc.in +# For graphite: gcc needs cloog and isl +# In >= gcc-5.x, cloog is no longer needed, but isl is. +# Prompt in config/cc/gcc.in.2 +config CC_GCC_USE_GRAPHITE + bool "Enable GRAPHITE loop optimisations" + default y + select CLOOG_NEEDED if !CC_GCC_5_or_later + select ISL_NEEDED + help + Enable the GRAPHITE loop optimsations. + + On some systems (eg. Cygwin), CLooG and ISL (required to enable + GRAPHITE) may not build properly (yet), so you'll have to say 'N' + here (or help debug the issues) + + TODO: Is this still true on Cygwin? + +# The way LTO works is a bit twisted. +# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements +# Basically: +# - if binutils has plugins: LTO is handled by ld/gold by loading +# the plugin when linking +# - if binutils does not have plugins: LTO is handled by collect2 +# In any case, LTO support does not depend on plugins, but takes +# advantage of it +config CC_GCC_USE_LTO + bool "Enable LTO" + default y + depends on ! STATIC_TOOLCHAIN + help + Enable the Link Time Optimisations. + +#----------------------------------------------------------------------------- +comment "Settings for libraries running on target" + +config CC_GCC_ENABLE_TARGET_OPTSPACE + bool + prompt "Optimize gcc libs for size" + default y + help + Pass --enable-target-optspace to crossgcc's configure. + + This will compile crossgcc's libs with -Os. + +config CC_GCC_LIBMUDFLAP + bool + prompt "Compile libmudflap" + help + libmudflap is a pointer-use checking tool, which can detect + various mis-usages of pointers in C and (to some extents) C++. + + You should say 'N' here, as libmduflap generates instrumented + code (thus it is a bit bigger and a bit slower) and requires + re-compilation and re-link, while it exists better run-time + alternatives (eg. DUMA, dmalloc...) that need neither re- + compilation nor re-link. + +config CC_GCC_LIBGOMP + bool + prompt "Compile libgomp" + depends on !THREADS_NONE + help + libgomp is "the GNU implementation of the OpenMP Application Programming + Interface (API) for multi-platform shared-memory parallel programming in + C/C++ and Fortran". See: + http://gcc.gnu.org/onlinedocs/libgomp/ + + GNU OpenMP support requires threading. + + The default is 'N'. Say 'Y' if you need it, and report success/failure. + +config CC_GCC_LIBSSP + bool + prompt "Compile libssp" + help + libssp is the run-time Stack-Smashing Protection library. + + The default is 'N'. Say 'Y' if you need it, and report success/failure. + +config CC_GCC_LIBQUADMATH + bool + prompt "Compile libquadmath" + help + libquadmath is a library which provides quad-precision mathematical + functions on targets supporting the __float128 datatype. See: + http://gcc.gnu.org/onlinedocs/libquadmath/ + + The default is 'N'. Say 'Y' if you need it, and report success/failure. + +config CC_GCC_LIBSANITIZER + bool + prompt "Compile libsanitizer" + depends on THREADS_NATIVE + depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h) + help + libsanitizer is a library which provides run-time sanitising of either + or both of: + - memory access patterns (out-of-bonds, use-after-free) + - racy data accesses (in multi-threaded programs) + + The default is 'N'. Say 'Y' if you need it, and report success/failure. + +config CC_GCC_LIBMPX + bool + default y + prompt "Compile libmpx" + depends on CC_GCC_HAS_LIBMPX + depends on ARCH_x86 + # MUSL does not define libc types that GCC requires. Mingw lacks certain headers. + depends on !LIBC_musl && ! LIBC_mingw + help + Enable GCC support for Intel Memory Protection Extensions (MPX). + +#----------------------------------------------------------------------------- + +comment "Misc. obscure options." + +config CC_CXA_ATEXIT + bool + prompt "Use __cxa_atexit" + default y + depends on ! BARE_METAL || LIBC_PROVIDES_CXA_ATEXIT + help + If you get the missing symbol "__cxa_atexit" when building C++ programs, + you might want to try disabling this option. + +config CC_GCC_DISABLE_PCH + bool + prompt "Do not build PCH" + help + Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain. + at the expense of speed when compiling C++ code. + + For some configurations (most notably canadian?), PCH are broken, and + need to be disabled. Please see: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974 + +config CC_GCC_SJLJ_EXCEPTIONS + tristate + prompt "Use sjlj for exceptions" + depends on ! BARE_METAL + default m + help + 'sjlj' is short for setjmp/longjmp. + + On some architectures, stack unwinding during exception handling + works perfectly well without using sjlj, while on some others, + use of sjlj is required for proper stack unwinding. + + Option | sjlj use | Associated ./configure switch + ---------+--------------------+-------------------------------- + Y | forcibly used | --enable-sjlj-exceptions + M | auto | (none, ./configure decides) + N | forcibly not used | --disable-sjlj-exceptions + + It should be safe to say 'M' or 'N'. + + It can happen that ./configure is wrong in some cases. Known + case is for ARM big endian, where you should say 'N'. + +config CC_GCC_LDBL_128 + tristate + prompt "Enable 128-bit long doubles" + default m + help + Saying 'Y' will force gcc to use 128-bit wide long doubles + Saying 'N' will force gcc to use 64-bit wide long doubles + Saying 'M' will let gcc choose (default is 128-bit for + glibc >= 2.4, 64-bit otherwise) + + If in doubt, keep the default, ie. 'M'. + +config CC_GCC_BUILD_ID + bool + prompt "Enable build-id" + help + Tells GCC to pass --build-id option to the linker for all final + links (links performed without the -r or --relocatable option), + if the linker supports it. If you say 'y' here, but your linker + does not support --build-id option, a warning is issued and this + option is ignored. + + The default is off. + +choice CC_GCC_LNK_HASH_STYLE_CHOICE + bool + prompt "linker hash style" + depends on BINUTILS_HAS_HASH_STYLE + +config CC_GCC_LNK_HASH_STYLE_DEFAULT + bool + prompt "Default" + help + Do not specify any value, and use the default value (sysv). + +config CC_GCC_LNK_HASH_STYLE_SYSV + bool + prompt "sysv" + help + Force use of the SYSV hash style. + +config CC_GCC_LNK_HASH_STYLE_GNU + bool + prompt "gnu" + help + Force use of the GNU hash style. + +config CC_GCC_LNK_HASH_STYLE_BOTH + bool + prompt "both" + help + Force use of both hash styles. + +endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE + +config CC_GCC_LNK_HASH_STYLE + string + default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT + default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV + default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU + default "both" if CC_GCC_LNK_HASH_STYLE_BOTH + +choice CC_GCC_DEC_FLOATS_CHOICE + bool "Decimal floats" + default CC_GCC_DEC_FLOATS_AUTO + help + Choose what type of decimal floats to support. + + Note that using decimal floats requires a C library that provides + support for fenv (namely, the fenv.h header). This is the case + for (e)glibc, and uClibc on x86/32. For other C libraries, or + uClibc on other archs, this might not be the case, so you should + disable support for decimal floats. + + The default is to let ./configure decide. + +config CC_GCC_DEC_FLOAT_AUTO + bool "auto" + help + Let ./configure decide. If you say 'y' here, gcc will default to: + - 'bid' for x86 (32- and 64-bit) + - 'dpd' for powerpc + - 'no' for the other architectures + +config CC_GCC_DEC_FLOAT_BID + bool "bid" + help + Use the 'binary integer decimal' format for decimal floats. + +config CC_GCC_DEC_FLOAT_DPD + bool "dpd" + help + Use the 'densely packed decimal' for decimal floats. + +config CC_GCC_DEC_FLOATS_NO + bool "no" + help + Do not support decimal floats. The default. + +endchoice # CC_GCC_DEC_FLOATS_CHOICE + +config CC_GCC_DEC_FLOATS + string + default "" if CC_GCC_DEC_FLOATS_AUTO + default "bid" if CC_GCC_DEC_FLOATS_BID + default "dpd" if CC_GCC_DEC_FLOATS_DPD + default "no" if CC_GCC_DEC_FLOATS_NO + +#----------------------------------------------------------------------------- + +config CC_GCC_HAS_ARCH_OPTIONS + bool + +comment "archictecture-specific options" + depends on CC_GCC_HAS_ARCH_OPTIONS + +if ARCH_mips +source "config/cc/gcc.in.mips" +endif # ARCH_mips diff --git a/config/kernel.in b/config/kernel.in index c04f2cb..2ae7656 100644 --- a/config/kernel.in +++ b/config/kernel.in @@ -4,9 +4,11 @@ menu "Operating System" # Config option used throughout the config and code to determine wether # we have a kernel or not (there might be different bare metal stuff)... +# FIXME use CT_KERNEL_bare_metal instead config BARE_METAL bool +# FIXME use CT_KERNEL_windows instead config WINDOWS bool diff --git a/config/kernel/linux.in b/config/kernel/linux.in index dc0f5e5..e1edb48 100644 --- a/config/kernel/linux.in +++ b/config/kernel/linux.in @@ -5,290 +5,11 @@ ## ## help Build a toolchain targeting systems running Linux as a kernel. -config KERNEL_LINUX_CUSTOM - bool - prompt "custom tarball or directory" - help - The choosen linux version shall be not downloaded. Instead use - a custom location to get the source. - -if KERNEL_LINUX_CUSTOM - -config KERNEL_LINUX_CUSTOM_LOCATION - string - prompt "Path to custom source, tarball or directory" - help - Enter the path to the directory or tarball of your source for linux. - - If the path is a tarball, it should extract to: -/ - where the name is this component, linux, and the version is set - below in the custom version string. - -config KERNEL_LINUX_CUSTOM_VERSION - string - prompt "Custom Linux version" - help - Enter the version number for your custom linux. - -config KERNEL_VERSION - string - default KERNEL_LINUX_CUSTOM_VERSION - -endif # KERNEL_LINUX_CUSTOM - -if ! KERNEL_LINUX_CUSTOM - # GLIBC and kernel are special when it comes to obsoletion. Users # of crosstool-ng depend on the ability to build new toolchains matching # the kernel/libc versions of a particular target system, and LTS releases # are still using quite ancient versions. Please do not retire versions # (including versions in between) until the EOL dates indicated below. -choice - bool - prompt "Linux kernel version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config KERNEL_V_4_11 - bool - prompt "4.11.3" - -config KERNEL_V_4_10 - bool - prompt "4.10.17 (EOL)" - -config KERNEL_V_4_9 - bool - prompt "4.9.30" - -config KERNEL_V_4_8 - bool - prompt "4.8.17 (EOL)" - depends on OBSOLETE - -config KERNEL_V_4_7 - bool - prompt "4.7.10 (EOL)" - depends on OBSOLETE - -config KERNEL_V_4_6 - bool - prompt "4.6.7 (EOL)" - depends on OBSOLETE - -config KERNEL_V_4_5 - bool - prompt "4.5.7 (EOL)" - depends on OBSOLETE - -# EOL 04/2021 [Ubuntu16.04] -config KERNEL_V_4_4 - bool - prompt "4.4.70" - -config KERNEL_V_4_3 - bool - prompt "4.3.6 (EOL)" - depends on OBSOLETE - -config KERNEL_V_4_2 - bool - prompt "4.2.8 (EOL)" - depends on OBSOLETE - -config KERNEL_V_4_1 - bool - prompt "4.1.40" - -config KERNEL_V_4_0 - bool - prompt "4.0.9 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_19 - bool - prompt "3.19.8 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_18 - bool - prompt "3.18.55 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_17 - bool - prompt "3.17.8 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_16 - bool - prompt "3.16.43" - -config KERNEL_V_3_15 - bool - prompt "3.15.10 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_14 - bool - prompt "3.14.79 (EOL)" - depends on OBSOLETE - -# EOL 04/2019 [Ubuntu14.04] -config KERNEL_V_3_13 - bool - prompt "3.13.11 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_12 - bool - prompt "3.12.74" - -config KERNEL_V_3_11 - bool - prompt "3.11.10 (EOL)" - depends on OBSOLETE - -# EOL 06/2024 [CentOS7.x] -config KERNEL_V_3_10 - bool - prompt "3.10.105" - -config KERNEL_V_3_9 - bool - prompt "3.9.11 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_8 - bool - prompt "3.8.13 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_7 - bool - prompt "3.7.10 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_6 - bool - prompt "3.6.11 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_5 - bool - prompt "3.5.7 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_4 - bool - prompt "3.4.113" - -config KERNEL_V_3_3 - bool - prompt "3.3.8 (EOL)" - depends on OBSOLETE - -# EOL 04/2017 [Ubuntu12.04] -config KERNEL_V_3_2 - bool - prompt "3.2.88" - -config KERNEL_V_3_1 - bool - prompt "3.1.10 (EOL)" - depends on OBSOLETE - -config KERNEL_V_3_0 - bool - prompt "3.0.101 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_39 - bool - prompt "2.6.39.4 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_38 - bool - prompt "2.6.38.8 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_37 - bool - prompt "2.6.37.6 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_36 - bool - prompt "2.6.36.4 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_35 - bool - prompt "2.6.35.9 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_34 - bool - prompt "2.6.34.7 (EOL)" - depends on OBSOLETE - -config KERNEL_V_2_6_33 - bool - prompt "2.6.33.7 (EOL)" - depends on OBSOLETE - -# EOL 11/2020 [CentOS6.x] -config KERNEL_V_2_6_32 - bool - prompt "2.6.32.27 (EOL)" - depends on OBSOLETE - -endchoice - -config KERNEL_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "4.11.3" if KERNEL_V_4_11 - default "4.10.17" if KERNEL_V_4_10 - default "4.9.30" if KERNEL_V_4_9 - default "4.8.17" if KERNEL_V_4_8 - default "4.7.10" if KERNEL_V_4_7 - default "4.6.7" if KERNEL_V_4_6 - default "4.5.7" if KERNEL_V_4_5 - default "4.4.70" if KERNEL_V_4_4 - default "4.3.6" if KERNEL_V_4_3 - default "4.2.8" if KERNEL_V_4_2 - default "4.1.40" if KERNEL_V_4_1 - default "4.0.9" if KERNEL_V_4_0 - default "3.19.8" if KERNEL_V_3_19 - default "3.18.55" if KERNEL_V_3_18 - default "3.17.8" if KERNEL_V_3_17 - default "3.16.43" if KERNEL_V_3_16 - default "3.15.10" if KERNEL_V_3_15 - default "3.14.79" if KERNEL_V_3_14 - default "3.13.11" if KERNEL_V_3_13 - default "3.12.74" if KERNEL_V_3_12 - default "3.11.10" if KERNEL_V_3_11 - default "3.10.105" if KERNEL_V_3_10 - default "3.9.11" if KERNEL_V_3_9 - default "3.8.13" if KERNEL_V_3_8 - default "3.7.10" if KERNEL_V_3_7 - default "3.6.11" if KERNEL_V_3_6 - default "3.5.7" if KERNEL_V_3_5 - default "3.4.113" if KERNEL_V_3_4 - default "3.3.8" if KERNEL_V_3_3 - default "3.2.88" if KERNEL_V_3_2 - default "3.1.10" if KERNEL_V_3_1 - default "3.0.101" if KERNEL_V_3_0 - default "2.6.39.4" if KERNEL_V_2_6_39 - default "2.6.38.8" if KERNEL_V_2_6_38 - default "2.6.37.6" if KERNEL_V_2_6_37 - default "2.6.36.4" if KERNEL_V_2_6_36 - default "2.6.35.9" if KERNEL_V_2_6_35 - default "2.6.34.7" if KERNEL_V_2_6_34 - default "2.6.33.7" if KERNEL_V_2_6_33 - default "2.6.32.27" if KERNEL_V_2_6_32 +# Such pinned versions are indicated in version.desc files with a comment. -endif # ! KERNEL_LINUX_CUSTOM +source "config/versions/linux.in" diff --git a/config/libc/avr-libc.in b/config/libc/avr-libc.in index 2b8d891..6abbe01 100644 --- a/config/libc/avr-libc.in +++ b/config/libc/avr-libc.in @@ -9,66 +9,4 @@ ## help Atmel AVR 8-bit RISC microcontrollers. In addition, the library ## help provides the basic startup code needed by most applications. -config LIBC_AVR_LIBC_CUSTOM - bool - prompt "Custom avr-libc" - depends on EXPERIMENTAL - help - The choosen avr-libc version shall be not downloaded. Instead use - a custom location to get the source. - -if LIBC_AVR_LIBC_CUSTOM - -config LIBC_AVR_LIBC_CUSTOM_LOCATION - string - prompt "Full path to custom avr-libc source" - help - Enter the path to the directory or tarball of your source for avr-libc. - - If the path is a tarball, it should extract to: -/ - where the name is this component, avr-libc, and the version is set - below in the custom version string. - -config LIBC_AVR_LIBC_CUSTOM_VERSION - string - prompt "Custom AVR-Libc version" - help - Enter the version number for your custom avr-libc. - -config LIBC_VERSION - string - default LIBC_AVR_LIBC_CUSTOM_VERSION - -endif # LIBC_AVR_LIBC_CUSTOM - -if ! LIBC_AVR_LIBC_CUSTOM - -choice - bool - prompt "avr-libc version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config LIBC_AVR_LIBC_V_2_0_0 - bool - prompt "2.0.0" - -config LIBC_AVR_LIBC_V_1_8_1 - bool - prompt "1.8.1" - -config LIBC_AVR_LIBC_V_1_8_0 - bool - prompt "1.8.0" - -endchoice - -config LIBC_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "2.0.0" if LIBC_AVR_LIBC_V_2_0_0 - default "1.8.1" if LIBC_AVR_LIBC_V_1_8_1 - default "1.8.0" if LIBC_AVR_LIBC_V_1_8_0 - -endif # ! LIBC_AVR_LIBC_CUSTOM +source "config/versions/avr-libc.in" diff --git a/config/libc/bionic.in b/config/libc/bionic.in index 9e04130..ab51e6b 100644 --- a/config/libc/bionic.in +++ b/config/libc/bionic.in @@ -11,98 +11,17 @@ ## help This platform has no TLS (Thread Local Storage) support so that option must be ## help disabled in the Compiler options. +source "config/versions/bionic.in" + config THREADS default "posix" -config LIBC_BIONIC_CUSTOM - bool - prompt "Custom bionic" - help - The chosen bionic-libc version shall be not downloaded. Instead use - a custom location to get the source. - -if LIBC_BIONIC_CUSTOM - -config LIBC_BIONIC_CUSTOM_LOCATION - string - prompt "Full path to custom bionic source" - help - Enter the path to the directory or tarball of your source for bionic. - - If the path is a zip archive, it should extract to: -/ - where the name is android-ndk, and the version is set - below in the custom version string. - -config LIBC_BIONIC_CUSTOM_VERSION - string - prompt "Custom BIONIC version" - help - Enter the version number for your custom bionic. - -config LIBC_VERSION - string - default LIBC_BIONIC_CUSTOM_VERSION - -endif # LIBC_BIONIC_CUSTOM - -if ! LIBC_BIONIC_CUSTOM - -choice - bool - prompt "bionic version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config LIBC_BIONIC_V_15beta1 - bool - prompt "15beta1" - -config LIBC_BIONIC_V_14b - bool - prompt "14b" - -config LIBC_BIONIC_V_13b - bool - prompt "13b (OBSOLETE)" - depends on OBSOLETE - -config LIBC_BIONIC_V_12b - bool - prompt "12b (OBSOLETE)" - depends on OBSOLETE - -config LIBC_BIONIC_V_11c - bool - prompt "11c (OBSOLETE)" - depends on OBSOLETE - -config LIBC_BIONIC_V_10e - bool - prompt "10e (OBSOLETE)" - depends on OBSOLETE - -endchoice - -config LIBC_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "r15-beta1" if LIBC_BIONIC_V_15beta1 - default "r14b" if LIBC_BIONIC_V_14b - default "r13b" if LIBC_BIONIC_V_13b - default "r12b" if LIBC_BIONIC_V_12b - default "r11c" if LIBC_BIONIC_V_11c - default "r10e" if LIBC_BIONIC_V_10e - -endif # ! LIBC_BIONIC_CUSTOM - +# FIXME does API level depend on the bionic version? generate that, too? choice bool prompt "Android API level" help The minimum for 64 bit support is 21. -# Don't remove next line -# CT_INSERT_VERSION_BELOW config ANDROID_API_24 bool @@ -169,8 +88,6 @@ endchoice config ANDROID_API string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW default "24" if ANDROID_API_24 default "23" if ANDROID_API_23 default "22" if ANDROID_API_22 @@ -184,4 +101,3 @@ config ANDROID_API default "13" if ANDROID_API_13 default "12" if ANDROID_API_12 default "9" if ANDROID_API_9 - diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 9e4ff56..c0c633d 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -5,218 +5,50 @@ ## select LIBC_SUPPORT_THREADS_NATIVE ## select CC_CORE_PASSES_NEEDED ## select GETTEXT_NEEDED +## select BINUTILS_FORCE_LD_BFD_DEFAULT ## ## help The de-facto standard for Linux distributions. ## help Feature-rich, but large... Most useful for desktop-like systems. -config THREADS - default "nptl" - -config LIBC_GLIBC_CUSTOM - bool - prompt "Custom glibc" - depends on EXPERIMENTAL - select LIBC_CUSTOM - select LIBC_GLIBC_2_20_or_later - help - The choosen glibc version shall be not downloaded. Instead use - a custom location to get the source. - -if LIBC_GLIBC_CUSTOM - -config LIBC_GLIBC_CUSTOM_LOCATION - string - prompt "Full path to custom glibc source" - help - Enter the path to the directory or tarball of your source for glibc. - - If the path is a tarball, it should extract to: -/ - where the name is this component, glibc, and the version is set - below in the custom version string. - -config LIBC_GLIBC_CUSTOM_VERSION - string - prompt "Custom GLIBC version" - help - Enter the version number for your custom glibc. - -config LIBC_VERSION - string - default LIBC_GLIBC_CUSTOM_VERSION - -endif # LIBC_GLIBC_CUSTOM - -if ! LIBC_GLIBC_CUSTOM - -config CC_GLIBC_SHOW_LINARO - bool - prompt "Show Linaro versions" - help - Linaro is maintaining some advanced/more stable/experimental versions - of glibc, especially for the ARM architecture. - - Those versions have not been blessed by the glibc comunity (nor have they - been cursed either!), but they look to be pretty much stable, and even - more stable than the upstream versions. YMMV... - - If you do not know what this Linaro stuff is, then simply say 'n' here, - and rest in peace. OTOH, if you know what you are doing, you will be - able to use and enjoy :-) the Linaro versions by saying 'y' here. - - Linaro: http://www.linaro.org/ - # GLIBC and kernel are special when it comes to obsoletion. Users # of crosstool-ng depend on the ability to build new toolchains matching # the kernel/libc versions of a particular target system, and LTS releases # are still using quite ancient versions. Please do not retire versions -# (including versions in between) until the EOL dates indicated below. -choice - bool - prompt "glibc version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config LIBC_GLIBC_V_2_25 - bool - prompt "2.25" - select LIBC_GLIBC_2_23_or_later - -config LIBC_GLIBC_V_2_24 - bool - prompt "2.24" - select LIBC_GLIBC_2_23_or_later - -# EOL 04/2021 [Ubuntu16.04] -config LIBC_GLIBC_V_2_23 - bool - prompt "2.23" - select LIBC_GLIBC_2_23_or_later - -config LIBC_GLIBC_V_2_22 - bool - prompt "2.22 (OBSOLETE)" - select LIBC_GLIBC_2_20_or_later - depends on OBSOLETE - -config LIBC_GLIBC_V_2_21 - bool - prompt "2.21 (OBSOLETE)" - select LIBC_GLIBC_2_20_or_later - depends on OBSOLETE - -config LIBC_GLIBC_LINARO_V_2_20 - bool - prompt "Linaro 2.20-2014.11 (OBSOLETE)" - select LIBC_GLIBC_2_20_or_later - depends on CC_GLIBC_SHOW_LINARO - depends on OBSOLETE +# (including versions in between) until the EOL dates indicated in version.desc. +source "config/versions/glibc.in" -config LIBC_GLIBC_V_2_20 - bool - prompt "2.20 (OBSOLETE)" - select LIBC_GLIBC_2_20_or_later - depends on OBSOLETE - -# EOL 04/2019 [Ubuntu14.04] -config LIBC_GLIBC_V_2_19 - bool - prompt "2.19 (OBSOLETE)" - depends on OBSOLETE - select LIBC_GLIBC_2_17_or_later - -config LIBC_GLIBC_V_2_18 - bool - prompt "2.18 (OBSOLETE)" - depends on OBSOLETE - select LIBC_GLIBC_2_17_or_later - -# EOL 06/2024 [CentOS7.x] -config LIBC_GLIBC_V_2_17 - bool - prompt "2.17 (OBSOLETE)" - depends on OBSOLETE - select LIBC_GLIBC_2_17_or_later - -config LIBC_GLIBC_V_2_16_0 - bool - prompt "2.16.0 (OBSOLETE)" - depends on OBSOLETE - -# EOL 04/2017 [Ubuntu12.04] -config LIBC_GLIBC_V_2_15 - bool - prompt "2.15 (OBSOLETE)" - depends on OBSOLETE - -config LIBC_GLIBC_V_2_14_1 - bool - prompt "2.14.1 (OBSOLETE)" - depends on OBSOLETE - -config LIBC_GLIBC_V_2_14 - bool - prompt "2.14 (OBSOLETE)" - depends on OBSOLETE - -config LIBC_GLIBC_V_2_13 - bool - prompt "2.13 (OBSOLETE)" - depends on OBSOLETE - -# This version did not have glibc-ports addon released -config LIBC_GLIBC_V_2_12_2 - bool - prompt "2.12.2 (OBSOLETE)" - depends on OBSOLETE - depends on !LIBC_GLIBC_NEEDS_PORTS - -# EOL 11/2020 [CentOS6.x] -config LIBC_GLIBC_V_2_12_1 - bool - prompt "2.12.1 (OBSOLETE)" - depends on OBSOLETE - -endchoice - -endif # ! LIBC_GLIBC_CUSTOM - -# Checked by SPARC build: SPARCv8 is dropped in 2.23. -config LIBC_GLIBC_2_23_or_later - select LIBC_GLIBC_2_20_or_later - bool - -# DeMark 2.20 as no longer needs to set NPTL as an addon. -# It is no longer possible to build glibc without pthread! -config LIBC_GLIBC_2_20_or_later - bool - select LIBC_GLIBC_2_17_or_later - -# DeMark no more ports -config LIBC_GLIBC_2_17_or_later - bool - -if ! LIBC_GLIBC_CUSTOM +config THREADS + default "nptl" -config LIBC_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "2.25" if LIBC_GLIBC_V_2_25 - default "2.24" if LIBC_GLIBC_V_2_24 - default "2.23" if LIBC_GLIBC_V_2_23 - default "2.22" if LIBC_GLIBC_V_2_22 - default "2.21" if LIBC_GLIBC_V_2_21 - default "linaro-2.20-2014.11" if LIBC_GLIBC_LINARO_V_2_20 - default "2.20" if LIBC_GLIBC_V_2_20 - default "2.19" if LIBC_GLIBC_V_2_19 - default "2.18" if LIBC_GLIBC_V_2_18 - default "2.17" if LIBC_GLIBC_V_2_17 - default "2.16.0" if LIBC_GLIBC_V_2_16_0 - default "2.15" if LIBC_GLIBC_V_2_15 - default "2.14.1" if LIBC_GLIBC_V_2_14_1 - default "2.14" if LIBC_GLIBC_V_2_14 - default "2.13" if LIBC_GLIBC_V_2_13 - default "2.12.2" if LIBC_GLIBC_V_2_12_2 - default "2.12.1" if LIBC_GLIBC_V_2_12_1 +# SPARCv8 support retired in 2.23 +config GLIBC_NO_SPARC_V8 + def_bool y + depends on GLIBC_2_23_or_later + +# With 2.20, NPTL is in default glibc +config GLIBC_HAS_NPTL_ADDON + def_bool y + depends on !GLIBC_2_20_or_later + +# With 2.20, all architectures are in main tree +config GLIBC_HAS_PORTS_ADDON + def_bool y + depends on !GLIBC_2_20_or_later + +# With 2.17 and later, 'ports' addon is shipped in glibc tarball +config GLIBC_PORTS_EXTERNAL + def_bool y + depends on !GLIBC_2_17_or_later + +# Some architectures require the ports addon. List them one by one here: +# This list must be carefully in sync with the architectures names +# we can find in config/arch/* +config GLIBC_NEEDS_PORTS + def_bool y + depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc + +# Ports are no longer an add-on starting with 2.20 +config GLIBC_USE_PORTS + def_bool y + depends on GLIBC_NEEDS_PORTS && GLIBC_HAS_PORTS_ADDON -endif # ! LIBC_GLIBC_CUSTOM diff --git a/config/libc/glibc.in.2 b/config/libc/glibc.in.2 index 93b7b59..f1c224c 100644 --- a/config/libc/glibc.in.2 +++ b/config/libc/glibc.in.2 @@ -1,31 +1,7 @@ # This file contains the common configuration options # that apply to both glibc. -# Some architectures require the ports addon. List them one by one here: -# This list must be carefully in sync with the architectures names -# we can find in config/arch/* - -# Ports were integrated into the main tarball in 2.17 -config LIBC_GLIBC_PORTS_EXTERNAL - def_bool y - depends on !LIBC_GLIBC_2_17_or_later - -config LIBC_GLIBC_NEEDS_PORTS - def_bool y - depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc - -# Ports are no longer an add-on starting with 2.20 -config LIBC_GLIBC_USE_PORTS - def_bool y - depends on LIBC_GLIBC_NEEDS_PORTS && !LIBC_GLIBC_2_20_or_later - -# Force using the BFD linker during the toolchain build -config LIBC_glibc_family - bool - default y - select BINUTILS_FORCE_LD_BFD_DEFAULT - -config LIBC_GLIBC_EXTRA_CONFIG_ARRAY +config GLIBC_EXTRA_CONFIG_ARRAY string prompt "extra config" default "" @@ -36,7 +12,7 @@ config LIBC_GLIBC_EXTRA_CONFIG_ARRAY if they are properly quoted (or escaped, but prefer quotes). Eg.: --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space -config LIBC_GLIBC_CONFIGPARMS +config GLIBC_CONFIGPARMS string prompt "Extra config params (READ HELP)" default "" if ! ARCH_sh @@ -51,14 +27,14 @@ config LIBC_GLIBC_CONFIGPARMS Note: If you need to pass more than one value, separate them with '\n'. Eg.: var1=val1\nvar2=val2 -config LIBC_GLIBC_EXTRA_CFLAGS +config GLIBC_EXTRA_CFLAGS string prompt "extra target CFLAGS" default "" help Extra target CFLAGS to use when building. -config LIBC_ENABLE_FORTIFIED_BUILD +config GLIBC_ENABLE_FORTIFIED_BUILD bool prompt "Enable fortified build (EXPERIMENTAL)" depends on EXPERIMENTAL @@ -78,13 +54,13 @@ config LIBC_ENABLE_FORTIFIED_BUILD here. Otherwise, be still and say 'n' (the default). ;-) -config LIBC_DISABLE_VERSIONING +config GLIBC_DISABLE_VERSIONING bool prompt "Disable symbols versioning" help Do not include versioning information in the library objects. -config LIBC_OLDEST_ABI +config GLIBC_OLDEST_ABI string prompt "Oldest supported ABI" default "" @@ -96,7 +72,7 @@ config LIBC_OLDEST_ABI If this option is not set, (e)glibc will choose for you. -config LIBC_GLIBC_FORCE_UNWIND +config GLIBC_FORCE_UNWIND bool prompt "Force unwind support (READ HELP!)" default y @@ -112,7 +88,7 @@ config LIBC_GLIBC_FORCE_UNWIND of glibc on some architectures (seen on s390, s390x and x86_64). -config LIBC_ADDONS_LIST +config GLIBC_ADDONS_LIST string prompt "Extra addons" default "" @@ -128,7 +104,7 @@ config LIBC_ADDONS_LIST Eg.: libidn -config LIBC_LOCALES +config GLIBC_LOCALES bool prompt "Build and install locales" help @@ -149,12 +125,12 @@ endif # LIBC_glibc && LIBC_LOCALES if KERNEL_linux -choice LIBC_GLIBC_SUPPORTED_KERNEL +choice GLIBC_SUPPORTED_KERNEL bool prompt "Minimum supported kernel version" - default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS + default GLIBC_KERNEL_VERSION_AS_HEADERS -config LIBC_GLIBC_KERNEL_VERSION_NONE +config GLIBC_KERNEL_VERSION_NONE bool prompt "Let ./configure decide" help @@ -172,7 +148,7 @@ config LIBC_GLIBC_KERNEL_VERSION_NONE powerpc* Requires Linux 2.4.19 arm*-*-linux-*gnueabi Requires Linux 2.6.16 -config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS +config GLIBC_KERNEL_VERSION_AS_HEADERS bool prompt "Same as kernel headers (default)" help @@ -195,7 +171,7 @@ config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS chosen kernel headers version (CT_KERNEL_VERSION), you can choose "y" here. -config LIBC_GLIBC_KERNEL_VERSION_CHOSEN +config GLIBC_KERNEL_VERSION_CHOSEN bool prompt "Specific kernel version" help @@ -213,9 +189,9 @@ config LIBC_GLIBC_KERNEL_VERSION_CHOSEN Most people can leave this at the default value of "2.6.9". -if LIBC_GLIBC_KERNEL_VERSION_CHOSEN +if GLIBC_KERNEL_VERSION_CHOSEN -config LIBC_GLIBC_MIN_KERNEL_VERSION +config GLIBC_MIN_KERNEL_VERSION string prompt "Minimum kernel version to support" default "2.6.9" @@ -232,14 +208,14 @@ config LIBC_GLIBC_MIN_KERNEL_VERSION Note that no sanity check is performed by crosstool-NG to ensure that the value you enter here is appropriate for your target. -endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN +endif # GLIBC_KERNEL_VERSION_CHOSEN endchoice -config LIBC_GLIBC_MIN_KERNEL +config GLIBC_MIN_KERNEL string - default "" if LIBC_GLIBC_KERNEL_VERSION_NONE - default KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS - default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN + default "" if GLIBC_KERNEL_VERSION_NONE + default KERNEL_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS + default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN endif # KERNEL_linux diff --git a/config/libc/mingw-w64.in b/config/libc/mingw-w64.in new file mode 100644 index 0000000..769c976 --- /dev/null +++ b/config/libc/mingw-w64.in @@ -0,0 +1,39 @@ +# mingw options + +## depends on WINDOWS +## +## select LIBC_SUPPORT_THREADS_NATIVE +## select LIBC_SUPPORT_THREADS_POSIX +## select CC_CORE_PASS_2_NEEDED +## +## help The de-facto standard for Mingw distributions. + +source "config/versions/mingw-w64.in" + +config THREADS + default "win32" if THREADS_NATIVE + default "posix" if THREADS_POSIX + +config MINGW_SECURE_API + bool "Expose secure API prototypes" + default y + +config MINGW_DIRECTX + bool "Include DirectX development files" + +config MINGW_DDK + bool "Include DDK development files" + +config MINGW_TOOLS + bool "Include the companion tools" + default y + help + Build the companion tools with mingw such as widl, gendef, + and genpeimg. + +config MINGW_TOOL_LIST_ARRAY + string "List of mingw-w64 tools to build" + default "gendef genidl genlib genpeimg widl" + depends on MINGW_TOOLS + help + List of mingw-w64 tools to build. diff --git a/config/libc/mingw.in b/config/libc/mingw.in deleted file mode 100644 index 0ca1823..0000000 --- a/config/libc/mingw.in +++ /dev/null @@ -1,159 +0,0 @@ -# mingw options - -## depends on WINDOWS -## -## select LIBC_SUPPORT_THREADS_NATIVE -## select LIBC_SUPPORT_THREADS_POSIX -## select CC_CORE_PASS_2_NEEDED -## -## help The de-facto standard for Mingw distributions. - -config THREADS - default "win32" if THREADS_NATIVE - default "posix" if THREADS_POSIX - -choice - bool - prompt "Windows API version" - -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config WINAPI_V_5_0_2 - bool - prompt "5.0.2" - -config WINAPI_V_5_0_1 - bool - prompt "5.0.1 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_5_0_0 - bool - prompt "5.0.0 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_4_0_6 - bool - prompt "4.0.6" - -config WINAPI_V_4_0_5 - bool - prompt "4.0.5 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_4_0_4 - bool - prompt "4.0.4 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_4_0_2 - bool - prompt "4.0.2 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_4_0_1 - bool - prompt "4.0.1 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_4_0_0 - bool - prompt "4.0.0 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_3_3_0 - bool - prompt "3.3.0 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_3_2_0 - bool - prompt "3.2.0 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_3_1_0 - bool - prompt "3.1.0 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_3_0_0 - bool - prompt "3.0.0 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_2_0_9 - bool - prompt "2.0.9 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_2_0_8 - bool - prompt "2.0.8 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_2_0_7 - bool - prompt "2.0.7 (OBSOLETE)" - depends on OBSOLETE - -config WINAPI_V_select - bool - prompt "Other version" - -config WINAPI_V_DEVEL - bool - prompt "devel" - depends on EXPERIMENTAL - depends on CONFIGURE_has_git - -endchoice - -config WINAPI_VERSION - string - prompt "Windows API version" if WINAPI_V_select - default "devel" if WINAPI_V_DEVEL -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "5.0.2" if WINAPI_V_5_0_2 - default "5.0.1" if WINAPI_V_5_0_1 - default "5.0.0" if WINAPI_V_5_0_0 - default "4.0.6" if WINAPI_V_4_0_6 - default "4.0.5" if WINAPI_V_4_0_5 - default "4.0.4" if WINAPI_V_4_0_4 - default "4.0.2" if WINAPI_V_4_0_2 - default "4.0.1" if WINAPI_V_4_0_1 - default "4.0.0" if WINAPI_V_4_0_0 - default "3.3.0" if WINAPI_V_3_3_0 - default "3.2.0" if WINAPI_V_3_2_0 - default "3.1.0" if WINAPI_V_3_1_0 - default "3.0.0" if WINAPI_V_3_0_0 - default "2.0.9" if WINAPI_V_2_0_9 - default "2.0.8" if WINAPI_V_2_0_8 - default "2.0.7" if WINAPI_V_2_0_7 - help - Enter the version number of the Windows API files to use - -config MINGW_SECURE_API - bool "Expose secure API prototypes" - default y - -config MINGW_DIRECTX - bool "Include DirectX development files" - -config MINGW_DDK - bool "Include DDK development files" - -config MINGW_TOOLS - bool "Include the companion tools" - default y - help - Build the companion tools with mingw such as widl, gendef, - and genpeimg. - -config MINGW_TOOL_LIST_ARRAY - string "List of mingw-w64 tools to build" - default "gendef genidl genlib genpeimg widl" - depends on MINGW_TOOLS - help - List of mingw-w64 tools to build. diff --git a/config/libc/musl.in b/config/libc/musl.in index 5ea166f..24f522a 100644 --- a/config/libc/musl.in +++ b/config/libc/musl.in @@ -10,66 +10,8 @@ ## help devices. musl is lightweight, fast, simple, free, and strives to be ## help correct in the sense of standards-conformance and safety. +source "config/versions/musl.in" + +# FIXME why? it claims "native", why report "musl"? config THREADS default "musl" - -config LIBC_MUSL_CUSTOM - bool - prompt "Custom musl" - depends on EXPERIMENTAL - help - The choosen musl-libc version shall be not downloaded. Instead use - a custom location to get the source. - -if LIBC_MUSL_CUSTOM - -config LIBC_MUSL_CUSTOM_LOCATION - string - prompt "Full path to custom musl-libc source" - help - Enter the path to the directory or tarball of your source for musl. - - If the path is a tarball, it should extract to: -/ - where the name is this component, musl, and the version is set - below in the custom version string. - -config LIBC_MUSL_CUSTOM_VERSION - string - prompt "Custom MUSL version" - help - Enter the version number for your custom musl-libc. - -config LIBC_VERSION - string - default LIBC_MUSL_CUSTOM_VERSION - -endif # LIBC_MUSL_CUSTOM - -if ! LIBC_MUSL_CUSTOM - -choice - bool - prompt "musl version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config LIBC_MUSL_V_1_1_16 - bool - prompt "1.1.16" - depends on EXPERIMENTAL - -config LIBC_MUSL_V_1_1_15 - bool - prompt "1.1.15 (OBSOLETE)" - depends on EXPERIMENTAL && OBSOLETE - -endchoice - -config LIBC_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "1.1.16" if LIBC_MUSL_V_1_1_16 - default "1.1.15" if LIBC_MUSL_V_1_1_15 - -endif # ! LIBC_MUSL_CUSTOM diff --git a/config/libc/newlib.in b/config/libc/newlib.in index 68e8b62..5354fef 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -12,209 +12,12 @@ ## help is only available in source form. It can be compiled for a wide ## help array of processors, and will usually work on any architecture with ## help the addition of a few low-level routines. -# -config LIBC_NEWLIB_CUSTOM - bool - prompt "Custom newlib" - depends on EXPERIMENTAL - select LIBC_NEWLIB_2_5_or_later - help - The choosen newlib version shall be not downloaded. Instead use - a custom location to get the source. -if LIBC_NEWLIB_CUSTOM - -config LIBC_NEWLIB_CUSTOM_LOCATION - string - prompt "Full path to custom newlib source" - help - Enter the path to the directory or tarball of your source for newlib. - - If the path is a tarball, it should extract to: -/ - where the name is this component, newlib, and the version is set - below in the custom version string. - -config LIBC_NEWLIB_CUSTOM_VERSION - string - prompt "Custom NEWLIB version" - help - Enter the version number for your custom newlib. - -config LIBC_VERSION - string - default LIBC_NEWLIB_CUSTOM_VERSION - -endif # LIBC_NEWLIB_CUSTOM - -if ! LIBC_NEWLIB_CUSTOM - -config CC_NEWLIB_SHOW_LINARO - bool - prompt "Show Linaro versions" - help - Linaro is maintaining some advanced/more stable/experimental versions - of newlib, especially for the ARM architecture. - - Those versions have not been blessed by the newlib comunity (nor have they - been cursed either!), but they look to be pretty much stable, and even - more stable than the upstream versions. YMMV... - - If you do not know what this Linaro stuff is, then simply say 'n' here, - and rest in peace. OTOH, if you know what you are doing, you will be - able to use and enjoy :-) the Linaro versions by saying 'y' here. - - Linaro: http://www.linaro.org/ - -choice - bool - prompt "newlib version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW -config LIBC_NEWLIB_V_2_5_0 - bool - prompt "2.5.0.20170519" - select LIBC_NEWLIB_2_5 - -config LIBC_NEWLIB_V_2_4_0 - bool - prompt "2.4.0.20161025" - select LIBC_NEWLIB_2_4 - -config LIBC_NEWLIB_V_2_3_0 - bool - prompt "2.3.0.20160226" - select LIBC_NEWLIB_2_3 - -config LIBC_NEWLIB_LINARO_V_2_2_0 - bool - prompt "Linaro 2.2.0-2015.01" - depends on CC_NEWLIB_SHOW_LINARO - select LIBC_NEWLIB_2_2 - -config LIBC_NEWLIB_V_2_2_0 - bool - prompt "2.2.0.20151023" - select LIBC_NEWLIB_2_2 - -config LIBC_NEWLIB_LINARO_V_2_1_0 - bool - prompt "Linaro 2.1.0-2014.09" - depends on CC_NEWLIB_SHOW_LINARO - select LIBC_NEWLIB_2_1 - -config LIBC_NEWLIB_V_2_1_0 - bool - prompt "2.1.0" - select LIBC_NEWLIB_2_1 - -config LIBC_NEWLIB_V_2_0_0 - bool - prompt "2.0.0" - select LIBC_NEWLIB_2_0 - -config LIBC_NEWLIB_V_1_20_0 - bool - prompt "1.20.0" - -config LIBC_NEWLIB_V_1_19_0 - bool - prompt "1.19.0" - -config LIBC_NEWLIB_V_1_18_0 - bool - prompt "1.18.0" - -config LIBC_NEWLIB_V_1_17_0 - bool - prompt "1.17.0" - -endchoice - -endif # ! LIBC_NEWLIB_CUSTOM - -config LIBC_NEWLIB_2_5 - bool - select LIBC_NEWLIB_2_5_or_later - -config LIBC_NEWLIB_2_4 - bool - select LIBC_NEWLIB_2_4_or_later - -config LIBC_NEWLIB_2_3 - bool - select LIBC_NEWLIB_2_3_or_later - -config LIBC_NEWLIB_2_2 - bool - select LIBC_NEWLIB_2_2_or_later - -config LIBC_NEWLIB_2_1 - bool - select LIBC_NEWLIB_2_1_or_later - -config LIBC_NEWLIB_2_0 - bool - select LIBC_NEWLIB_2_0_or_later - -config LIBC_NEWLIB_2_5_or_later - bool - select LIBC_NEWLIB_2_4_or_later - -config LIBC_NEWLIB_2_4_or_later - bool - select LIBC_NEWLIB_2_3_or_later - -config LIBC_NEWLIB_2_3_or_later - bool - select LIBC_NEWLIB_2_2_or_later - -config LIBC_NEWLIB_2_2_or_later - bool - select LIBC_NEWLIB_2_1_or_later - -config LIBC_NEWLIB_2_1_or_later - bool - select LIBC_NEWLIB_2_0_or_later +source "config/versions/newlib.in" # maybe older versions of newlib will support it too, but this # needs to be checked -config LIBC_NEWLIB_2_0_or_later - bool +config NEWLIB_CXA_ATEXIT + def_bool y + depends on NEWLIB_2_0_or_later select LIBC_PROVIDES_CXA_ATEXIT - -if ! LIBC_NEWLIB_CUSTOM -config LIBC_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "2.5.0.20170519" if LIBC_NEWLIB_V_2_5_0 - default "2.4.0.20161025" if LIBC_NEWLIB_V_2_4_0 - default "2.3.0.20160226" if LIBC_NEWLIB_V_2_3_0 - default "linaro-2.2.0-2015.01" if LIBC_NEWLIB_LINARO_V_2_2_0 - default "2.2.0.20151023" if LIBC_NEWLIB_V_2_2_0 - default "linaro-2.1.0-2014.09" if LIBC_NEWLIB_LINARO_V_2_1_0 - default "2.1.0" if LIBC_NEWLIB_V_2_1_0 - default "2.0.0" if LIBC_NEWLIB_V_2_0_0 - default "1.20.0" if LIBC_NEWLIB_V_1_20_0 - default "1.19.0" if LIBC_NEWLIB_V_1_19_0 - default "1.18.0" if LIBC_NEWLIB_V_1_18_0 - default "1.17.0" if LIBC_NEWLIB_V_1_17_0 - help - Enter the tag you want to use. - Leave empty to use the 'head' of the repository. - -endif # ! LIBC_NEWLIB_CUSTOM - -config LIBC_NEWLIB_TARGET_CFLAGS - string - prompt "Target CFLAGS for newlib" - default "" - help - Used to add specific options when compiling the target libraries - (eg. -ffunction-sections -fdata-sections), which can't be defined - in global TARGET_CFLAGS, because they shall be not used for the - gcc target libraries. - Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used - to compile the libraries. - - Leave blank if you don't know better. diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2 index 96bd22b..f73128c 100644 --- a/config/libc/newlib.in.2 +++ b/config/libc/newlib.in.2 @@ -1,5 +1,19 @@ # newlib second-part options +config LIBC_NEWLIB_TARGET_CFLAGS + string + prompt "Target CFLAGS for newlib" + default "" + help + Used to add specific options when compiling the target libraries + (eg. -ffunction-sections -fdata-sections), which can't be defined + in global TARGET_CFLAGS, because they shall be not used for the + gcc target libraries. + Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used + to compile the libraries. + + Leave blank if you don't know better. + config LIBC_NEWLIB_IO_C99FMT bool prompt "Enable IOs on C99 formats" diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index a85cf21..8f91aa0 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -4,6 +4,7 @@ ## ## select LIBC_SUPPORT_THREADS_LT ## select LIBC_SUPPORT_THREADS_NONE +## select LIBC_SUPPORT_THREADS_NATIVE if UCLIBC_0_9_33_2_or_later ## select CC_CORE_PASSES_NEEDED ## ## help The de-facto standard for embeded linux systems. @@ -11,6 +12,8 @@ ## help Highly configurable, thus as feature-rich as you ## help need, without compromising for size. +source "config/versions/uClibc-ng.in" + config THREADS default "nptl" if THREADS_NATIVE default "linuxthreads" if THREADS_LT @@ -20,141 +23,18 @@ comment "'softfp' ABI and uClibc is not entirely tested in crosstool-NG" comment "You may experience issues, although it should work just fine" endif # ARCH_FLOAT_SOFTFP -config LIBC_UCLIBC_CUSTOM - bool - prompt "Custom uClibc" - depends on EXPERIMENTAL - help - The choosen uclibc version shall be not downloaded. Instead use - a custom location to get the source. - -if LIBC_UCLIBC_CUSTOM - -choice - bool - prompt "uClibc Version Name" - -config LIBC_UCLIBC_CUSTOM_UCLIBC - bool "uClibc (OBSOLETE)" - depends on OBSOLETE - select LIBC_UCLIBC_0_9_33_2_or_later - -config LIBC_UCLIBC_CUSTOM_UCLIBC_NG - bool "uClibc-ng (1.0.15 or later)" - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_CUSTOM_UCLIBC_NG_OLD - bool "uClibc-ng (older than 1.0.15)" - select LIBC_UCLIBC_NG_1_0_0_or_later - -endchoice - -config LIBC_UCLIBC_CUSTOM_LOCATION - string - prompt "Full path to custom uClibc source" - help - Enter the path to the directory or tarball of your source for uClibc. - - If the path is a tarball, it should extract to: -/ - where the name is this component will be set by the uClibc Version Name - option from above, and the version is set below in the custom version - string. - -config LIBC_UCLIBC_CUSTOM_VERSION - string - prompt "Custom uClibc Version" - help - Enter the version number for your custom uClibc. - Version 1.0.18 is only enabled in EXPERIMENTAL builds due to issues - with static libraries. - -config LIBC_VERSION - string - default LIBC_UCLIBC_CUSTOM_VERSION - -endif # LIBC_UCLIBC_CUSTOM - -if ! LIBC_UCLIBC_CUSTOM - -choice - bool - prompt "uClibc version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config LIBC_UCLIBC_NG_V_1_0_25 - bool - prompt "1.0.25" - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_NG_V_1_0_24 - bool - prompt "1.0.24" - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_NG_V_1_0_23 - bool - prompt "1.0.23" - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_NG_V_1_0_22 - bool - prompt "1.0.22" - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_NG_V_1_0_21 - bool - prompt "1.0.21 (OBSOLETE)" - depends on OBSOLETE - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_NG_V_1_0_20 - bool - prompt "1.0.20 (OBSOLETE)" - depends on OBSOLETE - select LIBC_UCLIBC_NG_1_0_15_or_later - -config LIBC_UCLIBC_V_0_9_33_2 - bool - prompt "0.9.33.2 (OBSOLETE)" - depends on OBSOLETE - select LIBC_UCLIBC_0_9_33_2_or_later - -endchoice - -config LIBC_VERSION - string -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - default "1.0.25" if LIBC_UCLIBC_NG_V_1_0_25 - default "1.0.24" if LIBC_UCLIBC_NG_V_1_0_24 - default "1.0.23" if LIBC_UCLIBC_NG_V_1_0_23 - default "1.0.22" if LIBC_UCLIBC_NG_V_1_0_22 - default "1.0.21" if LIBC_UCLIBC_NG_V_1_0_21 - default "1.0.20" if LIBC_UCLIBC_NG_V_1_0_20 - default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 - -endif # ! LIBC_UCLIBC_CUSTOM - -config LIBC_UCLIBC_NG_1_0_15_or_later - bool - select LIBC_UCLIBC_NG_1_0_0_or_later - -config LIBC_UCLIBC_NG_1_0_0_or_later - bool - select LIBC_UCLIBC_NG - select LIBC_UCLIBC_0_9_33_2_or_later - -config LIBC_UCLIBC_0_9_33_2_or_later - bool - select LIBC_SUPPORT_THREADS_NATIVE - select LIBC_UCLIBC_PARALLEL - config LIBC_UCLIBC_PARALLEL - bool + def_bool y + depends on UCLIBC_0_9_33_2_or_later config LIBC_UCLIBC_NG - bool + def_bool y + depends on UCLIBC_1_0_0_or_later + +# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads +config UCLIBC_MERGED_LINUXTHREADS + def_bool y + depends on UCLIBC_1_0_15_or_later choice bool diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2 index 1b34855..7bf8f2a 100644 --- a/config/libc/uClibc.in.2 +++ b/config/libc/uClibc.in.2 @@ -1,6 +1,6 @@ # uClibc second-part option -if THREADS_LT && !LIBC_UCLIBC_NG_1_0_15_or_later +if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS choice bool @@ -30,12 +30,11 @@ endchoice endif # THREADS_LT -# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads config LIBC_UCLIBC_LNXTHRD string default "" if THREADS_NONE default "" if THREADS_NATIVE - default "" if LIBC_UCLIBC_NG_1_0_15_or_later + default "" if UCLIBC_MERGED_LINUXTHREADS default "old" if LIBC_UCLIBC_LNXTHRD_OLD default "new" if LIBC_UCLIBC_LNXTHRD_NEW diff --git a/maintainer/gen-versions.sh b/maintainer/gen-versions.sh index 726251f..99e9791 100755 --- a/maintainer/gen-versions.sh +++ b/maintainer/gen-versions.sh @@ -465,10 +465,6 @@ enter_version() local version="${1}" local tmp milestone - # Set defaults - info[obsolete]= - info[experimental]= - eval `read_version_desc ${info[fork]} ${version}` info[ver]=${version} info[kcfg]=`kconfigize ${version}` diff --git a/packages/avr-libc/1.8.0/version.desc b/packages/avr-libc/1.8.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/avr-libc/1.8.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/avr-libc/1.8.1/version.desc b/packages/avr-libc/1.8.1/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/avr-libc/2.0.0/version.desc b/packages/avr-libc/2.0.0/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/avr-libc/package.desc b/packages/avr-libc/package.desc new file mode 100644 index 0000000..fa9571e --- /dev/null +++ b/packages/avr-libc/package.desc @@ -0,0 +1 @@ +repository="svn svn://svn.savannah.nongnu.org/avr-libc/trunk/avr-libc" diff --git a/packages/bionic/10e/version.desc b/packages/bionic/10e/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/bionic/10e/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/bionic/11c/version.desc b/packages/bionic/11c/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/bionic/11c/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/bionic/12b/version.desc b/packages/bionic/12b/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/bionic/12b/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/bionic/13b/version.desc b/packages/bionic/13b/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/bionic/13b/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/bionic/14b/version.desc b/packages/bionic/14b/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/bionic/15-beta2/version.desc b/packages/bionic/15-beta2/version.desc new file mode 100644 index 0000000..03502fc --- /dev/null +++ b/packages/bionic/15-beta2/version.desc @@ -0,0 +1 @@ +experimental="yes" diff --git a/packages/bionic/package.desc b/packages/bionic/package.desc new file mode 100644 index 0000000..fe2c772 --- /dev/null +++ b/packages/bionic/package.desc @@ -0,0 +1 @@ +# We don't support building bionic (yet) so no official repository diff --git a/packages/glibc-linaro/2.20-2014.11/100-sparc-nptl.patch b/packages/glibc-linaro/2.20-2014.11/100-sparc-nptl.patch new file mode 100644 index 0000000..21f0337 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/100-sparc-nptl.patch @@ -0,0 +1,14 @@ +diff --git a/sysdeps/sparc/sparc32/sem_trywait.c b/sysdeps/sparc/sparc32/sem_trywait.c +index 7d0fc55..ad9b4ad 100644 +--- a/sysdeps/sparc/sparc32/sem_trywait.c ++++ b/sysdeps/sparc/sparc32/sem_trywait.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include + + + diff --git a/packages/glibc-linaro/2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc-linaro/2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc-linaro/2.20-2014.11/102-fix-signed-shift-overlow.patch b/packages/glibc-linaro/2.20-2014.11/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc-linaro/2.20-2014.11/103-dl-openat64-variadic.patch b/packages/glibc-linaro/2.20-2014.11/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc-linaro/2.20-2014.11/104-unused-variables.patch b/packages/glibc-linaro/2.20-2014.11/104-unused-variables.patch new file mode 100644 index 0000000..889c9bb --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/104-unused-variables.patch @@ -0,0 +1,178 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double +diff --git a/timezone/private.h b/timezone/private.h +index 4e8f4ae..ed19e06 100644 +--- a/timezone/private.h ++++ b/timezone/private.h +@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); + #define TYPE_SIGNED(type) (((type) -1) < 0) + #endif /* !defined TYPE_SIGNED */ + +-/* The minimum and maximum finite time values. */ +-static time_t const time_t_min = +- (TYPE_SIGNED(time_t) +- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) +- : 0); +-static time_t const time_t_max = +- (TYPE_SIGNED(time_t) +- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) +- : -1); +- + #ifndef INT_STRLEN_MAXIMUM + /* + ** 302 / 1000 is log10(2.0) rounded up. diff --git a/packages/glibc-linaro/2.20-2014.11/105-misleading-indentation.patch b/packages/glibc-linaro/2.20-2014.11/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc-linaro/2.20-2014.11/106-dl-open-array-bounds.patch b/packages/glibc-linaro/2.20-2014.11/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..08a9076 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/106-dl-open-array-bounds.patch @@ -0,0 +1,36 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -211,7 +211,7 @@ dl_open_worker (void *a) + struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); + + if (l) +- call_map = l; ++ call_map = l; + + if (args->nsid == __LM_ID_CALLER) + args->nsid = call_map->l_ns; +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc-linaro/2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc-linaro/2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc-linaro/2.20-2014.11/920-fix-rpc_parse-format.patch b/packages/glibc-linaro/2.20-2014.11/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc-linaro/2.20-2014.11/930-explicit-boolean.patch b/packages/glibc-linaro/2.20-2014.11/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc-linaro/2.20-2014.11/940-nis-bogus-conditional.patch b/packages/glibc-linaro/2.20-2014.11/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc-linaro/2.20-2014.11/version.desc b/packages/glibc-linaro/2.20-2014.11/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc-linaro/2.20-2014.11/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc-linaro/package.desc b/packages/glibc-linaro/package.desc new file mode 100644 index 0000000..c1f1a95 --- /dev/null +++ b/packages/glibc-linaro/package.desc @@ -0,0 +1,4 @@ +master="glibc" +origin="Linaro" +repository="git https://git.linaro.org/toolchain/glibc.git" +experimental="yes" diff --git a/packages/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.12.1/102-fix-signed-shift-overlow.patch b/packages/glibc/2.12.1/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.12.1/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.12.1/104-unused-variables.patch b/packages/glibc/2.12.1/104-unused-variables.patch new file mode 100644 index 0000000..e063675 --- /dev/null +++ b/packages/glibc/2.12.1/104-unused-variables.patch @@ -0,0 +1,165 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-#ifdef __STDC__ +-static const float zero = 0.0; +-#else +-static float zero = 0.0; +-#endif +- + #ifdef __STDC__ + float __ieee754_log10f(float x) + #else +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include "math.h" + #include "math_private.h" + +-#ifdef __STDC__ +-static const float one=1.0; +-#else +-static float one=1.0; +-#endif +- + #ifdef __STDC__ + float __cosf(float x) + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + static long double + #endif + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.12.1/105-misleading-indentation.patch b/packages/glibc/2.12.1/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.12.1/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.12.1/106-dl-open-array-bounds.patch b/packages/glibc/2.12.1/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..bdb5c19 --- /dev/null +++ b/packages/glibc/2.12.1/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && ((nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..530d4ff --- /dev/null +++ b/packages/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,44 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff -urpN glibc-2.12.2.orig/configure glibc-2.12.2/configure +--- glibc-2.12.2.orig/configure 2010-12-13 02:47:26.000000000 -0800 ++++ glibc-2.12.2/configure 2017-03-08 21:18:07.000000000 -0800 +@@ -6710,7 +6710,7 @@ EOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff -urpN glibc-2.12.2.orig/configure.in glibc-2.12.2/configure.in +--- glibc-2.12.2.orig/configure.in 2010-12-13 02:47:26.000000000 -0800 ++++ glibc-2.12.2/configure.in 2017-03-08 21:18:17.000000000 -0800 +@@ -1671,7 +1671,7 @@ dnl cross-platform since the gcc used ca + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no diff --git a/packages/glibc/2.12.1/300-macos-cross-rpcgen.patch b/packages/glibc/2.12.1/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.12.1/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.12.1/900-march-i686.patch b/packages/glibc/2.12.1/900-march-i686.patch new file mode 100644 index 0000000..7f5b1ce --- /dev/null +++ b/packages/glibc/2.12.1/900-march-i686.patch @@ -0,0 +1,34 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + +diff -urN glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c +--- glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100 +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff -urN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100 +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h diff --git a/packages/glibc/2.12.1/910-typedef-caddr.patch b/packages/glibc/2.12.1/910-typedef-caddr.patch new file mode 100644 index 0000000..e29e810 --- /dev/null +++ b/packages/glibc/2.12.1/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h +--- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h +--- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/packages/glibc/2.12.1/920-fix-rpc_parse-format.patch b/packages/glibc/2.12.1/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.12.1/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.12.1/920-make-382.patch b/packages/glibc/2.12.1/920-make-382.patch new file mode 100644 index 0000000..28be2fe --- /dev/null +++ b/packages/glibc/2.12.1/920-make-382.patch @@ -0,0 +1,15 @@ +http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=blob_plain;f=source/base/glibc/make-3.82-fix.patch;hb=8217c32ecc2e14962847ba3d8a272eb64a3dba4f + +--- glibc-2.10.1.OLD/manual/Makefile ++++ glibc-2.10.1.NEW/manual/Makefile +@@ -232,7 +232,9 @@ + .PHONY: stubs + stubs: $(objpfx)stubs + endif +-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%: ++$(objpfx)stubs ../po/manual.pot: ++ touch $@ ++$(objpfx)stamp%: + $(make-target-directory) + touch $@ + diff --git a/packages/glibc/2.12.1/940-nis-bogus-conditional.patch b/packages/glibc/2.12.1/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.12.1/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.12.1/999-new-tools.patch b/packages/glibc/2.12.1/999-new-tools.patch new file mode 100644 index 0000000..d600b58 --- /dev/null +++ b/packages/glibc/2.12.1/999-new-tools.patch @@ -0,0 +1,69 @@ +diff -urpN glibc-2.12.1.orig/configure glibc-2.12.1/configure +--- glibc-2.12.1.orig/configure 2010-07-27 04:34:39.000000000 -0700 ++++ glibc-2.12.1/configure 2017-02-08 00:37:58.117495908 -0800 +@@ -5079,7 +5079,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.4* | 4.[0-9]* ) ++ 3.4* | [4-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5142,7 +5142,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5269,7 +5269,7 @@ $as_echo_n "checking version of $MAKEINF + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.*) ++ [4-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5329,7 +5329,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:$LINENO: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.12.1.orig/configure.in glibc-2.12.1/configure.in +--- glibc-2.12.1.orig/configure.in 2010-07-27 04:34:39.000000000 -0700 ++++ glibc-2.12.1/configure.in 2017-02-08 00:28:47.131374866 -0800 +@@ -960,11 +960,11 @@ fi + # These programs are version sensitive. + AC_CHECK_TOOL_PREFIX + AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, +- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], ++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], +@@ -972,10 +972,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg + MSGFMT=: aux_missing="$aux_missing msgfmt") + AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], +- [4.*], ++ [[4-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") + AC_CHECK_PROG_VER(SED, sed, --version, +- [GNU sed version \([0-9]*\.[0-9.]*\)], ++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") + diff --git a/packages/glibc/2.12.1/version.desc b/packages/glibc/2.12.1/version.desc new file mode 100644 index 0000000..fb988b5 --- /dev/null +++ b/packages/glibc/2.12.1/version.desc @@ -0,0 +1 @@ +# Not obsolete (CentOS 6, EOL 11/2020) diff --git a/packages/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..530d4ff --- /dev/null +++ b/packages/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,44 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff -urpN glibc-2.12.2.orig/configure glibc-2.12.2/configure +--- glibc-2.12.2.orig/configure 2010-12-13 02:47:26.000000000 -0800 ++++ glibc-2.12.2/configure 2017-03-08 21:18:07.000000000 -0800 +@@ -6710,7 +6710,7 @@ EOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff -urpN glibc-2.12.2.orig/configure.in glibc-2.12.2/configure.in +--- glibc-2.12.2.orig/configure.in 2010-12-13 02:47:26.000000000 -0800 ++++ glibc-2.12.2/configure.in 2017-03-08 21:18:17.000000000 -0800 +@@ -1671,7 +1671,7 @@ dnl cross-platform since the gcc used ca + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no diff --git a/packages/glibc/2.12.2/300-macos-cross-rpcgen.patch b/packages/glibc/2.12.2/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.12.2/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.12.2/900-march-i686.patch b/packages/glibc/2.12.2/900-march-i686.patch new file mode 100644 index 0000000..6030de9 --- /dev/null +++ b/packages/glibc/2.12.2/900-march-i686.patch @@ -0,0 +1,34 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + +diff -urN glibc-2.12.2.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.2/nptl/sysdeps/pthread/pt-initfini.c +--- glibc-2.12.2.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.12.2/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100 +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff -urN glibc-2.12.2.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.2/sysdeps/unix/sysv/linux/i386/sysdep.h +--- glibc-2.12.2.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.12.2/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100 +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h diff --git a/packages/glibc/2.12.2/910-typedef-caddr.patch b/packages/glibc/2.12.2/910-typedef-caddr.patch new file mode 100644 index 0000000..4bc75cb --- /dev/null +++ b/packages/glibc/2.12.2/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.12.2-orig/posix/sys/types.h glibc-2.12.2/posix/sys/types.h +--- glibc-2.12.2-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.2/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.12.2-orig/sunrpc/rpc/types.h glibc-2.12.2/sunrpc/rpc/types.h +--- glibc-2.12.2-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.2/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/packages/glibc/2.12.2/920-fix-rpc_parse-format.patch b/packages/glibc/2.12.2/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.12.2/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.12.2/940-nis-bogus-conditional.patch b/packages/glibc/2.12.2/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.12.2/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.12.2/999-new-tools.patch b/packages/glibc/2.12.2/999-new-tools.patch new file mode 100644 index 0000000..e2f7b1d --- /dev/null +++ b/packages/glibc/2.12.2/999-new-tools.patch @@ -0,0 +1,69 @@ +diff -urpN glibc-2.12.2.orig/configure glibc-2.12.2/configure +--- glibc-2.12.2.orig/configure 2010-12-13 02:47:26.000000000 -0800 ++++ glibc-2.12.2/configure 2017-02-08 00:38:10.249617723 -0800 +@@ -5189,7 +5189,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.4* | 4.[0-9]* ) ++ 3.4* | [4-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5252,7 +5252,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5379,7 +5379,7 @@ $as_echo_n "checking version of $MAKEINF + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.*) ++ [4-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5439,7 +5439,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:$LINENO: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.12.2.orig/configure.in glibc-2.12.2/configure.in +--- glibc-2.12.2.orig/configure.in 2010-12-13 02:47:26.000000000 -0800 ++++ glibc-2.12.2/configure.in 2017-02-08 00:29:52.484183611 -0800 +@@ -1026,11 +1026,11 @@ fi + # These programs are version sensitive. + AC_CHECK_TOOL_PREFIX + AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, +- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], ++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], +@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg + MSGFMT=: aux_missing="$aux_missing msgfmt") + AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], +- [4.*], ++ [[4-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") + AC_CHECK_PROG_VER(SED, sed, --version, +- [GNU sed version \([0-9]*\.[0-9.]*\)], ++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") + diff --git a/packages/glibc/2.12.2/version.desc b/packages/glibc/2.12.2/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.12.2/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.13/102-fix-signed-shift-overlow.patch b/packages/glibc/2.13/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.13/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.13/104-unused-variables.patch b/packages/glibc/2.13/104-unused-variables.patch new file mode 100644 index 0000000..e063675 --- /dev/null +++ b/packages/glibc/2.13/104-unused-variables.patch @@ -0,0 +1,165 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-#ifdef __STDC__ +-static const float zero = 0.0; +-#else +-static float zero = 0.0; +-#endif +- + #ifdef __STDC__ + float __ieee754_log10f(float x) + #else +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include "math.h" + #include "math_private.h" + +-#ifdef __STDC__ +-static const float one=1.0; +-#else +-static float one=1.0; +-#endif +- + #ifdef __STDC__ + float __cosf(float x) + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + static long double + #endif + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.13/105-misleading-indentation.patch b/packages/glibc/2.13/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.13/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.13/106-dl-open-array-bounds.patch b/packages/glibc/2.13/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..bdb5c19 --- /dev/null +++ b/packages/glibc/2.13/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && ((nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..da21d9e --- /dev/null +++ b/packages/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,44 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff -urpN glibc-2.13.orig/configure glibc-2.13/configure +--- glibc-2.13.orig/configure 2011-01-17 20:34:07.000000000 -0800 ++++ glibc-2.13/configure 2017-03-08 21:11:09.000000000 -0800 +@@ -6504,7 +6504,7 @@ EOF + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff -urpN glibc-2.13.orig/configure.in glibc-2.13/configure.in +--- glibc-2.13.orig/configure.in 2011-01-17 20:34:07.000000000 -0800 ++++ glibc-2.13/configure.in 2017-03-08 21:11:22.000000000 -0800 +@@ -1673,7 +1673,7 @@ dnl cross-platform since the gcc used ca + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no diff --git a/packages/glibc/2.13/300-macos-cross-rpcgen.patch b/packages/glibc/2.13/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.13/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.13/900-march-i686.patch b/packages/glibc/2.13/900-march-i686.patch new file mode 100644 index 0000000..7f5b1ce --- /dev/null +++ b/packages/glibc/2.13/900-march-i686.patch @@ -0,0 +1,34 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + +diff -urN glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c +--- glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100 +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff -urN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100 +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h diff --git a/packages/glibc/2.13/910-typedef-caddr.patch b/packages/glibc/2.13/910-typedef-caddr.patch new file mode 100644 index 0000000..e29e810 --- /dev/null +++ b/packages/glibc/2.13/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h +--- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h +--- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/packages/glibc/2.13/920-fix-rpc_parse-format.patch b/packages/glibc/2.13/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.13/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.13/940-nis-bogus-conditional.patch b/packages/glibc/2.13/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.13/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.13/950-initfini-ppc64.patch b/packages/glibc/2.13/950-initfini-ppc64.patch new file mode 100644 index 0000000..87f8d23 --- /dev/null +++ b/packages/glibc/2.13/950-initfini-ppc64.patch @@ -0,0 +1,20 @@ +Prevent erroneous inline optimization of initfini.s on PowerPC64. + +The problem and the fix was reported there: +http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html +Git commit: +commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6 +Author: Ryan S. Arnold +Date: Tue May 3 17:26:17 2011 -0500 + +--- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800 ++++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800 +@@ -31,7 +31,7 @@ + ifneq ($(elf),no) + # The initfini generation code doesn't work in the presence of -fPIC, so + # we use -fpic instead which is much better. +-CFLAGS-initfini.s += -fpic -O1 ++CFLAGS-initfini.s += -fpic -O1 -fno-inline + endif + endif + diff --git a/packages/glibc/2.13/999-new-tools.patch b/packages/glibc/2.13/999-new-tools.patch new file mode 100644 index 0000000..d2d498a --- /dev/null +++ b/packages/glibc/2.13/999-new-tools.patch @@ -0,0 +1,69 @@ +diff -urpN glibc-2.13.orig/configure glibc-2.13/configure +--- glibc-2.13.orig/configure 2011-01-17 20:34:07.000000000 -0800 ++++ glibc-2.13/configure 2017-02-08 00:38:22.017735530 -0800 +@@ -5041,7 +5041,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.4* | 4.[0-9]* ) ++ 3.4* | [4-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5104,7 +5104,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5231,7 +5231,7 @@ $as_echo_n "checking version of $MAKEINF + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.*) ++ [4-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5291,7 +5291,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.13.orig/configure.in glibc-2.13/configure.in +--- glibc-2.13.orig/configure.in 2011-01-17 20:34:07.000000000 -0800 ++++ glibc-2.13/configure.in 2017-02-08 00:30:01.720295526 -0800 +@@ -1026,11 +1026,11 @@ fi + # These programs are version sensitive. + AC_CHECK_TOOL_PREFIX + AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, +- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], ++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], +@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg + MSGFMT=: aux_missing="$aux_missing msgfmt") + AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], +- [4.*], ++ [[4-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") + AC_CHECK_PROG_VER(SED, sed, --version, +- [GNU sed version \([0-9]*\.[0-9.]*\)], ++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") + diff --git a/packages/glibc/2.13/version.desc b/packages/glibc/2.13/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.13/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.14.1/102-fix-signed-shift-overlow.patch b/packages/glibc/2.14.1/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.14.1/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.14.1/103-dl-openat64-variadic.patch b/packages/glibc/2.14.1/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.14.1/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.14.1/104-unused-variables.patch b/packages/glibc/2.14.1/104-unused-variables.patch new file mode 100644 index 0000000..e063675 --- /dev/null +++ b/packages/glibc/2.14.1/104-unused-variables.patch @@ -0,0 +1,165 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-#ifdef __STDC__ +-static const float zero = 0.0; +-#else +-static float zero = 0.0; +-#endif +- + #ifdef __STDC__ + float __ieee754_log10f(float x) + #else +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include "math.h" + #include "math_private.h" + +-#ifdef __STDC__ +-static const float one=1.0; +-#else +-static float one=1.0; +-#endif +- + #ifdef __STDC__ + float __cosf(float x) + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + static long double + #endif + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.14.1/105-misleading-indentation.patch b/packages/glibc/2.14.1/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.14.1/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.14.1/106-dl-open-array-bounds.patch b/packages/glibc/2.14.1/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..bdb5c19 --- /dev/null +++ b/packages/glibc/2.14.1/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && ((nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..d720d39 --- /dev/null +++ b/packages/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,44 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure +--- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700 ++++ glibc-2.14.1/configure 2017-03-08 21:06:36.000000000 -0800 +@@ -6377,7 +6377,7 @@ EOF + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in +--- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700 ++++ glibc-2.14.1/configure.in 2017-03-08 21:06:50.000000000 -0800 +@@ -1655,7 +1655,7 @@ dnl cross-platform since the gcc used ca + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no diff --git a/packages/glibc/2.14.1/300-macos-cross-rpcgen.patch b/packages/glibc/2.14.1/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.14.1/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.14.1/900-cpuid-include.patch b/packages/glibc/2.14.1/900-cpuid-include.patch new file mode 100644 index 0000000..0b8db71 --- /dev/null +++ b/packages/glibc/2.14.1/900-cpuid-include.patch @@ -0,0 +1,628 @@ +This patch fixes another configure test issue when bootstrapping. +sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to +test for cpuid.h, and that macro tries to include various other +standard headers (which come from the library, unlike cpuid.h which +comes from the compiler, so aren't available when bootstrapping) in +the test code it compiles. This patch changes the code to use +AC_CHECK_HEADER, with the fourth argument used to prevent any default +includes being used in the test. + +Tested x86_64 (native). + +2012-03-07 Joseph Myers + + * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no + default includes instead of AC_HEADER_CHECK. + * sysdeps/i386/configure: Regenerated. + +Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html + +diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure glibc-2.14.1/sysdeps/i386/configure +--- glibc-2.14.1.orig/sysdeps/i386/configure 2011-10-07 20:48:55.000000000 +1100 ++++ glibc-2.14.1/sysdeps/i386/configure 2012-07-25 01:23:11.799118927 +1000 +@@ -16,23 +16,6 @@ + as_fn_set_status $1 + exit $1 + } # as_fn_exit +-# as_fn_arith ARG... +-# ------------------ +-# Perform arithmetic evaluation on the ARGs, and store the result in the +-# global $as_val. Take advantage of shells that can avoid forks. The arguments +-# must be portable across $(()) and expr. +-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +- eval 'as_fn_arith () +- { +- as_val=$(( $* )) +- }' +-else +- as_fn_arith () +- { +- as_val=`expr "$@" || test $? -eq 1` +- } +-fi # as_fn_arith +- + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -89,6 +72,10 @@ + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + ++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have ++ # already done that, so ensure we don't try to do so again and fall ++ # in an infinite loop. This has already happened in practice. ++ _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). +@@ -97,42 +84,6 @@ + exit + } + +-# Factoring default headers for most tests. +-ac_includes_default="\ +-#include +-#ifdef HAVE_SYS_TYPES_H +-# include +-#endif +-#ifdef HAVE_SYS_STAT_H +-# include +-#endif +-#ifdef STDC_HEADERS +-# include +-# include +-#else +-# ifdef HAVE_STDLIB_H +-# include +-# endif +-#endif +-#ifdef HAVE_STRING_H +-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +-# include +-# endif +-# include +-#endif +-#ifdef HAVE_STRINGS_H +-# include +-#endif +-#ifdef HAVE_INTTYPES_H +-# include +-#endif +-#ifdef HAVE_STDINT_H +-# include +-#endif +-#ifdef HAVE_UNISTD_H +-# include +-#endif" +- + + # ac_fn_c_try_compile LINENO + # -------------------------- +@@ -167,177 +118,11 @@ + + ac_retval=1 + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_compile + +-# ac_fn_c_try_cpp LINENO +-# ---------------------- +-# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +-ac_fn_c_try_cpp () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { { ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err +- ac_status=$? +- if test -s conftest.err; then +- grep -v '^ *+' conftest.err >conftest.er1 +- cat conftest.er1 >&5 +- mv -f conftest.er1 conftest.err +- fi +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then : +- ac_retval=0 +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_retval=1 +-fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- as_fn_set_status $ac_retval +- +-} # ac_fn_c_try_cpp +- +-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +-# ------------------------------------------------------- +-# Tests whether HEADER exists, giving a warning if it cannot be compiled using +-# the include files in INCLUDES and setting the cache variable VAR +-# accordingly. +-ac_fn_c_check_header_mongrel () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if eval "test \"\${$3+set}\"" = set; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +-$as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : +- $as_echo_n "(cached) " >&6 +-fi +-eval ac_res=\$$3 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +-$as_echo_n "checking $2 usability... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$4 +-#include <$2> +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_header_compiler=yes +-else +- ac_header_compiler=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +-$as_echo_n "checking $2 presence... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include <$2> +-_ACEOF +-if ac_fn_c_try_cpp "$LINENO"; then : +- ac_header_preproc=yes +-else +- ac_header_preproc=no +-fi +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( +- yes:no: ) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +- ;; +- no:yes:* ) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +- ;; +-esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +-$as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- eval "$3=\$ac_header_compiler" +-fi +-eval ac_res=\$$3 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- +-} # ac_fn_c_check_header_mongrel +- +-# ac_fn_c_try_run LINENO +-# ---------------------- +-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +-# that executables *can* be run. +-ac_fn_c_try_run () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { { ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' +- { { case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; }; then : +- ac_retval=0 +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_retval=$ac_status +-fi +- rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- as_fn_set_status $ac_retval +- +-} # ac_fn_c_try_run +- + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES + # ------------------------------------------------------- + # Tests whether HEADER exists and can be compiled using the include files in +@@ -347,7 +132,7 @@ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -365,275 +150,16 @@ + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_compile + # This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/i386. + + +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +-$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +-if test "${ac_cv_path_GREP+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -z "$GREP"; then +- ac_path_GREP_found=false +- # Loop through the user's path and test for each of PROGNAME-LIST +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in grep ggrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +-# Check for GNU ac_path_GREP and select it if it is found. +- # Check for GNU $ac_path_GREP +-case `"$ac_path_GREP" --version 2>&1` in +-*GNU*) +- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +-*) +- ac_count=0 +- $as_echo_n 0123456789 >"conftest.in" +- while : +- do +- cat "conftest.in" "conftest.in" >"conftest.tmp" +- mv "conftest.tmp" "conftest.in" +- cp "conftest.in" "conftest.nl" +- $as_echo 'GREP' >> "conftest.nl" +- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break +- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- as_fn_arith $ac_count + 1 && ac_count=$as_val +- if test $ac_count -gt ${ac_path_GREP_max-0}; then +- # Best one so far, save it but keep looking for a better one +- ac_cv_path_GREP="$ac_path_GREP" +- ac_path_GREP_max=$ac_count +- fi +- # 10*(2^10) chars as input seems more than enough +- test $ac_count -gt 10 && break +- done +- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +-esac +- +- $ac_path_GREP_found && break 3 +- done +- done +- done +-IFS=$as_save_IFS +- if test -z "$ac_cv_path_GREP"; then +- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +- fi +-else +- ac_cv_path_GREP=$GREP +-fi +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +-$as_echo "$ac_cv_path_GREP" >&6; } +- GREP="$ac_cv_path_GREP" +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +-$as_echo_n "checking for egrep... " >&6; } +-if test "${ac_cv_path_EGREP+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +- then ac_cv_path_EGREP="$GREP -E" +- else +- if test -z "$EGREP"; then +- ac_path_EGREP_found=false +- # Loop through the user's path and test for each of PROGNAME-LIST +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in egrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +-# Check for GNU ac_path_EGREP and select it if it is found. +- # Check for GNU $ac_path_EGREP +-case `"$ac_path_EGREP" --version 2>&1` in +-*GNU*) +- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +-*) +- ac_count=0 +- $as_echo_n 0123456789 >"conftest.in" +- while : +- do +- cat "conftest.in" "conftest.in" >"conftest.tmp" +- mv "conftest.tmp" "conftest.in" +- cp "conftest.in" "conftest.nl" +- $as_echo 'EGREP' >> "conftest.nl" +- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break +- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- as_fn_arith $ac_count + 1 && ac_count=$as_val +- if test $ac_count -gt ${ac_path_EGREP_max-0}; then +- # Best one so far, save it but keep looking for a better one +- ac_cv_path_EGREP="$ac_path_EGREP" +- ac_path_EGREP_max=$ac_count +- fi +- # 10*(2^10) chars as input seems more than enough +- test $ac_count -gt 10 && break +- done +- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +-esac +- +- $ac_path_EGREP_found && break 3 +- done +- done +- done +-IFS=$as_save_IFS +- if test -z "$ac_cv_path_EGREP"; then +- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +- fi +-else +- ac_cv_path_EGREP=$EGREP +-fi +- +- fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +-$as_echo "$ac_cv_path_EGREP" >&6; } +- EGREP="$ac_cv_path_EGREP" +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +-$as_echo_n "checking for ANSI C header files... " >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_header_stdc=yes +-else +- ac_cv_header_stdc=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-if test $ac_cv_header_stdc = yes; then +- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then : +- : +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#if ((' ' & 0x0FF) == 0x020) +-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +-#else +-# define ISLOWER(c) \ +- (('a' <= (c) && (c) <= 'i') \ +- || ('j' <= (c) && (c) <= 'r') \ +- || ('s' <= (c) && (c) <= 'z')) +-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +-#endif +- +-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int +-main () +-{ +- int i; +- for (i = 0; i < 256; i++) +- if (XOR (islower (i), ISLOWER (i)) +- || toupper (i) != TOUPPER (i)) +- return 2; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +-$as_echo "$ac_cv_header_stdc" >&6; } +-if test $ac_cv_header_stdc = yes; then +- +-$as_echo "#define STDC_HEADERS 1" >>confdefs.h +- +-fi +- +-# On IRIX 5.3, sys/types and inttypes.h are conflicting. +-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +- inttypes.h stdint.h unistd.h +-do : +- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default ++ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ + " +-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- +-ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" +-if test "x$ac_cv_header_cpuid_h" = x""yes; then : ++if test "x$ac_cv_header_cpuid_h" = xyes; then : + + else + as_fn_error $? "gcc must provide the header" "$LINENO" 5 +@@ -643,7 +169,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5 + $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } +-if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then : ++if ${libc_cv_cpp_asm_debuginfo+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat > conftest.S <&5 + $as_echo_n "checking for SSE4 support... " >&6; } +-if test "${libc_cv_cc_sse4+set}" = set; then : ++if ${libc_cv_cc_sse4+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null' +@@ -716,7 +242,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5 + $as_echo_n "checking for assembler -mtune=i686 support... " >&6; } +-if test "${libc_cv_as_i686+set}" = set; then : ++if ${libc_cv_as_i686+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null' +@@ -735,7 +261,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5 + $as_echo_n "checking for AVX support... " >&6; } +-if test "${libc_cv_cc_avx+set}" = set; then : ++if ${libc_cv_cc_avx+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null' +@@ -758,7 +284,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5 + $as_echo_n "checking for -mno-vzeroupper support... " >&6; } +-if test "${libc_cv_cc_novzeroupper+set}" = set; then : ++if ${libc_cv_cc_novzeroupper+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null' +diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure.in glibc-2.14.1/sysdeps/i386/configure.in +--- glibc-2.14.1.orig/sysdeps/i386/configure.in 2011-10-07 20:48:55.000000000 +1100 ++++ glibc-2.14.1/sysdeps/i386/configure.in 2012-07-25 01:00:49.345025022 +1000 +@@ -1,8 +1,9 @@ + GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Local configure fragment for sysdeps/i386. + +-AC_HEADER_CHECK([cpuid.h], , +- [AC_MSG_ERROR([gcc must provide the header])]) ++AC_CHECK_HEADER([cpuid.h], , ++ [AC_MSG_ERROR([gcc must provide the header])], ++ [/* No default includes. */]) + + AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, + libc_cv_cpp_asm_debuginfo, [dnl + diff --git a/packages/glibc/2.14.1/910-asm-i686.patch b/packages/glibc/2.14.1/910-asm-i686.patch new file mode 100644 index 0000000..b049887 --- /dev/null +++ b/packages/glibc/2.14.1/910-asm-i686.patch @@ -0,0 +1,50 @@ +Submitted By: Matt Burgess +Date: 2010-04-18 +Initial Package Version: 2.11.1 +Upstream Status: Not Submitted +Origin: http://www.eglibc.org/archives/patches/msg00073.html +Description: Fixes the following build problem with GCC-4.5.0: + +/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os +./sysdeps/i386/fpu/s_frexp.S: Assembler messages: +./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive +./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression +make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 + +diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c +--- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 ++++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h +--- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 ++++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + diff --git a/packages/glibc/2.14.1/920-fix-rpc_parse-format.patch b/packages/glibc/2.14.1/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.14.1/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.14.1/940-nis-bogus-conditional.patch b/packages/glibc/2.14.1/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.14.1/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.14.1/950-initfini-ppc64.patch b/packages/glibc/2.14.1/950-initfini-ppc64.patch new file mode 100644 index 0000000..87f8d23 --- /dev/null +++ b/packages/glibc/2.14.1/950-initfini-ppc64.patch @@ -0,0 +1,20 @@ +Prevent erroneous inline optimization of initfini.s on PowerPC64. + +The problem and the fix was reported there: +http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html +Git commit: +commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6 +Author: Ryan S. Arnold +Date: Tue May 3 17:26:17 2011 -0500 + +--- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800 ++++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800 +@@ -31,7 +31,7 @@ + ifneq ($(elf),no) + # The initfini generation code doesn't work in the presence of -fPIC, so + # we use -fpic instead which is much better. +-CFLAGS-initfini.s += -fpic -O1 ++CFLAGS-initfini.s += -fpic -O1 -fno-inline + endif + endif + diff --git a/packages/glibc/2.14.1/999-new-tools.patch b/packages/glibc/2.14.1/999-new-tools.patch new file mode 100644 index 0000000..f335a54 --- /dev/null +++ b/packages/glibc/2.14.1/999-new-tools.patch @@ -0,0 +1,69 @@ +diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure +--- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700 ++++ glibc-2.14.1/configure 2017-02-08 00:38:43.765952352 -0800 +@@ -4939,7 +4939,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.4* | 4.[0-9]* ) ++ 3.4* | [4-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5002,7 +5002,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5129,7 +5129,7 @@ $as_echo_n "checking version of $MAKEINF + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.*) ++ [4-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5189,7 +5189,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in +--- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700 ++++ glibc-2.14.1/configure.in 2017-02-08 00:30:13.660439376 -0800 +@@ -1026,11 +1026,11 @@ fi + # These programs are version sensitive. + AC_CHECK_TOOL_PREFIX + AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, +- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], ++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], +@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg + MSGFMT=: aux_missing="$aux_missing msgfmt") + AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], +- [4.*], ++ [[4-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") + AC_CHECK_PROG_VER(SED, sed, --version, +- [GNU sed version \([0-9]*\.[0-9.]*\)], ++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") + diff --git a/packages/glibc/2.14.1/version.desc b/packages/glibc/2.14.1/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.14.1/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.14/102-fix-signed-shift-overlow.patch b/packages/glibc/2.14/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.14/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.14/103-dl-openat64-variadic.patch b/packages/glibc/2.14/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.14/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.14/104-unused-variables.patch b/packages/glibc/2.14/104-unused-variables.patch new file mode 100644 index 0000000..e063675 --- /dev/null +++ b/packages/glibc/2.14/104-unused-variables.patch @@ -0,0 +1,165 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-#ifdef __STDC__ +-static const float zero = 0.0; +-#else +-static float zero = 0.0; +-#endif +- + #ifdef __STDC__ + float __ieee754_log10f(float x) + #else +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include "math.h" + #include "math_private.h" + +-#ifdef __STDC__ +-static const float one=1.0; +-#else +-static float one=1.0; +-#endif +- + #ifdef __STDC__ + float __cosf(float x) + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + static long double + #endif + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.14/105-misleading-indentation.patch b/packages/glibc/2.14/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.14/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.14/106-dl-open-array-bounds.patch b/packages/glibc/2.14/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..bdb5c19 --- /dev/null +++ b/packages/glibc/2.14/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && ((nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..d720d39 --- /dev/null +++ b/packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,44 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure +--- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700 ++++ glibc-2.14.1/configure 2017-03-08 21:06:36.000000000 -0800 +@@ -6377,7 +6377,7 @@ EOF + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in +--- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700 ++++ glibc-2.14.1/configure.in 2017-03-08 21:06:50.000000000 -0800 +@@ -1655,7 +1655,7 @@ dnl cross-platform since the gcc used ca + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no diff --git a/packages/glibc/2.14/300-macos-cross-rpcgen.patch b/packages/glibc/2.14/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.14/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.14/900-cpuid-include.patch b/packages/glibc/2.14/900-cpuid-include.patch new file mode 100644 index 0000000..0b8db71 --- /dev/null +++ b/packages/glibc/2.14/900-cpuid-include.patch @@ -0,0 +1,628 @@ +This patch fixes another configure test issue when bootstrapping. +sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to +test for cpuid.h, and that macro tries to include various other +standard headers (which come from the library, unlike cpuid.h which +comes from the compiler, so aren't available when bootstrapping) in +the test code it compiles. This patch changes the code to use +AC_CHECK_HEADER, with the fourth argument used to prevent any default +includes being used in the test. + +Tested x86_64 (native). + +2012-03-07 Joseph Myers + + * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no + default includes instead of AC_HEADER_CHECK. + * sysdeps/i386/configure: Regenerated. + +Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html + +diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure glibc-2.14.1/sysdeps/i386/configure +--- glibc-2.14.1.orig/sysdeps/i386/configure 2011-10-07 20:48:55.000000000 +1100 ++++ glibc-2.14.1/sysdeps/i386/configure 2012-07-25 01:23:11.799118927 +1000 +@@ -16,23 +16,6 @@ + as_fn_set_status $1 + exit $1 + } # as_fn_exit +-# as_fn_arith ARG... +-# ------------------ +-# Perform arithmetic evaluation on the ARGs, and store the result in the +-# global $as_val. Take advantage of shells that can avoid forks. The arguments +-# must be portable across $(()) and expr. +-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +- eval 'as_fn_arith () +- { +- as_val=$(( $* )) +- }' +-else +- as_fn_arith () +- { +- as_val=`expr "$@" || test $? -eq 1` +- } +-fi # as_fn_arith +- + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -89,6 +72,10 @@ + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + ++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have ++ # already done that, so ensure we don't try to do so again and fall ++ # in an infinite loop. This has already happened in practice. ++ _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). +@@ -97,42 +84,6 @@ + exit + } + +-# Factoring default headers for most tests. +-ac_includes_default="\ +-#include +-#ifdef HAVE_SYS_TYPES_H +-# include +-#endif +-#ifdef HAVE_SYS_STAT_H +-# include +-#endif +-#ifdef STDC_HEADERS +-# include +-# include +-#else +-# ifdef HAVE_STDLIB_H +-# include +-# endif +-#endif +-#ifdef HAVE_STRING_H +-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +-# include +-# endif +-# include +-#endif +-#ifdef HAVE_STRINGS_H +-# include +-#endif +-#ifdef HAVE_INTTYPES_H +-# include +-#endif +-#ifdef HAVE_STDINT_H +-# include +-#endif +-#ifdef HAVE_UNISTD_H +-# include +-#endif" +- + + # ac_fn_c_try_compile LINENO + # -------------------------- +@@ -167,177 +118,11 @@ + + ac_retval=1 + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_compile + +-# ac_fn_c_try_cpp LINENO +-# ---------------------- +-# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +-ac_fn_c_try_cpp () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { { ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err +- ac_status=$? +- if test -s conftest.err; then +- grep -v '^ *+' conftest.err >conftest.er1 +- cat conftest.er1 >&5 +- mv -f conftest.er1 conftest.err +- fi +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then : +- ac_retval=0 +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_retval=1 +-fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- as_fn_set_status $ac_retval +- +-} # ac_fn_c_try_cpp +- +-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +-# ------------------------------------------------------- +-# Tests whether HEADER exists, giving a warning if it cannot be compiled using +-# the include files in INCLUDES and setting the cache variable VAR +-# accordingly. +-ac_fn_c_check_header_mongrel () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if eval "test \"\${$3+set}\"" = set; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +-$as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : +- $as_echo_n "(cached) " >&6 +-fi +-eval ac_res=\$$3 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +-$as_echo_n "checking $2 usability... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$4 +-#include <$2> +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_header_compiler=yes +-else +- ac_header_compiler=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +-$as_echo_n "checking $2 presence... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include <$2> +-_ACEOF +-if ac_fn_c_try_cpp "$LINENO"; then : +- ac_header_preproc=yes +-else +- ac_header_preproc=no +-fi +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( +- yes:no: ) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +- ;; +- no:yes:* ) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +- ;; +-esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +-$as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- eval "$3=\$ac_header_compiler" +-fi +-eval ac_res=\$$3 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- +-} # ac_fn_c_check_header_mongrel +- +-# ac_fn_c_try_run LINENO +-# ---------------------- +-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +-# that executables *can* be run. +-ac_fn_c_try_run () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { { ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' +- { { case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; }; then : +- ac_retval=0 +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_retval=$ac_status +-fi +- rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- as_fn_set_status $ac_retval +- +-} # ac_fn_c_try_run +- + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES + # ------------------------------------------------------- + # Tests whether HEADER exists and can be compiled using the include files in +@@ -347,7 +132,7 @@ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -365,275 +150,16 @@ + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_compile + # This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/i386. + + +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +-$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +-if test "${ac_cv_path_GREP+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -z "$GREP"; then +- ac_path_GREP_found=false +- # Loop through the user's path and test for each of PROGNAME-LIST +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in grep ggrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +-# Check for GNU ac_path_GREP and select it if it is found. +- # Check for GNU $ac_path_GREP +-case `"$ac_path_GREP" --version 2>&1` in +-*GNU*) +- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +-*) +- ac_count=0 +- $as_echo_n 0123456789 >"conftest.in" +- while : +- do +- cat "conftest.in" "conftest.in" >"conftest.tmp" +- mv "conftest.tmp" "conftest.in" +- cp "conftest.in" "conftest.nl" +- $as_echo 'GREP' >> "conftest.nl" +- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break +- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- as_fn_arith $ac_count + 1 && ac_count=$as_val +- if test $ac_count -gt ${ac_path_GREP_max-0}; then +- # Best one so far, save it but keep looking for a better one +- ac_cv_path_GREP="$ac_path_GREP" +- ac_path_GREP_max=$ac_count +- fi +- # 10*(2^10) chars as input seems more than enough +- test $ac_count -gt 10 && break +- done +- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +-esac +- +- $ac_path_GREP_found && break 3 +- done +- done +- done +-IFS=$as_save_IFS +- if test -z "$ac_cv_path_GREP"; then +- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +- fi +-else +- ac_cv_path_GREP=$GREP +-fi +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +-$as_echo "$ac_cv_path_GREP" >&6; } +- GREP="$ac_cv_path_GREP" +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +-$as_echo_n "checking for egrep... " >&6; } +-if test "${ac_cv_path_EGREP+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +- then ac_cv_path_EGREP="$GREP -E" +- else +- if test -z "$EGREP"; then +- ac_path_EGREP_found=false +- # Loop through the user's path and test for each of PROGNAME-LIST +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in egrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +-# Check for GNU ac_path_EGREP and select it if it is found. +- # Check for GNU $ac_path_EGREP +-case `"$ac_path_EGREP" --version 2>&1` in +-*GNU*) +- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +-*) +- ac_count=0 +- $as_echo_n 0123456789 >"conftest.in" +- while : +- do +- cat "conftest.in" "conftest.in" >"conftest.tmp" +- mv "conftest.tmp" "conftest.in" +- cp "conftest.in" "conftest.nl" +- $as_echo 'EGREP' >> "conftest.nl" +- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break +- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- as_fn_arith $ac_count + 1 && ac_count=$as_val +- if test $ac_count -gt ${ac_path_EGREP_max-0}; then +- # Best one so far, save it but keep looking for a better one +- ac_cv_path_EGREP="$ac_path_EGREP" +- ac_path_EGREP_max=$ac_count +- fi +- # 10*(2^10) chars as input seems more than enough +- test $ac_count -gt 10 && break +- done +- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +-esac +- +- $ac_path_EGREP_found && break 3 +- done +- done +- done +-IFS=$as_save_IFS +- if test -z "$ac_cv_path_EGREP"; then +- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +- fi +-else +- ac_cv_path_EGREP=$EGREP +-fi +- +- fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +-$as_echo "$ac_cv_path_EGREP" >&6; } +- EGREP="$ac_cv_path_EGREP" +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +-$as_echo_n "checking for ANSI C header files... " >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_header_stdc=yes +-else +- ac_cv_header_stdc=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-if test $ac_cv_header_stdc = yes; then +- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then : +- : +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#if ((' ' & 0x0FF) == 0x020) +-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +-#else +-# define ISLOWER(c) \ +- (('a' <= (c) && (c) <= 'i') \ +- || ('j' <= (c) && (c) <= 'r') \ +- || ('s' <= (c) && (c) <= 'z')) +-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +-#endif +- +-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int +-main () +-{ +- int i; +- for (i = 0; i < 256; i++) +- if (XOR (islower (i), ISLOWER (i)) +- || toupper (i) != TOUPPER (i)) +- return 2; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +-$as_echo "$ac_cv_header_stdc" >&6; } +-if test $ac_cv_header_stdc = yes; then +- +-$as_echo "#define STDC_HEADERS 1" >>confdefs.h +- +-fi +- +-# On IRIX 5.3, sys/types and inttypes.h are conflicting. +-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +- inttypes.h stdint.h unistd.h +-do : +- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default ++ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ + " +-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- +-ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" +-if test "x$ac_cv_header_cpuid_h" = x""yes; then : ++if test "x$ac_cv_header_cpuid_h" = xyes; then : + + else + as_fn_error $? "gcc must provide the header" "$LINENO" 5 +@@ -643,7 +169,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5 + $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } +-if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then : ++if ${libc_cv_cpp_asm_debuginfo+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat > conftest.S <&5 + $as_echo_n "checking for SSE4 support... " >&6; } +-if test "${libc_cv_cc_sse4+set}" = set; then : ++if ${libc_cv_cc_sse4+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null' +@@ -716,7 +242,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5 + $as_echo_n "checking for assembler -mtune=i686 support... " >&6; } +-if test "${libc_cv_as_i686+set}" = set; then : ++if ${libc_cv_as_i686+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null' +@@ -735,7 +261,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5 + $as_echo_n "checking for AVX support... " >&6; } +-if test "${libc_cv_cc_avx+set}" = set; then : ++if ${libc_cv_cc_avx+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null' +@@ -758,7 +284,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5 + $as_echo_n "checking for -mno-vzeroupper support... " >&6; } +-if test "${libc_cv_cc_novzeroupper+set}" = set; then : ++if ${libc_cv_cc_novzeroupper+:} false; then : + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null' +diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure.in glibc-2.14.1/sysdeps/i386/configure.in +--- glibc-2.14.1.orig/sysdeps/i386/configure.in 2011-10-07 20:48:55.000000000 +1100 ++++ glibc-2.14.1/sysdeps/i386/configure.in 2012-07-25 01:00:49.345025022 +1000 +@@ -1,8 +1,9 @@ + GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Local configure fragment for sysdeps/i386. + +-AC_HEADER_CHECK([cpuid.h], , +- [AC_MSG_ERROR([gcc must provide the header])]) ++AC_CHECK_HEADER([cpuid.h], , ++ [AC_MSG_ERROR([gcc must provide the header])], ++ [/* No default includes. */]) + + AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, + libc_cv_cpp_asm_debuginfo, [dnl + diff --git a/packages/glibc/2.14/920-fix-rpc_parse-format.patch b/packages/glibc/2.14/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.14/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.14/940-nis-bogus-conditional.patch b/packages/glibc/2.14/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.14/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.14/950-initfini-ppc64.patch b/packages/glibc/2.14/950-initfini-ppc64.patch new file mode 100644 index 0000000..87f8d23 --- /dev/null +++ b/packages/glibc/2.14/950-initfini-ppc64.patch @@ -0,0 +1,20 @@ +Prevent erroneous inline optimization of initfini.s on PowerPC64. + +The problem and the fix was reported there: +http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html +Git commit: +commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6 +Author: Ryan S. Arnold +Date: Tue May 3 17:26:17 2011 -0500 + +--- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800 ++++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800 +@@ -31,7 +31,7 @@ + ifneq ($(elf),no) + # The initfini generation code doesn't work in the presence of -fPIC, so + # we use -fpic instead which is much better. +-CFLAGS-initfini.s += -fpic -O1 ++CFLAGS-initfini.s += -fpic -O1 -fno-inline + endif + endif + diff --git a/packages/glibc/2.14/999-new-tools.patch b/packages/glibc/2.14/999-new-tools.patch new file mode 100644 index 0000000..7d115fd --- /dev/null +++ b/packages/glibc/2.14/999-new-tools.patch @@ -0,0 +1,69 @@ +diff -urpN glibc-2.14.orig/configure glibc-2.14/configure +--- glibc-2.14.orig/configure 2011-05-30 21:12:33.000000000 -0700 ++++ glibc-2.14/configure 2017-02-08 00:38:34.469859812 -0800 +@@ -4939,7 +4939,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.4* | 4.[0-9]* ) ++ 3.4* | [4-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5002,7 +5002,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5129,7 +5129,7 @@ $as_echo_n "checking version of $MAKEINF + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.*) ++ [4-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5189,7 +5189,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.14.orig/configure.in glibc-2.14/configure.in +--- glibc-2.14.orig/configure.in 2011-05-30 21:12:33.000000000 -0700 ++++ glibc-2.14/configure.in 2017-02-08 00:30:32.232661325 -0800 +@@ -1026,11 +1026,11 @@ fi + # These programs are version sensitive. + AC_CHECK_TOOL_PREFIX + AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, +- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], ++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], +@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg + MSGFMT=: aux_missing="$aux_missing msgfmt") + AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], +- [4.*], ++ [[4-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") + AC_CHECK_PROG_VER(SED, sed, --version, +- [GNU sed version \([0-9]*\.[0-9.]*\)], ++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") + diff --git a/packages/glibc/2.14/version.desc b/packages/glibc/2.14/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.14/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.15/102-fix-signed-shift-overlow.patch b/packages/glibc/2.15/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.15/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.15/103-dl-openat64-variadic.patch b/packages/glibc/2.15/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.15/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.15/104-unused-variables.patch b/packages/glibc/2.15/104-unused-variables.patch new file mode 100644 index 0000000..63e4a40 --- /dev/null +++ b/packages/glibc/2.15/104-unused-variables.patch @@ -0,0 +1,161 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include "math.h" + #include "math_private.h" + +-#ifdef __STDC__ +-static const float one=1.0; +-#else +-static float one=1.0; +-#endif +- + #ifdef __STDC__ + float __cosf(float x) + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + static long double + #endif + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.15/105-misleading-indentation.patch b/packages/glibc/2.15/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.15/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.15/106-dl-open-array-bounds.patch b/packages/glibc/2.15/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..bdb5c19 --- /dev/null +++ b/packages/glibc/2.15/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && ((nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..c36cdf4 --- /dev/null +++ b/packages/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,44 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff -urpN glibc-2.15.orig/configure glibc-2.15/configure +--- glibc-2.15.orig/configure 2012-03-19 07:56:58.000000000 -0700 ++++ glibc-2.15/configure 2017-03-08 21:02:21.000000000 -0800 +@@ -6566,7 +6566,7 @@ EOF + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in +--- glibc-2.15.orig/configure.in 2012-01-01 04:16:32.000000000 -0800 ++++ glibc-2.15/configure.in 2017-03-08 21:01:54.000000000 -0800 +@@ -1716,7 +1716,7 @@ dnl cross-platform since the gcc used ca + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no diff --git a/packages/glibc/2.15/300-macos-cross-rpcgen.patch b/packages/glibc/2.15/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.15/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.15/900-cpuid-include.patch b/packages/glibc/2.15/900-cpuid-include.patch new file mode 100644 index 0000000..29edf7b --- /dev/null +++ b/packages/glibc/2.15/900-cpuid-include.patch @@ -0,0 +1,548 @@ +[As applied to 2.15] + +This patch fixes another configure test issue when bootstrapping. +sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to +test for cpuid.h, and that macro tries to include various other +standard headers (which come from the library, unlike cpuid.h which +comes from the compiler, so aren't available when bootstrapping) in +the test code it compiles. This patch changes the code to use +AC_CHECK_HEADER, with the fourth argument used to prevent any default +includes being used in the test. + +Tested x86_64 (native). + +2012-03-07 Joseph Myers + + * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no + default includes instead of AC_HEADER_CHECK. + * sysdeps/i386/configure: Regenerated. + +Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html + +diff -urpN '--exclude=autom4te.cache' glibc-2.15.orig/sysdeps/i386/configure glibc-2.15/sysdeps/i386/configure +--- glibc-2.15.orig/sysdeps/i386/configure 2017-02-08 14:28:19.947516097 -0800 ++++ glibc-2.15/sysdeps/i386/configure 2017-02-08 17:25:19.756462280 -0800 +@@ -16,23 +16,6 @@ as_fn_exit () + as_fn_set_status $1 + exit $1 + } # as_fn_exit +-# as_fn_arith ARG... +-# ------------------ +-# Perform arithmetic evaluation on the ARGs, and store the result in the +-# global $as_val. Take advantage of shells that can avoid forks. The arguments +-# must be portable across $(()) and expr. +-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +- eval 'as_fn_arith () +- { +- as_val=$(( $* )) +- }' +-else +- as_fn_arith () +- { +- as_val=`expr "$@" || test $? -eq 1` +- } +-fi # as_fn_arith +- + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -97,42 +80,6 @@ $as_echo X/"$0" | + exit + } + +-# Factoring default headers for most tests. +-ac_includes_default="\ +-#include +-#ifdef HAVE_SYS_TYPES_H +-# include +-#endif +-#ifdef HAVE_SYS_STAT_H +-# include +-#endif +-#ifdef STDC_HEADERS +-# include +-# include +-#else +-# ifdef HAVE_STDLIB_H +-# include +-# endif +-#endif +-#ifdef HAVE_STRING_H +-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +-# include +-# endif +-# include +-#endif +-#ifdef HAVE_STRINGS_H +-# include +-#endif +-#ifdef HAVE_INTTYPES_H +-# include +-#endif +-#ifdef HAVE_STDINT_H +-# include +-#endif +-#ifdef HAVE_UNISTD_H +-# include +-#endif" +- + + # ac_fn_c_try_compile LINENO + # -------------------------- +@@ -172,172 +119,6 @@ fi + + } # ac_fn_c_try_compile + +-# ac_fn_c_try_cpp LINENO +-# ---------------------- +-# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +-ac_fn_c_try_cpp () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { { ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err +- ac_status=$? +- if test -s conftest.err; then +- grep -v '^ *+' conftest.err >conftest.er1 +- cat conftest.er1 >&5 +- mv -f conftest.er1 conftest.err +- fi +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } > conftest.i && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then : +- ac_retval=0 +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_retval=1 +-fi +- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +- as_fn_set_status $ac_retval +- +-} # ac_fn_c_try_cpp +- +-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +-# ------------------------------------------------------- +-# Tests whether HEADER exists, giving a warning if it cannot be compiled using +-# the include files in INCLUDES and setting the cache variable VAR +-# accordingly. +-ac_fn_c_check_header_mongrel () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if eval \${$3+:} false; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +-$as_echo_n "checking for $2... " >&6; } +-if eval \${$3+:} false; then : +- $as_echo_n "(cached) " >&6 +-fi +-eval ac_res=\$$3 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +-$as_echo_n "checking $2 usability... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$4 +-#include <$2> +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_header_compiler=yes +-else +- ac_header_compiler=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +-$as_echo_n "checking $2 presence... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include <$2> +-_ACEOF +-if ac_fn_c_try_cpp "$LINENO"; then : +- ac_header_preproc=yes +-else +- ac_header_preproc=no +-fi +-rm -f conftest.err conftest.i conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( +- yes:no: ) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +- ;; +- no:yes:* ) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +- ;; +-esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +-$as_echo_n "checking for $2... " >&6; } +-if eval \${$3+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- eval "$3=\$ac_header_compiler" +-fi +-eval ac_res=\$$3 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-fi +- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +- +-} # ac_fn_c_check_header_mongrel +- +-# ac_fn_c_try_run LINENO +-# ---------------------- +-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +-# that executables *can* be run. +-ac_fn_c_try_run () +-{ +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { { ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' +- { { case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; }; then : +- ac_retval=0 +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_retval=$ac_status +-fi +- rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +- as_fn_set_status $ac_retval +- +-} # ac_fn_c_try_run +- + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES + # ------------------------------------------------------- + # Tests whether HEADER exists and can be compiled using the include files in +@@ -372,267 +153,8 @@ $as_echo "$ac_res" >&6; } + # Local configure fragment for sysdeps/i386. + + +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +-$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +-if ${ac_cv_path_GREP+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -z "$GREP"; then +- ac_path_GREP_found=false +- # Loop through the user's path and test for each of PROGNAME-LIST +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in grep ggrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +-# Check for GNU ac_path_GREP and select it if it is found. +- # Check for GNU $ac_path_GREP +-case `"$ac_path_GREP" --version 2>&1` in +-*GNU*) +- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +-*) +- ac_count=0 +- $as_echo_n 0123456789 >"conftest.in" +- while : +- do +- cat "conftest.in" "conftest.in" >"conftest.tmp" +- mv "conftest.tmp" "conftest.in" +- cp "conftest.in" "conftest.nl" +- $as_echo 'GREP' >> "conftest.nl" +- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break +- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- as_fn_arith $ac_count + 1 && ac_count=$as_val +- if test $ac_count -gt ${ac_path_GREP_max-0}; then +- # Best one so far, save it but keep looking for a better one +- ac_cv_path_GREP="$ac_path_GREP" +- ac_path_GREP_max=$ac_count +- fi +- # 10*(2^10) chars as input seems more than enough +- test $ac_count -gt 10 && break +- done +- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +-esac +- +- $ac_path_GREP_found && break 3 +- done +- done +- done +-IFS=$as_save_IFS +- if test -z "$ac_cv_path_GREP"; then +- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +- fi +-else +- ac_cv_path_GREP=$GREP +-fi +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +-$as_echo "$ac_cv_path_GREP" >&6; } +- GREP="$ac_cv_path_GREP" +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +-$as_echo_n "checking for egrep... " >&6; } +-if ${ac_cv_path_EGREP+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +- then ac_cv_path_EGREP="$GREP -E" +- else +- if test -z "$EGREP"; then +- ac_path_EGREP_found=false +- # Loop through the user's path and test for each of PROGNAME-LIST +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in egrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +-# Check for GNU ac_path_EGREP and select it if it is found. +- # Check for GNU $ac_path_EGREP +-case `"$ac_path_EGREP" --version 2>&1` in +-*GNU*) +- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +-*) +- ac_count=0 +- $as_echo_n 0123456789 >"conftest.in" +- while : +- do +- cat "conftest.in" "conftest.in" >"conftest.tmp" +- mv "conftest.tmp" "conftest.in" +- cp "conftest.in" "conftest.nl" +- $as_echo 'EGREP' >> "conftest.nl" +- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break +- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- as_fn_arith $ac_count + 1 && ac_count=$as_val +- if test $ac_count -gt ${ac_path_EGREP_max-0}; then +- # Best one so far, save it but keep looking for a better one +- ac_cv_path_EGREP="$ac_path_EGREP" +- ac_path_EGREP_max=$ac_count +- fi +- # 10*(2^10) chars as input seems more than enough +- test $ac_count -gt 10 && break +- done +- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +-esac +- +- $ac_path_EGREP_found && break 3 +- done +- done +- done +-IFS=$as_save_IFS +- if test -z "$ac_cv_path_EGREP"; then +- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +- fi +-else +- ac_cv_path_EGREP=$EGREP +-fi +- +- fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +-$as_echo "$ac_cv_path_EGREP" >&6; } +- EGREP="$ac_cv_path_EGREP" +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +-$as_echo_n "checking for ANSI C header files... " >&6; } +-if ${ac_cv_header_stdc+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_header_stdc=yes +-else +- ac_cv_header_stdc=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-if test $ac_cv_header_stdc = yes; then +- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then : +- : +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#if ((' ' & 0x0FF) == 0x020) +-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +-#else +-# define ISLOWER(c) \ +- (('a' <= (c) && (c) <= 'i') \ +- || ('j' <= (c) && (c) <= 'r') \ +- || ('s' <= (c) && (c) <= 'z')) +-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +-#endif +- +-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int +-main () +-{ +- int i; +- for (i = 0; i < 256; i++) +- if (XOR (islower (i), ISLOWER (i)) +- || toupper (i) != TOUPPER (i)) +- return 2; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- +-else +- ac_cv_header_stdc=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +-$as_echo "$ac_cv_header_stdc" >&6; } +-if test $ac_cv_header_stdc = yes; then +- +-$as_echo "#define STDC_HEADERS 1" >>confdefs.h +- +-fi +- +-# On IRIX 5.3, sys/types and inttypes.h are conflicting. +-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +- inttypes.h stdint.h unistd.h +-do : +- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default ++ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ + " +-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- +-ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" + if test "x$ac_cv_header_cpuid_h" = xyes; then : + + else +diff -urpN '--exclude=autom4te.cache' glibc-2.15.orig/sysdeps/i386/configure.in glibc-2.15/sysdeps/i386/configure.in +--- glibc-2.15.orig/sysdeps/i386/configure.in 2017-02-08 14:28:19.951516034 -0800 ++++ glibc-2.15/sysdeps/i386/configure.in 2017-02-08 17:24:29.995973278 -0800 +@@ -1,8 +1,9 @@ + GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Local configure fragment for sysdeps/i386. + +-AC_HEADER_CHECK([cpuid.h], , +- [AC_MSG_ERROR([gcc must provide the header])]) ++AC_CHECK_HEADER([cpuid.h], , ++ [AC_MSG_ERROR([gcc must provide the header])], ++ [/* No default includes. */]) + + AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, + libc_cv_cpp_asm_debuginfo, [dnl diff --git a/packages/glibc/2.15/910-asm-i686.patch b/packages/glibc/2.15/910-asm-i686.patch new file mode 100644 index 0000000..b049887 --- /dev/null +++ b/packages/glibc/2.15/910-asm-i686.patch @@ -0,0 +1,50 @@ +Submitted By: Matt Burgess +Date: 2010-04-18 +Initial Package Version: 2.11.1 +Upstream Status: Not Submitted +Origin: http://www.eglibc.org/archives/patches/msg00073.html +Description: Fixes the following build problem with GCC-4.5.0: + +/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os +./sysdeps/i386/fpu/s_frexp.S: Assembler messages: +./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' +./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive +./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression +make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 + +diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c +--- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 ++++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h +--- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 ++++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + diff --git a/packages/glibc/2.15/920-fix-rpc_parse-format.patch b/packages/glibc/2.15/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.15/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.15/940-nis-bogus-conditional.patch b/packages/glibc/2.15/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.15/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.15/990-try-link-static.patch b/packages/glibc/2.15/990-try-link-static.patch new file mode 100644 index 0000000..a0ffadd --- /dev/null +++ b/packages/glibc/2.15/990-try-link-static.patch @@ -0,0 +1,171 @@ +[Patch modified to apply to 2.15] + +commit 07037eeb43ca1e0ac2802e3a1492cecf869c63c6 +Author: Joseph Myers +Date: Thu Mar 8 00:17:27 2012 +0000 + + Fix .ctors/.dtors header configure test for bootstrapping. + +diff -urpN glibc-2.15.orig/aclocal.m4 glibc-2.15/aclocal.m4 +--- glibc-2.15.orig/aclocal.m4 2017-02-08 11:27:28.445657746 -0800 ++++ glibc-2.15/aclocal.m4 2017-02-08 11:37:25.818463475 -0800 +@@ -114,3 +114,17 @@ AC_CACHE_CHECK(whether $LD is GNU ld, li + [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) + gnu_ld=$libc_cv_prog_ld_gnu + ]) ++ ++dnl Run a static link test with -nostdlib -nostartfiles. ++dnl LIBC_TRY_LINK_STATIC([code], [action-if-true], [action-if-false]) ++AC_DEFUN([LIBC_TRY_LINK_STATIC], ++[cat > conftest.c <&AS_MESSAGE_LOG_FD])], ++ [$2], [$3]) ++rm -f conftest*]) +diff -urpN glibc-2.15.orig/configure glibc-2.15/configure +--- glibc-2.15.orig/configure 2017-02-08 11:27:28.453657802 -0800 ++++ glibc-2.15/configure 2017-02-08 11:47:36.184360147 -0800 +@@ -6147,29 +6147,32 @@ $as_echo_n "checking for .preinit_array/ + if ${libc_cv_initfini_array+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat > conftest.c < conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; } +- then +- if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then +- libc_cv_initfini_array=yes +- else +- libc_cv_initfini_array=no +- fi ++ test $ac_status = 0; }; }; then : ++ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then ++ libc_cv_initfini_array=yes + else + libc_cv_initfini_array=no + fi +- rm -f conftest* ++else ++ libc_cv_initfini_array=no ++fi ++rm -f conftest* ++ + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_initfini_array" >&5 + $as_echo "$libc_cv_initfini_array" >&6; } +@@ -6183,21 +6186,22 @@ if ${libc_cv_ctors_header+:} false; then + $as_echo_n "(cached) " >&6 + else + libc_cv_ctors_header=yes +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++ cat > conftest.c <&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then : + if $READELF -WS conftest$ac_exeext | $AWK ' + { gsub(/\[ */, "[") } + $2 == ".ctors" || $2 == ".dtors" { +@@ -6219,8 +6223,7 @@ else + as_fn_error $? "missing __attribute__ ((constructor)) support??" "$LINENO" 5 + + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f conftest* + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ctors_header" >&5 +diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in +--- glibc-2.15.orig/configure.in 2017-02-08 11:27:28.433657663 -0800 ++++ glibc-2.15/configure.in 2017-02-08 11:46:58.994915812 -0800 +@@ -1439,24 +1439,17 @@ EOF + + AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, + libc_cv_initfini_array, [dnl +- cat > conftest.c <&AS_MESSAGE_LOG_FD]) +- then +- if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then +- libc_cv_initfini_array=yes +- else +- libc_cv_initfini_array=no +- fi ++], ++ [if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then ++ libc_cv_initfini_array=yes + else + libc_cv_initfini_array=no +- fi +- rm -f conftest*]) ++ fi], ++ [libc_cv_initfini_array=no]) ++]) + if test $libc_cv_initfini_array != yes; then + AC_MSG_ERROR([Need linker with .init_array/.fini_array support.]) + fi +@@ -1464,9 +1457,9 @@ EOF + AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer, + libc_cv_ctors_header, [dnl + libc_cv_ctors_header=yes +- AC_TRY_LINK([], [ +-__attribute__ ((constructor)) void ctor (void) { puts("ctor"); } +-__attribute__ ((destructor)) void dtor (void) { puts("dtor"); } ++ LIBC_TRY_LINK_STATIC([ ++__attribute__ ((constructor)) void ctor (void) { asm (""); } ++__attribute__ ((destructor)) void dtor (void) { asm (""); } + ], + [dnl + AS_IF([$READELF -WS conftest$ac_exeext | $AWK ' diff --git a/packages/glibc/2.15/991-builtin_expect.patch b/packages/glibc/2.15/991-builtin_expect.patch new file mode 100644 index 0000000..8a327fa --- /dev/null +++ b/packages/glibc/2.15/991-builtin_expect.patch @@ -0,0 +1,82 @@ +[As applied to 2.15] + +commit 3857022a761ea7251f8e5c0e45d382ebc3e34cf9 +Author: Ulrich Drepper +Date: Sun Jan 8 09:21:09 2012 -0500 + + No need for test for __builtin_expect + +diff -urpN glibc-2.15.orig/configure glibc-2.15/configure +--- glibc-2.15.orig/configure 2017-02-08 12:47:52.580858002 -0800 ++++ glibc-2.15/configure 2017-02-08 13:01:40.682870318 -0800 +@@ -7185,38 +7185,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; + fi + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 +-$as_echo_n "checking for __builtin_expect... " >&6; } +-if ${libc_cv_gcc_builtin_expect+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat > conftest.c <&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; }; then +- libc_cv_gcc_builtin_expect=yes +-else +- libc_cv_gcc_builtin_expect=no +-fi +-rm -f conftest* +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5 +-$as_echo "$libc_cv_gcc_builtin_expect" >&6; } +-if test "$libc_cv_gcc_builtin_expect" = no; then +- as_fn_error $? "support for __builtin_expect needed" "$LINENO" 5 +-fi +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5 + $as_echo_n "checking for __builtin_memset... " >&6; } + if ${libc_cv_gcc_builtin_memset+:} false; then : +diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in +--- glibc-2.15.orig/configure.in 2017-02-08 12:47:52.580858002 -0800 ++++ glibc-2.15/configure.in 2017-02-08 13:01:17.638580410 -0800 +@@ -2098,28 +2098,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; + fi + fi + +-dnl Check whether compiler understands __builtin_expect. +-AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect, +-[cat > conftest.c <&AS_MESSAGE_LOG_FD]); then +- libc_cv_gcc_builtin_expect=yes +-else +- libc_cv_gcc_builtin_expect=no +-fi +-rm -f conftest*]) +-if test "$libc_cv_gcc_builtin_expect" = no; then +- AC_MSG_ERROR([support for __builtin_expect needed]) +-fi +- + AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl + cat > conftest.c <<\EOF + void zero (void *x) diff --git a/packages/glibc/2.15/992-gcc_s-suffix.patch b/packages/glibc/2.15/992-gcc_s-suffix.patch new file mode 100644 index 0000000..6dbc70f --- /dev/null +++ b/packages/glibc/2.15/992-gcc_s-suffix.patch @@ -0,0 +1,108 @@ +[As applied to 2.15] +commit 3a533ca370725b68b516e6b74adf4727d17ed28a +Author: Joseph Myers +Date: Tue Apr 24 10:22:45 2012 +0000 + + Don't handle libgcc_s suffixes. + +diff -urpN glibc-2.15.orig/config.make.in glibc-2.15/config.make.in +--- glibc-2.15.orig/config.make.in 2017-02-08 13:24:23.338055977 -0800 ++++ glibc-2.15/config.make.in 2017-02-08 13:25:21.810625337 -0800 +@@ -50,7 +50,6 @@ have-z-execstack = @libc_cv_z_execstack@ + have-initfini = @libc_cv_have_initfini@ + have-Bgroup = @libc_cv_Bgroup@ + have-as-needed = @libc_cv_as_needed@ +-libgcc_s_suffix = @libc_cv_libgcc_s_suffix@ + need-nopic-initfini = @nopic_initfini@ + with-fp = @with_fp@ + old-glibc-headers = @old_glibc_headers@ +diff -urpN glibc-2.15.orig/configure glibc-2.15/configure +--- glibc-2.15.orig/configure 2017-02-08 13:24:23.346056054 -0800 ++++ glibc-2.15/configure 2017-02-08 13:27:07.327670602 -0800 +@@ -654,7 +654,6 @@ libc_cv_z_execstack + libc_cv_z_combreloc + ASFLAGS_config + libc_cv_as_needed +-libc_cv_libgcc_s_suffix + libc_cv_Bgroup + libc_cv_cc_with_libunwind + VERSIONING +@@ -6465,24 +6464,6 @@ fi + $as_echo "$libc_cv_Bgroup" >&6; } + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcc_s suffix" >&5 +-$as_echo_n "checking for libgcc_s suffix... " >&6; } +-if ${libc_cv_libgcc_s_suffix+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat > conftest.c <&1 >/dev/null \ +- | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'` +- rm -f conftest* +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_libgcc_s_suffix" >&5 +-$as_echo "$libc_cv_libgcc_s_suffix" >&6; } +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed option" >&5 + $as_echo_n "checking for --as-needed option... " >&6; } + if ${libc_cv_as_needed+:} false; then : +@@ -6493,7 +6474,7 @@ int main (void) { return 0; } + EOF + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -fPIC -shared -o conftest.so conftest.c +- -lgcc_s$libc_cv_libgcc_s_suffix -Wl,--as-needed ++ -lgcc_s -Wl,--as-needed + -nostdlib 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in +--- glibc-2.15.orig/configure.in 2017-02-08 13:24:23.346056054 -0800 ++++ glibc-2.15/configure.in 2017-02-08 13:26:44.383441535 -0800 +@@ -1639,20 +1639,6 @@ EOF + rm -f conftest*]) + AC_SUBST(libc_cv_Bgroup) + +- AC_CACHE_CHECK(for libgcc_s suffix, +- libc_cv_libgcc_s_suffix, [dnl +- cat > conftest.c <&1 >/dev/null \ +- | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'` +-changequote([,])dnl +- rm -f conftest*]) +- AC_SUBST(libc_cv_libgcc_s_suffix) +- + AC_CACHE_CHECK(for --as-needed option, + libc_cv_as_needed, [dnl + cat > conftest.c <&AS_MESSAGE_LOG_FD]) + then + libc_cv_as_needed=yes +diff -urpN glibc-2.15.orig/Makeconfig glibc-2.15/Makeconfig +--- glibc-2.15.orig/Makeconfig 2017-02-08 13:24:23.338055977 -0800 ++++ glibc-2.15/Makeconfig 2017-02-08 13:24:31.262132679 -0800 +@@ -565,7 +565,7 @@ endif + ifneq ($(have-as-needed),yes) + libgcc_eh := -lgcc_eh $(libunwind) + else +- libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed ++ libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed + endif + gnulib := -lgcc $(libgcc_eh) + static-gnulib := -lgcc -lgcc_eh $(libunwind) diff --git a/packages/glibc/2.15/999-new-tools.patch b/packages/glibc/2.15/999-new-tools.patch new file mode 100644 index 0000000..e0632a3 --- /dev/null +++ b/packages/glibc/2.15/999-new-tools.patch @@ -0,0 +1,69 @@ +diff -urpN glibc-2.15.orig/configure glibc-2.15/configure +--- glibc-2.15.orig/configure 2012-03-19 07:56:58.000000000 -0700 ++++ glibc-2.15/configure 2017-02-08 00:38:53.578049806 -0800 +@@ -4922,7 +4922,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.4* | 4.[0-9]* ) ++ 3.4* | [4-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -4985,7 +4985,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5112,7 +5112,7 @@ $as_echo_n "checking version of $MAKEINF + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.*) ++ [4-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5172,7 +5172,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in +--- glibc-2.15.orig/configure.in 2012-01-01 04:16:32.000000000 -0800 ++++ glibc-2.15/configure.in 2017-02-08 00:30:47.440841480 -0800 +@@ -1000,11 +1000,11 @@ fi + # These programs are version sensitive. + AC_CHECK_TOOL_PREFIX + AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, +- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], ++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], +@@ -1012,10 +1012,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg + MSGFMT=: aux_missing="$aux_missing msgfmt") + AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], +- [4.*], ++ [[4-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") + AC_CHECK_PROG_VER(SED, sed, --version, +- [GNU sed version \([0-9]*\.[0-9.]*\)], ++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") + diff --git a/packages/glibc/2.15/version.desc b/packages/glibc/2.15/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.15/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.16.0/102-fix-signed-shift-overlow.patch b/packages/glibc/2.16.0/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.16.0/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.16.0/103-dl-openat64-variadic.patch b/packages/glibc/2.16.0/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.16.0/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.16.0/104-unused-variables.patch b/packages/glibc/2.16.0/104-unused-variables.patch new file mode 100644 index 0000000..2a85a0c --- /dev/null +++ b/packages/glibc/2.16.0/104-unused-variables.patch @@ -0,0 +1,157 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + float __cosf(float x) + { + float y[2],z=0.0; +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.16.0/105-misleading-indentation.patch b/packages/glibc/2.16.0/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.16.0/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.16.0/106-dl-open-array-bounds.patch b/packages/glibc/2.16.0/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..a8efe9a --- /dev/null +++ b/packages/glibc/2.16.0/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..3c34e01 --- /dev/null +++ b/packages/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.in ++++ b/configure.in +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.16.0/300-macos-cross-rpcgen.patch b/packages/glibc/2.16.0/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.16.0/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch b/packages/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch new file mode 100644 index 0000000..803ac6f --- /dev/null +++ b/packages/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch @@ -0,0 +1,222 @@ +From 536ae0651b015b1f6140ec01775d4deaacf12c0c Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Mon, 21 Jan 2013 17:41:28 +0100 +Subject: [PATCH] Fix parsing of numeric hosts in gethostbyname_r + +Ported from master, fixes CVE-2015-0235. +--- + nss/Makefile | 2 - + nss/digits_dots.c | 73 +++++++++++++------------------------------------ + nss/getXXbyYY_r.c | 3 ++ + nss/test-digits-dots.c | 38 +++++++++++++++++++++++++ + 4 files changed, 62 insertions(+), 54 deletions(-) + create mode 100644 nss/test-digits-dots.c + +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -38,7 +38,7 @@ install-bin := getent makedb + makedb-modules = xmalloc hash-string + extra-objs += $(makedb-modules:=.o) + +-tests = test-netdb tst-nss-test1 ++tests = test-netdb tst-nss-test1 test-digits-dots + xtests = bug-erange + + include ../Makeconfig +--- a/nss/digits_dots.c ++++ b/nss/digits_dots.c +@@ -46,7 +46,10 @@ __nss_hostname_digits_dots (const char * + { + if (h_errnop) + *h_errnop = NETDB_INTERNAL; +- *result = NULL; ++ if (buffer_size == NULL) ++ *status = NSS_STATUS_TRYAGAIN; ++ else ++ *result = NULL; + return -1; + } + +@@ -83,14 +86,16 @@ __nss_hostname_digits_dots (const char * + } + + size_needed = (sizeof (*host_addr) +- + sizeof (*h_addr_ptrs) + strlen (name) + 1); ++ + sizeof (*h_addr_ptrs) ++ + sizeof (*h_alias_ptr) + strlen (name) + 1); + + if (buffer_size == NULL) + { + if (buflen < size_needed) + { ++ *status = NSS_STATUS_TRYAGAIN; + if (h_errnop != NULL) +- *h_errnop = TRY_AGAIN; ++ *h_errnop = NETDB_INTERNAL; + __set_errno (ERANGE); + goto done; + } +@@ -109,7 +114,7 @@ __nss_hostname_digits_dots (const char * + *buffer_size = 0; + __set_errno (save); + if (h_errnop != NULL) +- *h_errnop = TRY_AGAIN; ++ *h_errnop = NETDB_INTERNAL; + *result = NULL; + goto done; + } +@@ -149,7 +154,9 @@ __nss_hostname_digits_dots (const char * + if (! ok) + { + *h_errnop = HOST_NOT_FOUND; +- if (buffer_size) ++ if (buffer_size == NULL) ++ *status = NSS_STATUS_NOTFOUND; ++ else + *result = NULL; + goto done; + } +@@ -190,7 +197,7 @@ __nss_hostname_digits_dots (const char * + if (buffer_size == NULL) + *status = NSS_STATUS_SUCCESS; + else +- *result = resbuf; ++ *result = resbuf; + goto done; + } + +@@ -201,15 +208,6 @@ __nss_hostname_digits_dots (const char * + + if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':') + { +- const char *cp; +- char *hostname; +- typedef unsigned char host_addr_t[16]; +- host_addr_t *host_addr; +- typedef char *host_addr_list_t[2]; +- host_addr_list_t *h_addr_ptrs; +- size_t size_needed; +- int addr_size; +- + switch (af) + { + default: +@@ -225,7 +223,10 @@ __nss_hostname_digits_dots (const char * + /* This is not possible. We cannot represent an IPv6 address + in an `struct in_addr' variable. */ + *h_errnop = HOST_NOT_FOUND; +- *result = NULL; ++ if (buffer_size == NULL) ++ *status = NSS_STATUS_NOTFOUND; ++ else ++ *result = NULL; + goto done; + + case AF_INET6: +@@ -233,42 +234,6 @@ __nss_hostname_digits_dots (const char * + break; + } + +- size_needed = (sizeof (*host_addr) +- + sizeof (*h_addr_ptrs) + strlen (name) + 1); +- +- if (buffer_size == NULL && buflen < size_needed) +- { +- if (h_errnop != NULL) +- *h_errnop = TRY_AGAIN; +- __set_errno (ERANGE); +- goto done; +- } +- else if (buffer_size != NULL && *buffer_size < size_needed) +- { +- char *new_buf; +- *buffer_size = size_needed; +- new_buf = realloc (*buffer, *buffer_size); +- +- if (new_buf == NULL) +- { +- save = errno; +- free (*buffer); +- __set_errno (save); +- *buffer = NULL; +- *buffer_size = 0; +- *result = NULL; +- goto done; +- } +- *buffer = new_buf; +- } +- +- memset (*buffer, '\0', size_needed); +- +- host_addr = (host_addr_t *) *buffer; +- h_addr_ptrs = (host_addr_list_t *) +- ((char *) host_addr + sizeof (*host_addr)); +- hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs); +- + for (cp = name;; ++cp) + { + if (!*cp) +@@ -281,7 +246,9 @@ __nss_hostname_digits_dots (const char * + if (inet_pton (AF_INET6, name, host_addr) <= 0) + { + *h_errnop = HOST_NOT_FOUND; +- if (buffer_size) ++ if (buffer_size == NULL) ++ *status = NSS_STATUS_NOTFOUND; ++ else + *result = NULL; + goto done; + } +--- /dev/null ++++ b/nss/test-digits-dots.c +@@ -0,0 +1,38 @@ ++/* Copyright (C) 2013 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Testcase for BZ #15014 */ ++ ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ char buf[32]; ++ struct hostent *result = NULL; ++ struct hostent ret; ++ int h_err = 0; ++ int err; ++ ++ err = gethostbyname_r ("1.2.3.4", &ret, buf, sizeof (buf), &result, &h_err); ++ return err == ERANGE && h_err == NETDB_INTERNAL ? EXIT_SUCCESS : EXIT_FAILURE; ++} ++ ++#define TEST_FUNCTION do_test () ++#include "../test-skeleton.c" +--- a/nss/getXXbyYY_r.c ++++ b/nss/getXXbyYY_r.c +@@ -179,6 +179,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L + case -1: + return errno; + case 1: ++#ifdef NEED_H_ERRNO ++ any_service = true; ++#endif + goto done; + } + #endif diff --git a/packages/glibc/2.16.0/920-fix-rpc_parse-format.patch b/packages/glibc/2.16.0/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.16.0/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.16.0/940-nis-bogus-conditional.patch b/packages/glibc/2.16.0/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.16.0/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.16.0/999-new-tools.patch b/packages/glibc/2.16.0/999-new-tools.patch new file mode 100644 index 0000000..e753365 --- /dev/null +++ b/packages/glibc/2.16.0/999-new-tools.patch @@ -0,0 +1,33 @@ +diff -urpN glibc-2.16.0.orig/configure glibc-2.16.0/configure +--- glibc-2.16.0.orig/configure 2012-06-30 12:12:34.000000000 -0700 ++++ glibc-2.16.0/configure 2017-02-08 00:39:03.778150878 -0800 +@@ -4845,7 +4845,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -5032,7 +5032,7 @@ else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 + $as_echo_n "checking version of $SED... " >&6; } +- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.0[2-9]*|3.[1-9]*|[4-9]*) +diff -urpN glibc-2.16.0.orig/configure.in glibc-2.16.0/configure.in +--- glibc-2.16.0.orig/configure.in 2012-06-30 12:12:34.000000000 -0700 ++++ glibc-2.16.0/configure.in 2017-02-08 00:14:07.996446792 -0800 +@@ -940,7 +940,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}g + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/packages/glibc/2.16.0/version.desc b/packages/glibc/2.16.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.16.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..59f95aa --- /dev/null +++ b/packages/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,54 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +index 6ccd9b4..660d148 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -22,7 +22,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -20,7 +20,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + +-- +1.9.4 + diff --git a/packages/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.17/102-fix-signed-shift-overlow.patch b/packages/glibc/2.17/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.17/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.17/103-dl-openat64-variadic.patch b/packages/glibc/2.17/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.17/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.17/104-unused-variables.patch b/packages/glibc/2.17/104-unused-variables.patch new file mode 100644 index 0000000..80e0ff2 --- /dev/null +++ b/packages/glibc/2.17/104-unused-variables.patch @@ -0,0 +1,157 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ + /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ + /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.17/105-misleading-indentation.patch b/packages/glibc/2.17/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.17/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.17/106-dl-open-array-bounds.patch b/packages/glibc/2.17/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..a8efe9a --- /dev/null +++ b/packages/glibc/2.17/106-dl-open-array-bounds.patch @@ -0,0 +1,27 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.17/120-support-make4.patch b/packages/glibc/2.17/120-support-make4.patch new file mode 100644 index 0000000..ca2bae0 --- /dev/null +++ b/packages/glibc/2.17/120-support-make4.patch @@ -0,0 +1,38 @@ +Original patch modified: Removed ChangeLog and NEWS sections, ajdust for configure.in +KS + +From: Marc-Antoine Perennou +Date: Thu, 31 Oct 2013 02:37:50 +0000 (+1000) +Subject: Accept make versions 4.0 and greater +X-Git-Tag: glibc-2.19~556 +X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=28d708c44bc47b56f6551ff285f78edcf61c208a;hp=a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd + +Accept make versions 4.0 and greater +--- + +diff --git a/configure b/configure +index f382138..5e61abd 100755 +--- a/configure ++++ b/configure +@@ -4761,7 +4761,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +diff --git a/configure.in b/configure.in +index 49b70fd..6da8efd 100644 +--- a/configure.in ++++ b/configure.in +@@ -984,7 +984,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/packages/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..3c34e01 --- /dev/null +++ b/packages/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.in ++++ b/configure.in +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.17/300-macos-cross-rpcgen.patch b/packages/glibc/2.17/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.17/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.17/920-fix-rpc_parse-format.patch b/packages/glibc/2.17/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.17/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.17/940-nis-bogus-conditional.patch b/packages/glibc/2.17/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.17/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.17/version.desc b/packages/glibc/2.17/version.desc new file mode 100644 index 0000000..9ac7dc2 --- /dev/null +++ b/packages/glibc/2.17/version.desc @@ -0,0 +1 @@ +# Not obsolete (CentOS 7, EOL 06/2024) diff --git a/packages/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch b/packages/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch new file mode 100644 index 0000000..40e3632 --- /dev/null +++ b/packages/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch @@ -0,0 +1,65 @@ +commit 4f2bcda964d4fff56855e0c66198c9bcb682ea1e +Author: Will Newton +Date: Thu Aug 29 20:10:26 2013 +0100 + + ARM: Fix clone code when built for Thumb. + + The mov lr, pc instruction will lose the Thumb bit from the return address + so use blx lr instead. + + ports/ChangeLog.arm: + + 2013-08-30 Will Newton + + [BZ #15909] + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx + instead of mov lr, pc. + + (cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa) + +diff --git a/NEWS b/NEWS +index b023c30..f64fb82 100644 +--- a/NEWS ++++ b/NEWS +@@ -5,6 +5,12 @@ See the end for copying conditions. + Please send GNU C library bug reports via + using `glibc' in the "product" field. + ++Version 2.18.1 ++ ++* The following bugs are resolved with this release: ++ ++ 15909. ++ + Version 2.18 + + * The following bugs are resolved with this release: +diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm +index 1e7a35c..54debd7 100644 +--- a/ports/ChangeLog.arm ++++ b/ports/ChangeLog.arm +@@ -1,3 +1,9 @@ ++2013-08-30 Will Newton ++ ++ [BZ #15909] ++ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx ++ instead of mov lr, pc. ++ + 2013-07-03 Joseph Myers + + * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST): +diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S +index ce9c2a5..6e74fa7 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/clone.S ++++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S +@@ -93,8 +93,8 @@ PSEUDO_END (__clone) + mov lr, pc + bx ip + #else +- mov lr, pc +- ldr pc, [sp], #8 ++ ldr lr, [sp], #8 ++ blx lr + #endif + + @ and we are done, passing the return value through r0 diff --git a/packages/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.18/102-fix-signed-shift-overlow.patch b/packages/glibc/2.18/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.18/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.18/103-dl-openat64-variadic.patch b/packages/glibc/2.18/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.18/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.18/104-unused-variables.patch b/packages/glibc/2.18/104-unused-variables.patch new file mode 100644 index 0000000..642edb1 --- /dev/null +++ b/packages/glibc/2.18/104-unused-variables.patch @@ -0,0 +1,157 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double diff --git a/packages/glibc/2.18/105-misleading-indentation.patch b/packages/glibc/2.18/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.18/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.18/106-dl-open-array-bounds.patch b/packages/glibc/2.18/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..08a9076 --- /dev/null +++ b/packages/glibc/2.18/106-dl-open-array-bounds.patch @@ -0,0 +1,36 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -211,7 +211,7 @@ dl_open_worker (void *a) + struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); + + if (l) +- call_map = l; ++ call_map = l; + + if (args->nsid == __LM_ID_CALLER) + args->nsid = call_map->l_ns; +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch b/packages/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch new file mode 100644 index 0000000..7ad9fdf --- /dev/null +++ b/packages/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch @@ -0,0 +1,78 @@ +commit 2770d15e7e880821fc586619c59eb45180628e16 +Author: Siddhesh Poyarekar +Date: Thu Oct 3 08:26:21 2013 +0530 + + Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal + + Fixes BZ #15996. + + The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead + of PTHREAD_MUTEX_ROBUST_NORMAL_NP. It has now been replaced by the + already existing convenience macro USE_REQUEUE_PI. + +diff --git a/NEWS b/NEWS +index f64fb82..fb6069d 100644 +--- a/NEWS ++++ b/NEWS +@@ -9,7 +9,7 @@ Version 2.18.1 + + * The following bugs are resolved with this release: + +- 15909. ++ 15909, 15996. + + Version 2.18 + +diff --git a/nptl/ChangeLog b/nptl/ChangeLog +index eae5079..2d78490 100644 +--- a/nptl/ChangeLog ++++ b/nptl/ChangeLog +@@ -1,3 +1,12 @@ ++2013-10-03 Siddhesh Poyarekar ++ ++ [BZ #15996] ++ * pthread_cond_broadcast.c (__pthread_cond_broadcast) ++ [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use ++ USE_REQUEUE_PI. ++ * pthread_cond_signal.c (__pthread_cond_signal) ++ [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise. ++ + 2013-07-23 David S. Miller + + * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment. +diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c +index 0702ec0..7ba9efa 100644 +--- a/nptl/pthread_cond_broadcast.c ++++ b/nptl/pthread_cond_broadcast.c +@@ -63,10 +63,7 @@ __pthread_cond_broadcast (cond) + + #if (defined lll_futex_cmp_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) +- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; +- pi_flag &= mut->__data.__kind; +- +- if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP) ++ if (USE_REQUEUE_PI (mut)) + { + if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX, + &mut->__data.__lock, futex_val, +diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c +index 102d0b3..ffc35dc 100644 +--- a/nptl/pthread_cond_signal.c ++++ b/nptl/pthread_cond_signal.c +@@ -49,14 +49,9 @@ __pthread_cond_signal (cond) + + #if (defined lll_futex_cmp_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) +- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; + pthread_mutex_t *mut = cond->__data.__mutex; + +- /* Do not use requeue for pshared condvars. */ +- if (mut != (void *) ~0l) +- pi_flag &= mut->__data.__kind; +- +- if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0) ++ if (USE_REQUEUE_PI (mut) + /* This can only really fail with a ENOSYS, since nobody can modify + futex while we have the cond_lock. */ + && lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0, diff --git a/packages/glibc/2.18/120-support-make4.patch b/packages/glibc/2.18/120-support-make4.patch new file mode 100644 index 0000000..ca2bae0 --- /dev/null +++ b/packages/glibc/2.18/120-support-make4.patch @@ -0,0 +1,38 @@ +Original patch modified: Removed ChangeLog and NEWS sections, ajdust for configure.in +KS + +From: Marc-Antoine Perennou +Date: Thu, 31 Oct 2013 02:37:50 +0000 (+1000) +Subject: Accept make versions 4.0 and greater +X-Git-Tag: glibc-2.19~556 +X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=28d708c44bc47b56f6551ff285f78edcf61c208a;hp=a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd + +Accept make versions 4.0 and greater +--- + +diff --git a/configure b/configure +index f382138..5e61abd 100755 +--- a/configure ++++ b/configure +@@ -4761,7 +4761,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +diff --git a/configure.in b/configure.in +index 49b70fd..6da8efd 100644 +--- a/configure.in ++++ b/configure.in +@@ -984,7 +984,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/packages/glibc/2.18/130-arm-unwind.patch b/packages/glibc/2.18/130-arm-unwind.patch new file mode 100644 index 0000000..69cc07a --- /dev/null +++ b/packages/glibc/2.18/130-arm-unwind.patch @@ -0,0 +1,48 @@ +diff -urN glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c +--- glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c 2016-09-15 02:30:09.199939478 +0300 +@@ -24,7 +24,7 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2016-09-15 02:29:07.096945862 +0300 +@@ -22,7 +22,7 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2016-09-15 02:29:37.352917115 +0300 +@@ -20,7 +20,7 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + +diff -urN glibc-2.18.orig/sysdeps/gnu/unwind-resume.c glibc-2.18/sysdeps/gnu/unwind-resume.c +--- glibc-2.18.orig/sysdeps/gnu/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/sysdeps/gnu/unwind-resume.c 2016-09-15 02:29:53.376431503 +0300 +@@ -21,7 +21,7 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); diff --git a/packages/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..3c34e01 --- /dev/null +++ b/packages/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.in ++++ b/configure.in +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.18/300-macos-cross-rpcgen.patch b/packages/glibc/2.18/300-macos-cross-rpcgen.patch new file mode 100644 index 0000000..e654644 --- /dev/null +++ b/packages/glibc/2.18/300-macos-cross-rpcgen.patch @@ -0,0 +1,32 @@ +commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 +Author: Jia Liu +Date: Sat Sep 7 00:01:08 2013 +0800 + + sunrpc/rpc/types.h: fix OS X and FreeBSD build problems + + When I build arm-linux-gcc on OS X, I find glibc will get a build error + in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. + For FreeBSD, Add __FreeBSD__ to make it build OK, too. + + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html + URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html + Signed-off-by: Jia Liu + Signed-off-by: Mike Frysinger + +diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h +index 3dca5c4..beded52 100644 +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; diff --git a/packages/glibc/2.18/920-fix-rpc_parse-format.patch b/packages/glibc/2.18/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.18/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.18/940-nis-bogus-conditional.patch b/packages/glibc/2.18/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.18/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.18/version.desc b/packages/glibc/2.18/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.18/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.19/102-fix-signed-shift-overlow.patch b/packages/glibc/2.19/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.19/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.19/103-dl-openat64-variadic.patch b/packages/glibc/2.19/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.19/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.19/104-unused-variables.patch b/packages/glibc/2.19/104-unused-variables.patch new file mode 100644 index 0000000..889c9bb --- /dev/null +++ b/packages/glibc/2.19/104-unused-variables.patch @@ -0,0 +1,178 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double +diff --git a/timezone/private.h b/timezone/private.h +index 4e8f4ae..ed19e06 100644 +--- a/timezone/private.h ++++ b/timezone/private.h +@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); + #define TYPE_SIGNED(type) (((type) -1) < 0) + #endif /* !defined TYPE_SIGNED */ + +-/* The minimum and maximum finite time values. */ +-static time_t const time_t_min = +- (TYPE_SIGNED(time_t) +- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) +- : 0); +-static time_t const time_t_max = +- (TYPE_SIGNED(time_t) +- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) +- : -1); +- + #ifndef INT_STRLEN_MAXIMUM + /* + ** 302 / 1000 is log10(2.0) rounded up. diff --git a/packages/glibc/2.19/105-misleading-indentation.patch b/packages/glibc/2.19/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.19/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.19/106-dl-open-array-bounds.patch b/packages/glibc/2.19/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..08a9076 --- /dev/null +++ b/packages/glibc/2.19/106-dl-open-array-bounds.patch @@ -0,0 +1,36 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -211,7 +211,7 @@ dl_open_worker (void *a) + struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); + + if (l) +- call_map = l; ++ call_map = l; + + if (args->nsid == __LM_ID_CALLER) + args->nsid = call_map->l_ns; +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.19/130-arm-unwind.patch b/packages/glibc/2.19/130-arm-unwind.patch new file mode 100644 index 0000000..69cc07a --- /dev/null +++ b/packages/glibc/2.19/130-arm-unwind.patch @@ -0,0 +1,48 @@ +diff -urN glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c +--- glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c 2016-09-15 02:30:09.199939478 +0300 +@@ -24,7 +24,7 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2016-09-15 02:29:07.096945862 +0300 +@@ -22,7 +22,7 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2016-09-15 02:29:37.352917115 +0300 +@@ -20,7 +20,7 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + +diff -urN glibc-2.18.orig/sysdeps/gnu/unwind-resume.c glibc-2.18/sysdeps/gnu/unwind-resume.c +--- glibc-2.18.orig/sysdeps/gnu/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 ++++ glibc-2.18/sysdeps/gnu/unwind-resume.c 2016-09-15 02:29:53.376431503 +0300 +@@ -21,7 +21,7 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); diff --git a/packages/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.19/910-typedef-caddr.patch b/packages/glibc/2.19/910-typedef-caddr.patch new file mode 100644 index 0000000..e29e810 --- /dev/null +++ b/packages/glibc/2.19/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h +--- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h +--- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/packages/glibc/2.19/920-fix-rpc_parse-format.patch b/packages/glibc/2.19/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.19/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.19/930-explicit-boolean.patch b/packages/glibc/2.19/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc/2.19/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc/2.19/940-nis-bogus-conditional.patch b/packages/glibc/2.19/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.19/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.19/version.desc b/packages/glibc/2.19/version.desc new file mode 100644 index 0000000..f261ea8 --- /dev/null +++ b/packages/glibc/2.19/version.desc @@ -0,0 +1 @@ +# Not obsolete (Ubuntu 14.04, EOL 04/2019) diff --git a/packages/glibc/2.20/100-sparc-nptl.patch b/packages/glibc/2.20/100-sparc-nptl.patch new file mode 100644 index 0000000..21f0337 --- /dev/null +++ b/packages/glibc/2.20/100-sparc-nptl.patch @@ -0,0 +1,14 @@ +diff --git a/sysdeps/sparc/sparc32/sem_trywait.c b/sysdeps/sparc/sparc32/sem_trywait.c +index 7d0fc55..ad9b4ad 100644 +--- a/sysdeps/sparc/sparc32/sem_trywait.c ++++ b/sysdeps/sparc/sparc32/sem_trywait.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include + + + diff --git a/packages/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.20/102-fix-signed-shift-overlow.patch b/packages/glibc/2.20/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.20/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.20/103-dl-openat64-variadic.patch b/packages/glibc/2.20/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.20/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.20/104-unused-variables.patch b/packages/glibc/2.20/104-unused-variables.patch new file mode 100644 index 0000000..889c9bb --- /dev/null +++ b/packages/glibc/2.20/104-unused-variables.patch @@ -0,0 +1,178 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double PIL = 3.1415926535897932384626433832795028841972E0L; + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = 1.0e4000L; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double +diff --git a/timezone/private.h b/timezone/private.h +index 4e8f4ae..ed19e06 100644 +--- a/timezone/private.h ++++ b/timezone/private.h +@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); + #define TYPE_SIGNED(type) (((type) -1) < 0) + #endif /* !defined TYPE_SIGNED */ + +-/* The minimum and maximum finite time values. */ +-static time_t const time_t_min = +- (TYPE_SIGNED(time_t) +- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) +- : 0); +-static time_t const time_t_max = +- (TYPE_SIGNED(time_t) +- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) +- : -1); +- + #ifndef INT_STRLEN_MAXIMUM + /* + ** 302 / 1000 is log10(2.0) rounded up. diff --git a/packages/glibc/2.20/105-misleading-indentation.patch b/packages/glibc/2.20/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.20/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.20/106-dl-open-array-bounds.patch b/packages/glibc/2.20/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..08a9076 --- /dev/null +++ b/packages/glibc/2.20/106-dl-open-array-bounds.patch @@ -0,0 +1,36 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -211,7 +211,7 @@ dl_open_worker (void *a) + struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); + + if (l) +- call_map = l; ++ call_map = l; + + if (args->nsid == __LM_ID_CALLER) + args->nsid = call_map->l_ns; +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.20/910-typedef-caddr.patch b/packages/glibc/2.20/910-typedef-caddr.patch new file mode 100644 index 0000000..fc7979b --- /dev/null +++ b/packages/glibc/2.20/910-typedef-caddr.patch @@ -0,0 +1,15 @@ +diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h +--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 ++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif + diff --git a/packages/glibc/2.20/920-fix-rpc_parse-format.patch b/packages/glibc/2.20/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.20/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.20/930-explicit-boolean.patch b/packages/glibc/2.20/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc/2.20/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc/2.20/940-nis-bogus-conditional.patch b/packages/glibc/2.20/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.20/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.20/version.desc b/packages/glibc/2.20/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.20/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.21/102-fix-signed-shift-overlow.patch b/packages/glibc/2.21/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.21/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.21/103-dl-openat64-variadic.patch b/packages/glibc/2.21/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..fe94b96 --- /dev/null +++ b/packages/glibc/2.21/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert ((oflag & O_CREAT) == 0); + diff --git a/packages/glibc/2.21/104-unused-variables.patch b/packages/glibc/2.21/104-unused-variables.patch new file mode 100644 index 0000000..fd4def0 --- /dev/null +++ b/packages/glibc/2.21/104-unused-variables.patch @@ -0,0 +1,178 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + DIAG_POP_NEEDS_COMMENT; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = LDBL_MAX; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double +diff --git a/timezone/private.h b/timezone/private.h +index 4e8f4ae..ed19e06 100644 +--- a/timezone/private.h ++++ b/timezone/private.h +@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); + #define TYPE_SIGNED(type) (((type) -1) < 0) + #endif /* !defined TYPE_SIGNED */ + +-/* The minimum and maximum finite time values. */ +-static time_t const time_t_min = +- (TYPE_SIGNED(time_t) +- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) +- : 0); +-static time_t const time_t_max = +- (TYPE_SIGNED(time_t) +- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) +- : -1); +- + #ifndef INT_STRLEN_MAXIMUM + /* + ** 302 / 1000 is log10(2.0) rounded up. diff --git a/packages/glibc/2.21/105-misleading-indentation.patch b/packages/glibc/2.21/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.21/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.21/106-dl-open-array-bounds.patch b/packages/glibc/2.21/106-dl-open-array-bounds.patch new file mode 100644 index 0000000..08a9076 --- /dev/null +++ b/packages/glibc/2.21/106-dl-open-array-bounds.patch @@ -0,0 +1,36 @@ +commit 328c44c3670ebf6c1bd790acddce65a12998cd6c +Author: Roland McGrath +Date: Fri Apr 17 12:11:58 2015 -0700 + + Fuller check for invalid NSID in _dl_open. + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 0dbe07f..2d0e082 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -211,7 +211,7 @@ dl_open_worker (void *a) + struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); + + if (l) +- call_map = l; ++ call_map = l; + + if (args->nsid == __LM_ID_CALLER) + args->nsid = call_map->l_ns; +@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); + /* Never allow loading a DSO in a namespace which is empty. Such + direct placements is only causing problems. Also don't allow + loading into a namespace used for auditing. */ +- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) +- && (GL(dl_ns)[nsid]._ns_nloaded == 0 ++ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) ++ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) ++ /* This prevents the [NSID] index expressions from being ++ evaluated, so the compiler won't think that we are ++ accessing an invalid index here in the !SHARED case where ++ DL_NNS is 1 and so any NSID != 0 is invalid. */ ++ || DL_NNS == 1 ++ || GL(dl_ns)[nsid]._ns_nloaded == 0 + || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) + _dl_signal_error (EINVAL, file, NULL, + N_("invalid target namespace in dlmopen()")); diff --git a/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.21/910-typedef-caddr.patch b/packages/glibc/2.21/910-typedef-caddr.patch new file mode 100644 index 0000000..fc7979b --- /dev/null +++ b/packages/glibc/2.21/910-typedef-caddr.patch @@ -0,0 +1,15 @@ +diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h +--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 ++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif + diff --git a/packages/glibc/2.21/920-fix-rpc_parse-format.patch b/packages/glibc/2.21/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.21/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.21/930-explicit-boolean.patch b/packages/glibc/2.21/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc/2.21/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc/2.21/940-nis-bogus-conditional.patch b/packages/glibc/2.21/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.21/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.21/950-dlclose-assert.patch b/packages/glibc/2.21/950-dlclose-assert.patch new file mode 100644 index 0000000..6e2fcff --- /dev/null +++ b/packages/glibc/2.21/950-dlclose-assert.patch @@ -0,0 +1,40 @@ +commit 2bd2cad9e8a410643e80efa0b15f6f2882e1271b +Author: Roland McGrath +Date: Fri Apr 17 14:29:40 2015 -0700 + + Avoid confusing compiler with dynamically impossible statically invalid dereference in _dl_close_worker. + +diff --git a/elf/dl-close.c b/elf/dl-close.c +index cf8f9e0465..412f71d70b 100644 +--- a/elf/dl-close.c ++++ b/elf/dl-close.c +@@ -641,9 +641,16 @@ _dl_close_worker (struct link_map *map) + DL_UNMAP (imap); + + /* Finally, unlink the data structure and free it. */ +- if (imap->l_prev != NULL) +- imap->l_prev->l_next = imap->l_next; +- else ++#if DL_NNS == 1 ++ /* The assert in the (imap->l_prev == NULL) case gives ++ the compiler license to warn that NS points outside ++ the dl_ns array bounds in that case (as nsid != LM_ID_BASE ++ is tantamount to nsid >= DL_NNS). That should be impossible ++ in this configuration, so just assert about it instead. */ ++ assert (nsid == LM_ID_BASE); ++ assert (imap->l_prev != NULL); ++#else ++ if (imap->l_prev == NULL) + { + assert (nsid != LM_ID_BASE); + ns->_ns_loaded = imap->l_next; +@@ -652,6 +659,9 @@ _dl_close_worker (struct link_map *map) + we leave for debuggers to examine. */ + r->r_map = (void *) ns->_ns_loaded; + } ++ else ++#endif ++ imap->l_prev->l_next = imap->l_next; + + --ns->_ns_nloaded; + if (imap->l_next != NULL) diff --git a/packages/glibc/2.21/version.desc b/packages/glibc/2.21/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.21/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.22/100-sparc32-sem_open-missing-include.patch b/packages/glibc/2.22/100-sparc32-sem_open-missing-include.patch new file mode 100644 index 0000000..b481046 --- /dev/null +++ b/packages/glibc/2.22/100-sparc32-sem_open-missing-include.patch @@ -0,0 +1,21 @@ +commit 3f512ca79fda7854da188df0585e71467119206e +Author: Brett Neumeier +Date: Mon Aug 31 15:27:21 2015 -0700 + + Fix non-v9 32-bit sparc build. + + [BZ #18870] + * sysdeps/sparc/sparc32/sem_open.c: Add missing #include + +diff --git a/sysdeps/sparc/sparc32/sem_open.c b/sysdeps/sparc/sparc32/sem_open.c +index 16cb9ad..59df2d7 100644 +--- a/sysdeps/sparc/sparc32/sem_open.c ++++ b/sysdeps/sparc/sparc32/sem_open.c +@@ -29,6 +29,7 @@ + #include + #include + #include "semaphoreP.h" ++#include + #include + + diff --git a/packages/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.22/102-fix-signed-shift-overlow.patch b/packages/glibc/2.22/102-fix-signed-shift-overlow.patch new file mode 100644 index 0000000..ef49f83 --- /dev/null +++ b/packages/glibc/2.22/102-fix-signed-shift-overlow.patch @@ -0,0 +1,98 @@ +commit 5542236837c5c41435f8282ec92799f480c36f18 +Author: Paul Eggert +Date: Tue Jul 21 22:50:29 2015 -0700 + + Port the 0x7efe...feff pattern to GCC 6. + + See Steve Ellcey's bug report in: + https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html + * string/memrchr.c (MEMRCHR): + * string/rawmemchr.c (RAWMEMCHR): + * string/strchr.c (strchr): + * string/strchrnul.c (STRCHRNUL): + Rewrite code to avoid issues with signed shift overflow. + +diff --git a/string/memrchr.c b/string/memrchr.c +index 0c8fd84..86cd5b9 100644 +--- a/string/memrchr.c ++++ b/string/memrchr.c +@@ -96,15 +96,8 @@ MEMRCHR + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/rawmemchr.c b/string/rawmemchr.c +index 05b22be..228ca9d 100644 +--- a/string/rawmemchr.c ++++ b/string/rawmemchr.c +@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- +- if (sizeof (longword) != 4 && sizeof (longword) != 8) +- abort (); +- +-#if LONG_MAX <= LONG_MAX_32_BITS +- magic_bits = 0x7efefeff; +-#else +- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; +-#endif ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchr.c b/string/strchr.c +index 5f90075..f13b2b3 100644 +--- a/string/strchr.c ++++ b/string/strchr.c +@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); +diff --git a/string/strchrnul.c b/string/strchrnul.c +index 2678f1d..daf0b3f 100644 +--- a/string/strchrnul.c ++++ b/string/strchrnul.c +@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ +- switch (sizeof (longword)) +- { +- case 4: magic_bits = 0x7efefeffL; break; +- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; +- default: +- abort (); +- } ++ magic_bits = -1; ++ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); diff --git a/packages/glibc/2.22/103-dl-openat64-variadic.patch b/packages/glibc/2.22/103-dl-openat64-variadic.patch new file mode 100644 index 0000000..302088e --- /dev/null +++ b/packages/glibc/2.22/103-dl-openat64-variadic.patch @@ -0,0 +1,195 @@ +commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 +Author: Joseph Myers +Date: Tue Oct 20 11:54:09 2015 +0000 + + Convert 113 more function definitions to prototype style (files with assertions). + + This mostly automatically-generated patch converts 113 function + definitions in glibc from old-style K&R to prototype-style. Following + my other recent such patches, this one deals with the case of function + definitions in files that either contain assertions or where grep + suggested they might contain assertions - and thus where it isn't + possible to use a simple object code comparison as a sanity check on + the correctness of the patch, because line numbers are changed. + + A few such automatically-generated changes needed to be supplemented + by manual changes for the result to compile. openat64 had a prototype + declaration with "..." but an old-style definition in + sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the + generated prototype in the definition (I've filed + for diagnosing + such cases in GCC; the old state was undefined behavior not requiring + a diagnostic, but one seems a good idea). In addition, as Florian has + noted regparm attribute mismatches between declaration and definition + are only diagnosed for prototype definitions, and five functions + needed internal_function added to their definitions (in the case of + __pthread_mutex_cond_lock, via the macro definition of + __pthread_mutex_lock) to compile on i386. + + After this patch is in, remaining old-style definitions are probably + most readily fixed manually before we can turn on + -Wold-style-definition for all builds. + + Tested for x86_64 and x86 (testsuite). + + * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style + function definition. + * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. + * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. + * debug/backtracesyms.c (__backtrace_symbols): Likewise. + * elf/dl-minimal.c (_itoa): Likewise. + * hurd/hurdmalloc.c (malloc): Likewise. + (free): Likewise. + (realloc): Likewise. + * inet/inet6_option.c (inet6_option_space): Likewise. + (inet6_option_init): Likewise. + (inet6_option_append): Likewise. + (inet6_option_alloc): Likewise. + (inet6_option_next): Likewise. + (inet6_option_find): Likewise. + * io/ftw.c (FTW_NAME): Likewise. + (NFTW_NAME): Likewise. + (NFTW_NEW_NAME): Likewise. + (NFTW_OLD_NAME): Likewise. + * libio/iofwide.c (_IO_fwide): Likewise. + * libio/strops.c (_IO_str_init_static_internal): Likewise. + (_IO_str_init_static): Likewise. + (_IO_str_init_readonly): Likewise. + (_IO_str_overflow): Likewise. + (_IO_str_underflow): Likewise. + (_IO_str_count): Likewise. + (_IO_str_seekoff): Likewise. + (_IO_str_pbackfail): Likewise. + (_IO_str_finish): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + (_IO_wstr_overflow): Likewise. + (_IO_wstr_underflow): Likewise. + (_IO_wstr_count): Likewise. + (_IO_wstr_seekoff): Likewise. + (_IO_wstr_pbackfail): Likewise. + (_IO_wstr_finish): Likewise. + * locale/programs/localedef.c (normalize_codeset): Likewise. + * locale/programs/locarchive.c (add_locale_to_archive): Likewise. + (add_locales_to_archive): Likewise. + (delete_locales_from_archive): Likewise. + * malloc/malloc.c (__libc_mallinfo): Likewise. + * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. + * misc/tsearch.c (__tfind): Likewise. + * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. + * nptl/pthread_attr_getdetachstate.c + (__pthread_attr_getdetachstate): Likewise. + * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): + Likewise. + * nptl/pthread_attr_getinheritsched.c + (__pthread_attr_getinheritsched): Likewise. + * nptl/pthread_attr_getschedparam.c + (__pthread_attr_getschedparam): Likewise. + * nptl/pthread_attr_getschedpolicy.c + (__pthread_attr_getschedpolicy): Likewise. + * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): + Likewise. + * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): + Likewise. + * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): + Likewise. + * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Likewise. + * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. + (__pthread_attr_init_2_0): Likewise. + * nptl/pthread_attr_setdetachstate.c + (__pthread_attr_setdetachstate): Likewise. + * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): + Likewise. + * nptl/pthread_attr_setinheritsched.c + (__pthread_attr_setinheritsched): Likewise. + * nptl/pthread_attr_setschedparam.c + (__pthread_attr_setschedparam): Likewise. + * nptl/pthread_attr_setschedpolicy.c + (__pthread_attr_setschedpolicy): Likewise. + * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): + Likewise. + * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): + Likewise. + * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): + Likewise. + * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): + Likewise. + * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): + Likewise. + * nptl/pthread_create.c (__find_in_stack_list): Likewise. + * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. + * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to + use internal_function. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to + prototype-style function definition. + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. + (__pthread_mutex_cond_lock_adjust): Likewise. Use + internal_function. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): + Convert to prototype-style function definition. + * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): + Likewise. + * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): + Likewise. + (__pthread_mutex_unlock): Likewise. + * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. + * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. + * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. + * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. + * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. + * nss/makedb.c (process_input): Likewise. + * posix/fnmatch.c (__strchrnul): Likewise. + (__wcschrnul): Likewise. + (fnmatch): Likewise. + * posix/fnmatch_loop.c (FCT): Likewise. + * posix/glob.c (globfree): Likewise. + (__glob_pattern_type): Likewise. + (__glob_pattern_p): Likewise. + * posix/regcomp.c (re_compile_pattern): Likewise. + (re_set_syntax): Likewise. + (re_compile_fastmap): Likewise. + (regcomp): Likewise. + (regerror): Likewise. + (regfree): Likewise. + * posix/regexec.c (regexec): Likewise. + (re_match): Likewise. + (re_search): Likewise. + (re_match_2): Likewise. + (re_search_2): Likewise. + (re_search_stub): Likewise. Use internal_function + (re_copy_regs): Likewise. + (re_set_registers): Convert to prototype-style function + definition. + (prune_impossible_nodes): Likewise. Use internal_function. + * resolv/inet_net_pton.c (inet_net_pton): Convert to + prototype-style function definition. + (inet_net_pton_ipv4): Likewise. + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. + * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. + * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. + * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. + Make variadic. + * time/strptime_l.c (localtime_r): Convert to prototype-style + function definition. + * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. + +diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c +index 7d100bb..7eea0ca 100644 +--- a/sysdeps/unix/sysv/linux/dl-openat64.c ++++ b/sysdeps/unix/sysv/linux/dl-openat64.c +@@ -23,10 +23,7 @@ + + + int +-openat64 (dfd, file, oflag) +- int dfd; +- const char *file; +- int oflag; ++openat64 (int dfd, const char *file, int oflag, ...) + { + assert (!__OPEN_NEEDS_MODE (oflag)); + diff --git a/packages/glibc/2.22/104-unused-variables.patch b/packages/glibc/2.22/104-unused-variables.patch new file mode 100644 index 0000000..fd4def0 --- /dev/null +++ b/packages/glibc/2.22/104-unused-variables.patch @@ -0,0 +1,178 @@ +commit 6565fcb6e189d67b5a3f321453daebb805056d73 +Author: Wilco Dijkstra +Date: Fri Sep 18 20:27:20 2015 +0100 + + Fix several build failures with GCC6 due to unused static variables. + + 2015-09-18 Wilco Dijkstra + + * resolv/base64.c (rcsid): Remove unused static. + * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused + static. (tqpi1): Likewise. + * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. + * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. + * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. + * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. + * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. + * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. + * timezone/private.h (time_t_min): Likewise. (time_t_max): + Likewise. + +diff --git a/resolv/base64.c b/resolv/base64.c +index ea584ed..519e5d2 100644 +--- a/resolv/base64.c ++++ b/resolv/base64.c +@@ -40,10 +40,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#if !defined(LINT) && !defined(CODECENTER) +-static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; +-#endif /* not lint */ +- + #include + #include + #include +diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h +index e0d65af..82943f9 100644 +--- a/sysdeps/ieee754/dbl-64/atnat2.h ++++ b/sysdeps/ieee754/dbl-64/atnat2.h +@@ -65,10 +65,8 @@ + /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ + /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ + /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ +-/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ + /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ + /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ + /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ + /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ +@@ -129,10 +127,8 @@ + /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ + /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ + /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ +-/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ + /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ + /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ +-/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ + /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ + /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ + /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ +diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h +index 6817eaf..42b21f2 100644 +--- a/sysdeps/ieee754/dbl-64/uexp.h ++++ b/sysdeps/ieee754/dbl-64/uexp.h +@@ -29,7 +29,7 @@ + + #include "mydefs.h" + +-const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, ++const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, + err_0 = 1.000014, err_1 = 0.000016; + const static int4 bigint = 0x40862002, + badint = 0x40876000,smallint = 0x3C8fffff; +diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h +index c8569a9..b4911e5 100644 +--- a/sysdeps/ieee754/dbl-64/upow.h ++++ b/sysdeps/ieee754/dbl-64/upow.h +@@ -34,7 +34,6 @@ + /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ + /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ + /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ +-/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ + /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ + /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ +@@ -48,7 +47,6 @@ + /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ + /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ + /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ +-/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ + /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ + /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ + /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ +diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c +index 96f0e81..1daeef7 100644 +--- a/sysdeps/ieee754/flt-32/e_log10f.c ++++ b/sysdeps/ieee754/flt-32/e_log10f.c +@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ + log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ + log10_2lo = 7.9034151668e-07; /* 0x355427db */ + +-static const float zero = 0.0; +- + float + __ieee754_log10f(float x) + { +diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c +index 864ab27..0affd40 100644 +--- a/sysdeps/ieee754/flt-32/s_cosf.c ++++ b/sysdeps/ieee754/flt-32/s_cosf.c +@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; + #include + #include + +-static const float one=1.0; +- + #ifndef COSF + # define COSF_FUNC __cosf + #else +diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +index 500aacc..ab5a96e 100644 +--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c ++++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); + static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; + DIAG_POP_NEEDS_COMMENT; + static const long double one = 1.0L; +-static const long double zero = 0.0L; + static const long double huge = LDBL_MAX; + + /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) +diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c +index fa4609f..08c80a3 100644 +--- a/sysdeps/ieee754/ldbl-128/s_erfl.c ++++ b/sysdeps/ieee754/ldbl-128/s_erfl.c +@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) + + static const long double + tiny = 1e-4931L, +- half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ +diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c +index ff759bc..9609550 100644 +--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c ++++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c +@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; + + static const long double sqrth = 0.7071067811865475244008443621048490392848L; + /* ln (2^16384 * (1 - 2^-113)) */ +-static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; + static const long double zero = 0.0L; + + long double +diff --git a/timezone/private.h b/timezone/private.h +index 4e8f4ae..ed19e06 100644 +--- a/timezone/private.h ++++ b/timezone/private.h +@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); + #define TYPE_SIGNED(type) (((type) -1) < 0) + #endif /* !defined TYPE_SIGNED */ + +-/* The minimum and maximum finite time values. */ +-static time_t const time_t_min = +- (TYPE_SIGNED(time_t) +- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) +- : 0); +-static time_t const time_t_max = +- (TYPE_SIGNED(time_t) +- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) +- : -1); +- + #ifndef INT_STRLEN_MAXIMUM + /* + ** 302 / 1000 is log10(2.0) rounded up. diff --git a/packages/glibc/2.22/105-misleading-indentation.patch b/packages/glibc/2.22/105-misleading-indentation.patch new file mode 100644 index 0000000..1dd8d85 --- /dev/null +++ b/packages/glibc/2.22/105-misleading-indentation.patch @@ -0,0 +1,24 @@ +commit 976ef870542580cf5fed896c2c652b3e1a95f9da +Author: Steve Ellcey +Date: Fri Dec 11 09:19:37 2015 -0800 + + Fix indentation. + + * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): + Fix indentation. + +diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +index 0c7685c..392afdb 100644 +--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c ++++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c +@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 + + /* compute q[0],q[1],...q[jk] */ + for (i=0;i<=jk;i++) { +- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; ++ for(j=0,fw=0.0;j<=jx;j++) ++ fw += x[j]*f[jx+i-j]; ++ q[i] = fw; + } + + jz = jk; diff --git a/packages/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch b/packages/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch new file mode 100644 index 0000000..257c5f2 --- /dev/null +++ b/packages/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch @@ -0,0 +1,551 @@ +diff -ruN glibc-2.22.orig/resolv/nss_dns/dns-host.c glibc-2.22/resolv/nss_dns/dns-host.c +--- glibc-2.22.orig/resolv/nss_dns/dns-host.c 2015-08-04 23:42:21.000000000 -0700 ++++ glibc-2.22/resolv/nss_dns/dns-host.c 2016-02-16 13:38:38.000000000 -0800 +@@ -1031,7 +1031,10 @@ + int h_namelen = 0; + + if (ancount == 0) +- return NSS_STATUS_NOTFOUND; ++ { ++ *h_errnop = HOST_NOT_FOUND; ++ return NSS_STATUS_NOTFOUND; ++ } + + while (ancount-- > 0 && cp < end_of_message && had_error == 0) + { +@@ -1208,7 +1211,14 @@ + /* Special case here: if the resolver sent a result but it only + contains a CNAME while we are looking for a T_A or T_AAAA record, + we fail with NOTFOUND instead of TRYAGAIN. */ +- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND; ++ if (canon != NULL) ++ { ++ *h_errnop = HOST_NOT_FOUND; ++ return NSS_STATUS_NOTFOUND; ++ } ++ ++ *h_errnop = NETDB_INTERNAL; ++ return NSS_STATUS_TRYAGAIN; + } + + +@@ -1222,11 +1232,101 @@ + + enum nss_status status = NSS_STATUS_NOTFOUND; + ++ /* Combining the NSS status of two distinct queries requires some ++ compromise and attention to symmetry (A or AAAA queries can be ++ returned in any order). What follows is a breakdown of how this ++ code is expected to work and why. We discuss only SUCCESS, ++ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns ++ that apply (though RETURN and MERGE exist). We make a distinction ++ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable). ++ A recoverable TRYAGAIN is almost always due to buffer size issues ++ and returns ERANGE in errno and the caller is expected to retry ++ with a larger buffer. ++ ++ Lastly, you may be tempted to make significant changes to the ++ conditions in this code to bring about symmetry between responses. ++ Please don't change anything without due consideration for ++ expected application behaviour. Some of the synthesized responses ++ aren't very well thought out and sometimes appear to imply that ++ IPv4 responses are always answer 1, and IPv6 responses are always ++ answer 2, but that's not true (see the implemetnation of send_dg ++ and send_vc to see response can arrive in any order, particlarly ++ for UDP). However, we expect it holds roughly enough of the time ++ that this code works, but certainly needs to be fixed to make this ++ a more robust implementation. ++ ++ ---------------------------------------------- ++ | Answer 1 Status / | Synthesized | Reason | ++ | Answer 2 Status | Status | | ++ |--------------------------------------------| ++ | SUCCESS/SUCCESS | SUCCESS | [1] | ++ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] | ++ | SUCCESS/TRYAGAIN' | SUCCESS | [1] | ++ | SUCCESS/NOTFOUND | SUCCESS | [1] | ++ | SUCCESS/UNAVAIL | SUCCESS | [1] | ++ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] | ++ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] | ++ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] | ++ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] | ++ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] | ++ | TRYAGAIN'/SUCCESS | SUCCESS | [3] | ++ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] | ++ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] | ++ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] | ++ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] | ++ | NOTFOUND/SUCCESS | SUCCESS | [3] | ++ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] | ++ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] | ++ | NOTFOUND/NOTFOUND | NOTFOUND | [3] | ++ | NOTFOUND/UNAVAIL | UNAVAIL | [3] | ++ | UNAVAIL/SUCCESS | UNAVAIL | [4] | ++ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] | ++ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] | ++ | UNAVAIL/NOTFOUND | UNAVAIL | [4] | ++ | UNAVAIL/UNAVAIL | UNAVAIL | [4] | ++ ---------------------------------------------- ++ ++ [1] If the first response is a success we return success. ++ This ignores the state of the second answer and in fact ++ incorrectly sets errno and h_errno to that of the second ++ answer. However because the response is a success we ignore ++ *errnop and *h_errnop (though that means you touched errno on ++ success). We are being conservative here and returning the ++ likely IPv4 response in the first answer as a success. ++ ++ [2] If the first response is a recoverable TRYAGAIN we return ++ that instead of looking at the second response. The ++ expectation here is that we have failed to get an IPv4 response ++ and should retry both queries. ++ ++ [3] If the first response was not a SUCCESS and the second ++ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN, ++ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the ++ result from the second response, otherwise the first responses ++ status is used. Again we have some odd side-effects when the ++ second response is NOTFOUND because we overwrite *errnop and ++ *h_errnop that means that a first answer of NOTFOUND might see ++ its *errnop and *h_errnop values altered. Whether it matters ++ in practice that a first response NOTFOUND has the wrong ++ *errnop and *h_errnop is undecided. ++ ++ [4] If the first response is UNAVAIL we return that instead of ++ looking at the second response. The expectation here is that ++ it will have failed similarly e.g. configuration failure. ++ ++ [5] Testing this code is complicated by the fact that truncated ++ second response buffers might be returned as SUCCESS if the ++ first answer is a SUCCESS. To fix this we add symmetry to ++ TRYAGAIN with the second response. If the second response ++ is a recoverable error we now return TRYAGIN even if the first ++ response was SUCCESS. */ ++ + if (anslen1 > 0) + status = gaih_getanswer_slice(answer1, anslen1, qname, + &pat, &buffer, &buflen, + errnop, h_errnop, ttlp, + &first); ++ + if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND + || (status == NSS_STATUS_TRYAGAIN + /* We want to look at the second answer in case of an +@@ -1242,8 +1342,15 @@ + &pat, &buffer, &buflen, + errnop, h_errnop, ttlp, + &first); ++ /* Use the second response status in some cases. */ + if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND) + status = status2; ++ /* Do not return a truncated second response (unless it was ++ unavoidable e.g. unrecoverable TRYAGAIN). */ ++ if (status == NSS_STATUS_SUCCESS ++ && (status2 == NSS_STATUS_TRYAGAIN ++ && *errnop == ERANGE && *h_errnop != NO_RECOVERY)) ++ status = NSS_STATUS_TRYAGAIN; + } + + return status; +diff -ruN glibc-2.22.orig/resolv/res_query.c glibc-2.22/resolv/res_query.c +--- glibc-2.22.orig/resolv/res_query.c 2015-08-04 23:42:21.000000000 -0700 ++++ glibc-2.22/resolv/res_query.c 2016-02-16 13:38:38.000000000 -0800 +@@ -396,6 +396,7 @@ + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + } +@@ -447,6 +448,7 @@ + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + +@@ -521,6 +523,7 @@ + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + if (saved_herrno != -1) +diff -ruN glibc-2.22.orig/resolv/res_send.c glibc-2.22/resolv/res_send.c +--- glibc-2.22.orig/resolv/res_send.c 2015-08-04 23:42:21.000000000 -0700 ++++ glibc-2.22/resolv/res_send.c 2016-02-16 13:43:59.000000000 -0800 +@@ -1,3 +1,20 @@ ++/* Copyright (C) 2016 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ + /* + * Copyright (c) 1985, 1989, 1993 + * The Regents of the University of California. All rights reserved. +@@ -363,6 +380,8 @@ + #ifdef USE_HOOKS + if (__glibc_unlikely (statp->qhook || statp->rhook)) { + if (anssiz < MAXPACKET && ansp) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *buf = malloc (MAXPACKET); + if (buf == NULL) + return (-1); +@@ -638,6 +657,77 @@ + return (struct sockaddr *) (void *) &statp->nsaddr_list[n]; + } + ++/* The send_vc function is responsible for sending a DNS query over TCP ++ to the nameserver numbered NS from the res_state STATP i.e. ++ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and ++ IPv6 queries at the same serially on the same socket. ++ ++ Please note that for TCP there is no way to disable sending both ++ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP ++ and sends the queries serially and waits for the result after each ++ sent query. This implemetnation should be corrected to honour these ++ options. ++ ++ Please also note that for TCP we send both queries over the same ++ socket one after another. This technically violates best practice ++ since the server is allowed to read the first query, respond, and ++ then close the socket (to service another client). If the server ++ does this, then the remaining second query in the socket data buffer ++ will cause the server to send the client an RST which will arrive ++ asynchronously and the client's OS will likely tear down the socket ++ receive buffer resulting in a potentially short read and lost ++ response data. This will force the client to retry the query again, ++ and this process may repeat until all servers and connection resets ++ are exhausted and then the query will fail. It's not known if this ++ happens with any frequency in real DNS server implementations. This ++ implementation should be corrected to use two sockets by default for ++ parallel queries. ++ ++ The query stored in BUF of BUFLEN length is sent first followed by ++ the query stored in BUF2 of BUFLEN2 length. Queries are sent ++ serially on the same socket. ++ ++ Answers to the query are stored firstly in *ANSP up to a max of ++ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP ++ is non-NULL (to indicate that modifying the answer buffer is allowed) ++ then malloc is used to allocate a new response buffer and ANSCP and ++ ANSP will both point to the new buffer. If more than *ANSSIZP bytes ++ are needed but ANSCP is NULL, then as much of the response as ++ possible is read into the buffer, but the results will be truncated. ++ When truncation happens because of a small answer buffer the DNS ++ packets header feild TC will bet set to 1, indicating a truncated ++ message and the rest of the socket data will be read and discarded. ++ ++ Answers to the query are stored secondly in *ANSP2 up to a max of ++ *ANSSIZP2 bytes, with the actual response length stored in ++ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 ++ is non-NULL (required for a second query) then malloc is used to ++ allocate a new response buffer, *ANSSIZP2 is set to the new buffer ++ size and *ANSP2_MALLOCED is set to 1. ++ ++ The ANSP2_MALLOCED argument will eventually be removed as the ++ change in buffer pointer can be used to detect the buffer has ++ changed and that the caller should use free on the new buffer. ++ ++ Note that the answers may arrive in any order from the server and ++ therefore the first and second answer buffers may not correspond to ++ the first and second queries. ++ ++ It is not supported to call this function with a non-NULL ANSP2 ++ but a NULL ANSCP. Put another way, you can call send_vc with a ++ single unmodifiable buffer or two modifiable buffers, but no other ++ combination is supported. ++ ++ It is the caller's responsibility to free the malloc allocated ++ buffers by detecting that the pointers have changed from their ++ original values i.e. *ANSCP or *ANSP2 has changed. ++ ++ If errors are encountered then *TERRNO is set to an appropriate ++ errno value and a zero result is returned for a recoverable error, ++ and a less-than zero result is returned for a non-recoverable error. ++ ++ If no errors are encountered then *TERRNO is left unmodified and ++ a the length of the first response in bytes is returned. */ + static int + send_vc(res_state statp, + const u_char *buf, int buflen, const u_char *buf2, int buflen2, +@@ -647,11 +737,7 @@ + { + const HEADER *hp = (HEADER *) buf; + const HEADER *hp2 = (HEADER *) buf2; +- u_char *ans = *ansp; +- int orig_anssizp = *anssizp; +- // XXX REMOVE +- // int anssiz = *anssizp; +- HEADER *anhp = (HEADER *) ans; ++ HEADER *anhp = (HEADER *) *ansp; + struct sockaddr *nsap = get_nsaddr (statp, ns); + int truncating, connreset, n; + /* On some architectures compiler might emit a warning indicating +@@ -743,6 +829,8 @@ + * Receive length & response + */ + int recvresp1 = 0; ++ /* Skip the second response if there is no second query. ++ To do that we mark the second response as received. */ + int recvresp2 = buf2 == NULL; + uint16_t rlen16; + read_len: +@@ -779,40 +867,14 @@ + u_char **thisansp; + int *thisresplenp; + if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { ++ /* We have not received any responses ++ yet or we only have one response to ++ receive. */ + thisanssizp = anssizp; + thisansp = anscp ?: ansp; + assert (anscp != NULL || ansp2 == NULL); + thisresplenp = &resplen; + } else { +- if (*anssizp != MAXPACKET) { +- /* No buffer allocated for the first +- reply. We can try to use the rest +- of the user-provided buffer. */ +-#if __GNUC_PREREQ (4, 7) +- DIAG_PUSH_NEEDS_COMMENT; +- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); +-#endif +-#if _STRING_ARCH_unaligned +- *anssizp2 = orig_anssizp - resplen; +- *ansp2 = *ansp + resplen; +-#else +- int aligned_resplen +- = ((resplen + __alignof__ (HEADER) - 1) +- & ~(__alignof__ (HEADER) - 1)); +- *anssizp2 = orig_anssizp - aligned_resplen; +- *ansp2 = *ansp + aligned_resplen; +-#endif +-#if __GNUC_PREREQ (4, 7) +- DIAG_POP_NEEDS_COMMENT; +-#endif +- } else { +- /* The first reply did not fit into the +- user-provided buffer. Maybe the second +- answer will. */ +- *anssizp2 = orig_anssizp; +- *ansp2 = *ansp; +- } +- + thisanssizp = anssizp2; + thisansp = ansp2; + thisresplenp = resplen2; +@@ -820,10 +882,14 @@ + anhp = (HEADER *) *thisansp; + + *thisresplenp = rlen; +- if (rlen > *thisanssizp) { +- /* Yes, we test ANSCP here. If we have two buffers +- both will be allocatable. */ +- if (__glibc_likely (anscp != NULL)) { ++ /* Is the answer buffer too small? */ ++ if (*thisanssizp < rlen) { ++ /* If the current buffer is not the the static ++ user-supplied buffer then we can reallocate ++ it. */ ++ if (thisansp != NULL && thisansp != ansp) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *newp = malloc (MAXPACKET); + if (newp == NULL) { + *terrno = ENOMEM; +@@ -835,6 +901,9 @@ + if (thisansp == ansp2) + *ansp2_malloced = 1; + anhp = (HEADER *) newp; ++ /* A uint16_t can't be larger than MAXPACKET ++ thus it's safe to allocate MAXPACKET but ++ read RLEN bytes instead. */ + len = rlen; + } else { + Dprint(statp->options & RES_DEBUG, +@@ -997,6 +1066,66 @@ + return 1; + } + ++/* The send_dg function is responsible for sending a DNS query over UDP ++ to the nameserver numbered NS from the res_state STATP i.e. ++ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries ++ along with the ability to send the query in parallel for both stacks ++ (default) or serially (RES_SINGLKUP). It also supports serial lookup ++ with a close and reopen of the socket used to talk to the server ++ (RES_SNGLKUPREOP) to work around broken name servers. ++ ++ The query stored in BUF of BUFLEN length is sent first followed by ++ the query stored in BUF2 of BUFLEN2 length. Queries are sent ++ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP). ++ ++ Answers to the query are stored firstly in *ANSP up to a max of ++ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP ++ is non-NULL (to indicate that modifying the answer buffer is allowed) ++ then malloc is used to allocate a new response buffer and ANSCP and ++ ANSP will both point to the new buffer. If more than *ANSSIZP bytes ++ are needed but ANSCP is NULL, then as much of the response as ++ possible is read into the buffer, but the results will be truncated. ++ When truncation happens because of a small answer buffer the DNS ++ packets header feild TC will bet set to 1, indicating a truncated ++ message, while the rest of the UDP packet is discarded. ++ ++ Answers to the query are stored secondly in *ANSP2 up to a max of ++ *ANSSIZP2 bytes, with the actual response length stored in ++ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 ++ is non-NULL (required for a second query) then malloc is used to ++ allocate a new response buffer, *ANSSIZP2 is set to the new buffer ++ size and *ANSP2_MALLOCED is set to 1. ++ ++ The ANSP2_MALLOCED argument will eventually be removed as the ++ change in buffer pointer can be used to detect the buffer has ++ changed and that the caller should use free on the new buffer. ++ ++ Note that the answers may arrive in any order from the server and ++ therefore the first and second answer buffers may not correspond to ++ the first and second queries. ++ ++ It is not supported to call this function with a non-NULL ANSP2 ++ but a NULL ANSCP. Put another way, you can call send_vc with a ++ single unmodifiable buffer or two modifiable buffers, but no other ++ combination is supported. ++ ++ It is the caller's responsibility to free the malloc allocated ++ buffers by detecting that the pointers have changed from their ++ original values i.e. *ANSCP or *ANSP2 has changed. ++ ++ If an answer is truncated because of UDP datagram DNS limits then ++ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to ++ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1 ++ if any progress was made reading a response from the nameserver and ++ is used by the caller to distinguish between ECONNREFUSED and ++ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1). ++ ++ If errors are encountered then *TERRNO is set to an appropriate ++ errno value and a zero result is returned for a recoverable error, ++ and a less-than zero result is returned for a non-recoverable error. ++ ++ If no errors are encountered then *TERRNO is left unmodified and ++ a the length of the first response in bytes is returned. */ + static int + send_dg(res_state statp, + const u_char *buf, int buflen, const u_char *buf2, int buflen2, +@@ -1006,8 +1135,6 @@ + { + const HEADER *hp = (HEADER *) buf; + const HEADER *hp2 = (HEADER *) buf2; +- u_char *ans = *ansp; +- int orig_anssizp = *anssizp; + struct timespec now, timeout, finish; + struct pollfd pfd[1]; + int ptimeout; +@@ -1040,6 +1167,8 @@ + int need_recompute = 0; + int nwritten = 0; + int recvresp1 = 0; ++ /* Skip the second response if there is no second query. ++ To do that we mark the second response as received. */ + int recvresp2 = buf2 == NULL; + pfd[0].fd = EXT(statp).nssocks[ns]; + pfd[0].events = POLLOUT; +@@ -1203,55 +1332,56 @@ + int *thisresplenp; + + if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { ++ /* We have not received any responses ++ yet or we only have one response to ++ receive. */ + thisanssizp = anssizp; + thisansp = anscp ?: ansp; + assert (anscp != NULL || ansp2 == NULL); + thisresplenp = &resplen; + } else { +- if (*anssizp != MAXPACKET) { +- /* No buffer allocated for the first +- reply. We can try to use the rest +- of the user-provided buffer. */ +-#if _STRING_ARCH_unaligned +- *anssizp2 = orig_anssizp - resplen; +- *ansp2 = *ansp + resplen; +-#else +- int aligned_resplen +- = ((resplen + __alignof__ (HEADER) - 1) +- & ~(__alignof__ (HEADER) - 1)); +- *anssizp2 = orig_anssizp - aligned_resplen; +- *ansp2 = *ansp + aligned_resplen; +-#endif +- } else { +- /* The first reply did not fit into the +- user-provided buffer. Maybe the second +- answer will. */ +- *anssizp2 = orig_anssizp; +- *ansp2 = *ansp; +- } +- + thisanssizp = anssizp2; + thisansp = ansp2; + thisresplenp = resplen2; + } + + if (*thisanssizp < MAXPACKET +- /* Yes, we test ANSCP here. If we have two buffers +- both will be allocatable. */ +- && anscp ++ /* If the current buffer is not the the static ++ user-supplied buffer then we can reallocate ++ it. */ ++ && (thisansp != NULL && thisansp != ansp) + #ifdef FIONREAD ++ /* Is the size too small? */ + && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 + || *thisanssizp < *thisresplenp) + #endif + ) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *newp = malloc (MAXPACKET); + if (newp != NULL) { +- *anssizp = MAXPACKET; +- *thisansp = ans = newp; ++ *thisanssizp = MAXPACKET; ++ *thisansp = newp; + if (thisansp == ansp2) + *ansp2_malloced = 1; + } + } ++ /* We could end up with truncation if anscp was NULL ++ (not allowed to change caller's buffer) and the ++ response buffer size is too small. This isn't a ++ reliable way to detect truncation because the ioctl ++ may be an inaccurate report of the UDP message size. ++ Therefore we use this only to issue debug output. ++ To do truncation accurately with UDP we need ++ MSG_TRUNC which is only available on Linux. We ++ can abstract out the Linux-specific feature in the ++ future to detect truncation. */ ++ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) { ++ Dprint(statp->options & RES_DEBUG, ++ (stdout, ";; response may be truncated (UDP)\n") ++ ); ++ } ++ + HEADER *anhp = (HEADER *) *thisansp; + socklen_t fromlen = sizeof(struct sockaddr_in6); + assert (sizeof(from) <= fromlen); diff --git a/packages/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.22/910-typedef-caddr.patch b/packages/glibc/2.22/910-typedef-caddr.patch new file mode 100644 index 0000000..fc7979b --- /dev/null +++ b/packages/glibc/2.22/910-typedef-caddr.patch @@ -0,0 +1,15 @@ +diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h +--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 ++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif + diff --git a/packages/glibc/2.22/920-fix-rpc_parse-format.patch b/packages/glibc/2.22/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.22/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.22/930-explicit-boolean.patch b/packages/glibc/2.22/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc/2.22/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc/2.22/940-nis-bogus-conditional.patch b/packages/glibc/2.22/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.22/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.22/version.desc b/packages/glibc/2.22/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/glibc/2.22/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch new file mode 100644 index 0000000..6fd663a --- /dev/null +++ b/packages/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch @@ -0,0 +1,84 @@ +From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with + -Wparentheses + +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +2.7.4 + diff --git a/packages/glibc/2.23/120-Fix-build-with-enable-static-nss.patch b/packages/glibc/2.23/120-Fix-build-with-enable-static-nss.patch new file mode 100644 index 0000000..59ab087 --- /dev/null +++ b/packages/glibc/2.23/120-Fix-build-with-enable-static-nss.patch @@ -0,0 +1,30 @@ +From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Tue, 24 Jan 2017 10:31:40 -0800 +Subject: [PATCH] Fix build with --enable-static-nss + +* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions + match those around use, to avoid "defined but not used" error. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + nss/nsswitch.c | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/nss/nsswitch.c b/nss/nsswitch.c +index 0a65f6a..8f31658 100644 +--- a/nss/nsswitch.c ++++ b/nss/nsswitch.c +@@ -94,7 +94,7 @@ static name_database *service_table; + static name_database_entry *defconfig_entries; + + +-#ifdef USE_NSCD ++#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) + /* Nonzero if this is the nscd process. */ + static bool is_nscd; + /* The callback passed to the init functions when nscd is used. */ +-- +2.9.3 + diff --git a/packages/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.23/910-typedef-caddr.patch b/packages/glibc/2.23/910-typedef-caddr.patch new file mode 100644 index 0000000..fc7979b --- /dev/null +++ b/packages/glibc/2.23/910-typedef-caddr.patch @@ -0,0 +1,15 @@ +diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h +--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 ++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif + diff --git a/packages/glibc/2.23/920-fix-rpc_parse-format.patch b/packages/glibc/2.23/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.23/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.23/930-explicit-boolean.patch b/packages/glibc/2.23/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc/2.23/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc/2.23/940-nis-bogus-conditional.patch b/packages/glibc/2.23/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.23/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.23/version.desc b/packages/glibc/2.23/version.desc new file mode 100644 index 0000000..4bec49f --- /dev/null +++ b/packages/glibc/2.23/version.desc @@ -0,0 +1 @@ +# Not obsolete (Ubuntu 16.04, EOL 04/21) diff --git a/packages/glibc/2.24/110-sh-fix-gcc6.patch b/packages/glibc/2.24/110-sh-fix-gcc6.patch new file mode 100644 index 0000000..cacf390 --- /dev/null +++ b/packages/glibc/2.24/110-sh-fix-gcc6.patch @@ -0,0 +1,28 @@ +From 279acf7a059f2d2296f690d7f2d886bd0e404f30 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 25 Jan 2017 21:46:53 -0800 +Subject: [PATCH] sh: conditional is false in dl-conflict.c + +... ifdef it out, so that it doesn't create a call to abort(). + +Signed-off-by: Alexey Neyman +--- + sysdeps/sh/dl-machine.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h +index 449deea..2b468af 100644 +--- a/sysdeps/sh/dl-machine.h ++++ b/sysdeps/sh/dl-machine.h +@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + break; + case R_SH_DIR32: + { +-#ifndef RTLD_BOOTSTRAP ++#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP + /* This is defined in rtld.c, but nowhere in the static + libc.a; make the reference weak so static programs can + still link. This declaration cannot be done when +-- +2.9.3 + diff --git a/packages/glibc/2.24/120-Fix-build-with-enable-static-nss.patch b/packages/glibc/2.24/120-Fix-build-with-enable-static-nss.patch new file mode 100644 index 0000000..59ab087 --- /dev/null +++ b/packages/glibc/2.24/120-Fix-build-with-enable-static-nss.patch @@ -0,0 +1,30 @@ +From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Tue, 24 Jan 2017 10:31:40 -0800 +Subject: [PATCH] Fix build with --enable-static-nss + +* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions + match those around use, to avoid "defined but not used" error. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + nss/nsswitch.c | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/nss/nsswitch.c b/nss/nsswitch.c +index 0a65f6a..8f31658 100644 +--- a/nss/nsswitch.c ++++ b/nss/nsswitch.c +@@ -94,7 +94,7 @@ static name_database *service_table; + static name_database_entry *defconfig_entries; + + +-#ifdef USE_NSCD ++#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) + /* Nonzero if this is the nscd process. */ + static bool is_nscd; + /* The callback passed to the init functions when nscd is used. */ +-- +2.9.3 + diff --git a/packages/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.24/910-typedef-caddr.patch b/packages/glibc/2.24/910-typedef-caddr.patch new file mode 100644 index 0000000..fc7979b --- /dev/null +++ b/packages/glibc/2.24/910-typedef-caddr.patch @@ -0,0 +1,15 @@ +diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h +--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 ++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif + diff --git a/packages/glibc/2.24/920-fix-rpc_parse-format.patch b/packages/glibc/2.24/920-fix-rpc_parse-format.patch new file mode 100644 index 0000000..37e58da --- /dev/null +++ b/packages/glibc/2.24/920-fix-rpc_parse-format.patch @@ -0,0 +1,60 @@ +commit 5874510faaf3cbd0bb112aaacab9f225002beed1 +Author: Joseph Myers +Date: Tue Nov 8 23:44:51 2016 +0000 + + Fix rpcgen buffer overrun (bug 20790). + + Building with GCC 7 produces an error building rpcgen: + + rpc_parse.c: In function 'get_prog_declaration': + rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ~~~~^ + rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 + sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + That buffer overrun is for the case where the .x file declares a + program with a million arguments. The strcpy two lines above can + generate a buffer overrun much more simply for a long argument name. + + The limit on length of line read by rpcgen (MAXLINESIZE == 1024) + provides a bound on the buffer size needed, so this patch just changes + the buffer size to MAXLINESIZE to avoid both possible buffer + overruns. A testcase is added that rpcgen does not crash with a + 500-character argument name, where it previously crashed. + + It would not at all surprise me if there are many other ways of + crashing rpcgen with either valid or invalid input; fuzz testing would + likely find various such bugs, though I don't think they are that + important to fix (rpcgen is not that likely to be used with untrusted + .x files as input). (As well as fuzz-findable bugs there are probably + also issues when various int variables get overflowed on very large + input.) The test infrastructure for rpcgen-not-crashing tests would + need extending if tests are to be added for cases where rpcgen should + produce an error, as opposed to cases where it should succeed. + + Tested for x86_64 and x86. + + [BZ #20790] + * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size + to MAXLINESIZE. + * sunrpc/bug20790.x: New file. + * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New + variable. + [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). + [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. + +diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c +index 1a1df6d8c2..505a6554cf 100644 +--- a/sunrpc/rpc_parse.c ++++ b/sunrpc/rpc_parse.c +@@ -521,7 +521,7 @@ static void + get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) + { + token tok; +- char name[10]; /* argument name */ ++ char name[MAXLINESIZE]; /* argument name */ + + if (dkind == DEF_PROGRAM) + { diff --git a/packages/glibc/2.24/930-explicit-boolean.patch b/packages/glibc/2.24/930-explicit-boolean.patch new file mode 100644 index 0000000..780fae6 --- /dev/null +++ b/packages/glibc/2.24/930-explicit-boolean.patch @@ -0,0 +1,33 @@ +commit e223d1fe72e820d96f43831412ab267a1ace04d0 +Author: steve ellcey-CA Eng-Software +Date: Fri Oct 14 12:53:27 2016 -0700 + + Fix warnings from latest GCC. + + * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly + boolean. + +diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c +index 663fa392c2..bd758b5979 100644 +--- a/sysdeps/ieee754/dbl-64/e_pow.c ++++ b/sysdeps/ieee754/dbl-64/e_pow.c +@@ -466,15 +466,15 @@ checkint (double x) + return (n & 1) ? -1 : 1; /* odd or even */ + if (k > 20) + { +- if (n << (k - 20)) ++ if (n << (k - 20) != 0) + return 0; /* if not integer */ +- return (n << (k - 21)) ? -1 : 1; ++ return (n << (k - 21) != 0) ? -1 : 1; + } + if (n) + return 0; /*if not integer */ + if (k == 20) + return (m & 1) ? -1 : 1; +- if (m << (k + 12)) ++ if (m << (k + 12) != 0) + return 0; +- return (m << (k + 11)) ? -1 : 1; ++ return (m << (k + 11) != 0) ? -1 : 1; + } diff --git a/packages/glibc/2.24/940-nis-bogus-conditional.patch b/packages/glibc/2.24/940-nis-bogus-conditional.patch new file mode 100644 index 0000000..09b38cf --- /dev/null +++ b/packages/glibc/2.24/940-nis-bogus-conditional.patch @@ -0,0 +1,62 @@ +commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 +Author: Joseph Myers +Date: Wed Dec 21 23:44:01 2016 +0000 + + Fix nss_nisplus build with mainline GCC (bug 20978). + + glibc build with current mainline GCC fails because + nis/nss_nisplus/nisplus-alias.c contains code + + if (name != NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; + } + + char buf[strlen (name) + 9 + tablename_len]; + + producing an error about strlen being called on a pointer that is + always NULL (and a subsequent use of that pointer with a %s format in + snprintf). + + As Andreas noted, the bogus conditional comes from a 1997 change: + + - if (name == NULL || strlen(name) > 8) + - return NSS_STATUS_NOTFOUND; + - else + + if (name != NULL || strlen(name) <= 8) + + So the intention is clearly to return an error for NULL name. + + This patch duly inverts the sense of the conditional. It fixes the + build with GCC mainline, and passes usual glibc testsuite testing for + x86_64. However, I have not tried any actual substantive nisplus + testing, do not have an environment for such testing, and do not know + whether it is possible that strlen (name) or tablename_len might be + large so that the VLA for buf is actually a security issue. However, + if it is a security issue, there are plenty of other similar instances + in the nisplus code (that haven't been hidden by a bogus comparison + with NULL) - and nis_table.c:__create_ib_request uses strdupa on the + string passed to nis_list, so a local fix in the caller wouldn't + suffice anyway (see bug 20987). (Calls to strdupa and other such + macros that use alloca must be considered equally questionable + regarding stack overflow issues as direct calls to alloca and VLA + declarations.) + + [BZ #20978] + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Compare name == NULL, not name != NULL. + +diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c +index 7f698b4e6d..cb5acce01d 100644 +--- a/nis/nss_nisplus/nisplus-alias.c ++++ b/nis/nss_nisplus/nisplus-alias.c +@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, + return status; + } + +- if (name != NULL) ++ if (name == NULL) + { + *errnop = EINVAL; + return NSS_STATUS_UNAVAIL; diff --git a/packages/glibc/2.24/version.desc b/packages/glibc/2.24/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/glibc/2.25/110-sh-fix-gcc6.patch b/packages/glibc/2.25/110-sh-fix-gcc6.patch new file mode 100644 index 0000000..cacf390 --- /dev/null +++ b/packages/glibc/2.25/110-sh-fix-gcc6.patch @@ -0,0 +1,28 @@ +From 279acf7a059f2d2296f690d7f2d886bd0e404f30 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 25 Jan 2017 21:46:53 -0800 +Subject: [PATCH] sh: conditional is false in dl-conflict.c + +... ifdef it out, so that it doesn't create a call to abort(). + +Signed-off-by: Alexey Neyman +--- + sysdeps/sh/dl-machine.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h +index 449deea..2b468af 100644 +--- a/sysdeps/sh/dl-machine.h ++++ b/sysdeps/sh/dl-machine.h +@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + break; + case R_SH_DIR32: + { +-#ifndef RTLD_BOOTSTRAP ++#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP + /* This is defined in rtld.c, but nowhere in the static + libc.a; make the reference weak so static programs can + still link. This declaration cannot be done when +-- +2.9.3 + diff --git a/packages/glibc/2.25/120-Fix-build-with-enable-static-nss.patch b/packages/glibc/2.25/120-Fix-build-with-enable-static-nss.patch new file mode 100644 index 0000000..59ab087 --- /dev/null +++ b/packages/glibc/2.25/120-Fix-build-with-enable-static-nss.patch @@ -0,0 +1,30 @@ +From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Tue, 24 Jan 2017 10:31:40 -0800 +Subject: [PATCH] Fix build with --enable-static-nss + +* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions + match those around use, to avoid "defined but not used" error. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + nss/nsswitch.c | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/nss/nsswitch.c b/nss/nsswitch.c +index 0a65f6a..8f31658 100644 +--- a/nss/nsswitch.c ++++ b/nss/nsswitch.c +@@ -94,7 +94,7 @@ static name_database *service_table; + static name_database_entry *defconfig_entries; + + +-#ifdef USE_NSCD ++#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) + /* Nonzero if this is the nscd process. */ + static bool is_nscd; + /* The callback passed to the init functions when nscd is used. */ +-- +2.9.3 + diff --git a/packages/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch new file mode 100644 index 0000000..fdc3a60 --- /dev/null +++ b/packages/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch @@ -0,0 +1,49 @@ +From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Wed, 8 Mar 2017 14:31:10 -0800 +Subject: [PATCH] Fix combreloc test with BSD grep + +The test for "-z combreloc" fails when cross-compiling on a machine +that uses BSD grep (e.g. on macos). grep complains about empty +subexpression and exits with non-zero status, which is interpreted +by configure as "not found". As a result, support for "-z combreloc" +(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. + + * configure.ac: Avoid empty subexpression in grep. + +Signed-off-by: Alexey Neyman +--- + ChangeLog | 5 +++++ + configure | 2 +- + configure.ac | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index eecd0ac..0118bd1 100755 +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +diff --git a/configure.ac b/configure.ac +index 4a77411..19f6d87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without + dnl introducing new options this is not easily doable. Instead use a tool + dnl which always is cross-platform: readelf. To detect whether -z combreloc + dnl look for a section named .rel.dyn. +- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then ++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no +-- +2.9.3 + diff --git a/packages/glibc/2.25/910-typedef-caddr.patch b/packages/glibc/2.25/910-typedef-caddr.patch new file mode 100644 index 0000000..fc7979b --- /dev/null +++ b/packages/glibc/2.25/910-typedef-caddr.patch @@ -0,0 +1,15 @@ +diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h +--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 ++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif + diff --git a/packages/glibc/2.25/960-sh4-trap-divdi3.patch b/packages/glibc/2.25/960-sh4-trap-divdi3.patch new file mode 100644 index 0000000..99fad46 --- /dev/null +++ b/packages/glibc/2.25/960-sh4-trap-divdi3.patch @@ -0,0 +1,340 @@ +commit db3d848e154b00071f4a5e729d5884efad410109 +Author: Adhemerval Zanella +Date: Wed Mar 15 15:44:59 2017 -0300 + + Build divdi3 only for architecture that required it + + As noted in [1], divdi3 object is only exported in a handful ABIs + (i386, m68k, powerpc32, s390-32, and ia64), however it is built + for all current architectures regardless. + + This patch refact the make rules for this object to so only the + aforementioned architectures that actually require it builds it. + + Also, to avoid internal PLT calls to the exported symbol from the + module, glibc uses an internal header (symbol-hacks.h) which is + unrequired (and in fact breaks the build for architectures that + intend to get symbol definitions from libgcc.a). The patch also + changes it to create its own header (divdi3-symbol-hacks.h) and + adjust the architectures that require it accordingly. + + I checked the build/check (with run-built-tests=no) on the + following architectures (which I think must cover all supported + ABI/builds) using GCC 6.3: + + aarch64-linux-gnu + alpha-linux-gnu + arm-linux-gnueabihf + hppa-linux-gnu + ia64-linux-gnu + m68k-linux-gnu + microblaze-linux-gnu + mips64-n32-linux-gnu + mips-linux-gnu + mips64-linux-gnu + nios2-linux-gnu + powerpc-linux-gnu + powerpc-linux-gnu-power4 + powerpc64-linux-gnu + powerpc64le-linux-gnu + s390x-linux-gnu + s390-linux-gnu + sh4-linux-gnu + sh4-linux-gnu-soft + sparc64-linux-gnu + sparcv9-linux-gnu + tilegx-linux-gnu + tilegx-linux-gnu-32 + tilepro-linux-gnu + x86_64-linux-gnu + x86_64-linux-gnu-x32 + i686-linux-gnu + + I only saw one regression on sparcv9-linux-gnu (extra PLT call to + .udiv) which I address in next patch in the set. It also correctly + build SH with GCC 7.0.1 (without any regression from c89721e25d). + + [1] https://sourceware.org/ml/libc-alpha/2017-03/msg00243.html + + * sysdeps/i386/symbol-hacks.h: New file. + * sysdeps/m68k/symbol-hacks.h: New file. + * sysdeps/powerpc/powerpc32/symbol-hacks.h: New file. + * sysdeps/s390/s390-32/symbol-hacks.h: New file. + * sysdeps/unix/sysv/linux/i386/Makefile + [$(subdir) = csu] (sysdep_routines): New rule: divdi3 object. + [$(subdir) = csu] (sysdep-only-routines): Likewise. + [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. + * sysdeps/unix/sysv/linux/m68k/Makefile + [$(subdir) = csu] (sysdep_routines): Likewise. + [$(subdir) = csu] (sysdep-only-routines): Likewise. + [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile + [$(subdir) = csu] (sysdep_routines): Likewise. + [$(subdir) = csu] (sysdep-only-routines): Likewise. + [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/Makefile + [$(subdir) = csu] (sysdep_routines): Likewise. + [$(subdir) = csu] (sysdep-only-routines): Likewise. + [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. + * sysdeps/wordsize-32/Makefile: Remove file. + * sysdeps/wordsize-32/symbol-hacks.h: Definitions move to ... + * sysdeps/wordsize-32/divdi3-symbol-hacks.h: ... here. + +diff --git a/sysdeps/i386/symbol-hacks.h b/sysdeps/i386/symbol-hacks.h +new file mode 100644 +index 0000000000..36a13c83f7 +--- /dev/null ++++ b/sysdeps/i386/symbol-hacks.h +@@ -0,0 +1,21 @@ ++/* Hacks needed for symbol manipulation. i386 version. ++ Copyright (C) 2017 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++#include_next "symbol-hacks.h" +diff --git a/sysdeps/m68k/symbol-hacks.h b/sysdeps/m68k/symbol-hacks.h +new file mode 100644 +index 0000000000..e449d29810 +--- /dev/null ++++ b/sysdeps/m68k/symbol-hacks.h +@@ -0,0 +1,21 @@ ++/* Hacks needed for symbol manipulation. m68k version. ++ Copyright (C) 2017 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++#include_next "symbol-hacks.h" +diff --git a/sysdeps/powerpc/powerpc32/symbol-hacks.h b/sysdeps/powerpc/powerpc32/symbol-hacks.h +new file mode 100644 +index 0000000000..dbb3141621 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc32/symbol-hacks.h +@@ -0,0 +1,21 @@ ++/* Hacks needed for symbol manipulation. powerpc version. ++ Copyright (C) 2017 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++#include_next "symbol-hacks.h" +diff --git a/sysdeps/s390/s390-32/symbol-hacks.h b/sysdeps/s390/s390-32/symbol-hacks.h +new file mode 100644 +index 0000000000..585c42365a +--- /dev/null ++++ b/sysdeps/s390/s390-32/symbol-hacks.h +@@ -0,0 +1,21 @@ ++/* Hacks needed for symbol manipulation. s390 version. ++ Copyright (C) 2017 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++#include_next "symbol-hacks.h" +diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile +index 6aac0dfe15..4080b8c966 100644 +--- a/sysdeps/unix/sysv/linux/i386/Makefile ++++ b/sysdeps/unix/sysv/linux/i386/Makefile +@@ -26,6 +26,11 @@ endif + + ifeq ($(subdir),csu) + sysdep-dl-routines += sysdep ++ifeq (yes,$(build-shared)) ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++CPPFLAGS-divdi3.c = -Din_divdi3_c ++endif + endif + + ifeq ($(subdir),nptl) +diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile +index 5c50ce6927..ce1f696a6f 100644 +--- a/sysdeps/unix/sysv/linux/m68k/Makefile ++++ b/sysdeps/unix/sysv/linux/m68k/Makefile +@@ -4,6 +4,11 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX + + ifeq ($(subdir),csu) + sysdep_routines += m68k-helpers ++ifeq (yes,$(build-shared)) ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++CPPFLAGS-divdi3.c = -Din_divdi3_c ++endif + endif + + ifeq ($(subdir),misc) +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile +index 3d6c150582..1f45659ed1 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile +@@ -1,2 +1,10 @@ + # See Makeconfig regarding the use of default-abi. + default-abi := 32 ++ ++ifeq ($(subdir),csu) ++ifeq (yes,$(build-shared)) ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++CPPFLAGS-divdi3.c = -Din_divdi3_c ++endif ++endif +diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile +index da3b3c76b4..fd8cf92633 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile ++++ b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile +@@ -21,3 +21,11 @@ endif + ifeq ($(subdir),stdlib) + sysdep_routines += __makecontext_ret + endif ++ ++ifeq ($(subdir),csu) ++ifeq (yes,$(build-shared)) ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++CPPFLAGS-divdi3.c = -Din_divdi3_c ++endif ++endif +diff --git a/sysdeps/wordsize-32/Makefile b/sysdeps/wordsize-32/Makefile +deleted file mode 100644 +index 82beac44ed..0000000000 +--- a/sysdeps/wordsize-32/Makefile ++++ /dev/null +@@ -1,7 +0,0 @@ +-ifeq ($(subdir),csu) +-ifeq (yes,$(build-shared)) +-sysdep_routines += divdi3 +-shared-only-routines += divdi3 +-CPPFLAGS-divdi3.c = -Din_divdi3_c +-endif +-endif +diff --git a/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/sysdeps/wordsize-32/divdi3-symbol-hacks.h +new file mode 100644 +index 0000000000..6c90cb796d +--- /dev/null ++++ b/sysdeps/wordsize-32/divdi3-symbol-hacks.h +@@ -0,0 +1,31 @@ ++/* Hacks needed for divdi3 symbol manipulation. ++ Copyright (C) 2004-2017 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* A very dirty trick: gcc emits references to __divdi3, __udivdi3, ++ __moddi3, and __umoddi3. These functions are exported and ++ therefore we get PLTs. Unnecessarily so. Changing gcc is a big ++ task which might not be worth it so we play tricks with the ++ assembler. ++ Note: in_divdi3_c is only used to avoid symbol alias on divdi3 ++ build itself. */ ++#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED ++asm ("__divdi3 = __divdi3_internal"); ++asm ("__udivdi3 = __udivdi3_internal"); ++asm ("__moddi3 = __moddi3_internal"); ++asm ("__umoddi3 = __umoddi3_internal"); ++#endif +diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h +deleted file mode 100644 +index 0aec1e0b97..0000000000 +--- a/sysdeps/wordsize-32/symbol-hacks.h ++++ /dev/null +@@ -1,31 +0,0 @@ +-/* Hacks needed for symbol manipulation. +- Copyright (C) 2004-2017 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include_next "symbol-hacks.h" +- +-/* A very dirty trick: gcc emits references to __divdi3, __udivdi3, +- __moddi3, and __umoddi3. These functions are exported and +- therefore we get PLTs. Unnecessarily so. Changing gcc is a big +- task which might not be worth it so we play tricks with the +- assembler. */ +-#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED +-asm ("__divdi3 = __divdi3_internal"); +-asm ("__udivdi3 = __udivdi3_internal"); +-asm ("__moddi3 = __moddi3_internal"); +-asm ("__umoddi3 = __umoddi3_internal"); +-#endif diff --git a/packages/glibc/2.25/961-sparc-extra-plt-call.patch b/packages/glibc/2.25/961-sparc-extra-plt-call.patch new file mode 100644 index 0000000..3781cf0 --- /dev/null +++ b/packages/glibc/2.25/961-sparc-extra-plt-call.patch @@ -0,0 +1,65 @@ +commit bdc543e338281da051b3dc06eae96c330a485ce6 +Author: Adhemerval Zanella +Date: Thu Mar 16 09:15:57 2017 -0300 + + sparc: Fix .udiv plt on libc + + With the removal of divdi3 object from sparcv9-linux-gnu build, its + definition came from libgcc and its functions internall calls .udiv. + Since glibc also exports these symbols for compatibility reasons, it + will end up creating PLT calls internally in libc.so. + + To avoid it, this patch uses the linker option --wrap to replace all + the internal libc.so .udiv calls to the wrapper __wrap_.udiv. Along + with strong alias in the udiv implementations, it makes linker do + local calls. + + Checked on sparcv9-linux-gnu. + + * sysdeps/sparc/sparc32/Makefile (libc.so-gnulib): New rule. + * sysdeps/sparc/sparc32/sparcv8/udiv.S (.udiv): Make a strong_alias + to __wrap_.udiv. + * sysdeps/sparc/sparc32/sparcv9/udiv.S (.udiv): Likewise. + * sysdeps/sparc/sparc32/udiv.S (.udiv): Likewise. + +diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile +index da205898cf..14d6e03c6f 100644 +--- a/sysdeps/sparc/sparc32/Makefile ++++ b/sysdeps/sparc/sparc32/Makefile +@@ -47,3 +47,9 @@ $(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S): $(sysdep_dir)/sparc/sparc32/divrem. + mv -f $@-tmp $@ + + sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/sparc32/%.S) ++ ++# libgcc __divdi3 and __moddi3 uses .udiv and since it is also exported by ++# libc.so linker will create PLTs for the symbol. To avoid it we strong alias ++# the exported libc one to __wrap_.udiv and use linker option --wrap to make any ++# call to .udiv to call the wrapper symbol. ++libc.so-gnulib += -Wl,--wrap=.udiv +diff --git a/sysdeps/sparc/sparc32/sparcv8/udiv.S b/sysdeps/sparc/sparc32/sparcv8/udiv.S +index d71954351e..e9cab4e4ef 100644 +--- a/sysdeps/sparc/sparc32/sparcv8/udiv.S ++++ b/sysdeps/sparc/sparc32/sparcv8/udiv.S +@@ -13,3 +13,4 @@ ENTRY(.udiv) + udiv %o0, %o1, %o0 + + END(.udiv) ++strong_alias (.udiv, __wrap_.udiv) +diff --git a/sysdeps/sparc/sparc32/sparcv9/udiv.S b/sysdeps/sparc/sparc32/sparcv9/udiv.S +index de79899756..368f85ede2 100644 +--- a/sysdeps/sparc/sparc32/sparcv9/udiv.S ++++ b/sysdeps/sparc/sparc32/sparcv9/udiv.S +@@ -15,3 +15,4 @@ ENTRY(.udiv) + udiv %o0, %o1, %o0 + + END(.udiv) ++strong_alias (.udiv, __wrap_.udiv) +diff --git a/sysdeps/sparc/sparc32/udiv.S b/sysdeps/sparc/sparc32/udiv.S +index 8dfff66158..ade0afdf40 100644 +--- a/sysdeps/sparc/sparc32/udiv.S ++++ b/sysdeps/sparc/sparc32/udiv.S +@@ -344,3 +344,4 @@ LOC(got_result): + mov %o2, %o0 + + END(.udiv) ++strong_alias (.udiv, __wrap_.udiv) diff --git a/packages/glibc/2.25/version.desc b/packages/glibc/2.25/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc new file mode 100644 index 0000000..a7fd499 --- /dev/null +++ b/packages/glibc/package.desc @@ -0,0 +1,3 @@ +origin="GNU" +repository="git git://sourceware.org/git/glibc.git" +milestones="2.17 2.20 2.23" diff --git a/packages/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..1a632fe --- /dev/null +++ b/packages/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,72 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/packages/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..ed022be --- /dev/null +++ b/packages/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,25 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig +--- glibc-2.12.1.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.12.1/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/ports-2.12.1/160-manual-no-perl.patch b/packages/glibc/ports-2.12.1/160-manual-no-perl.patch new file mode 100644 index 0000000..2eb5414 --- /dev/null +++ b/packages/glibc/ports-2.12.1/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +If we're using a cvs snapshot which updates the source files, and +perl isn't installed yet, then we can't regen the docs. Not a big +deal, so just whine a little and continue on our merry way. + +http://bugs.gentoo.org/60132 + +diff -durN glibc-2.12.1.orig/manual/Makefile glibc-2.12.1/manual/Makefile +--- glibc-2.12.1.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.12.1/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 +@@ -104,9 +104,14 @@ + libm-err.texi: stamp-libm-err + stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ + $(dir)/libm-test-ulps)) ++ifneq ($(PERL),no) + pwd=`pwd`; \ + $(PERL) $< $$pwd/.. > libm-err-tmp + $(move-if-change) libm-err-tmp libm-err.texi ++else ++ echo "Unable to rebuild math docs, no perl installed" ++ touch libm-err.texi ++endif + touch $@ + + # Generate Texinfo files from the C source for the example programs. diff --git a/packages/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..fb0881d --- /dev/null +++ b/packages/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.12.1.orig/locale/programs/3level.h glibc-2.12.1/locale/programs/3level.h +--- glibc-2.12.1.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.12.1/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/ports-2.12.1/180-resolv-dynamic.patch b/packages/glibc/ports-2.12.1/180-resolv-dynamic.patch new file mode 100644 index 0000000..8f74a53 --- /dev/null +++ b/packages/glibc/ports-2.12.1/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.12.1.orig/resolv/res_libc.c glibc-2.12.1/resolv/res_libc.c +--- glibc-2.12.1.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.12.1/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/ports-2.12.1/190-localedef-mmap.patch b/packages/glibc/ports-2.12.1/190-localedef-mmap.patch new file mode 100644 index 0000000..b24ed80 --- /dev/null +++ b/packages/glibc/ports-2.12.1/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.12.1.orig/locale/programs/locarchive.c glibc-2.12.1/locale/programs/locarchive.c +--- glibc-2.12.1.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.12.1/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/ports-2.12.1/200-fadvise64_64.patch b/packages/glibc/ports-2.12.1/200-fadvise64_64.patch new file mode 100644 index 0000000..a9f10cd --- /dev/null +++ b/packages/glibc/ports-2.12.1/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/ports-2.12.1/220-section-comments.patch b/packages/glibc/ports-2.12.1/220-section-comments.patch new file mode 100644 index 0000000..4d35535 --- /dev/null +++ b/packages/glibc/ports-2.12.1/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.12.1.orig/include/libc-symbols.h glibc-2.12.1/include/libc-symbols.h +--- glibc-2.12.1.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.12.1/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/ports-2.12.1/230-no-inline-gmon.patch b/packages/glibc/ports-2.12.1/230-no-inline-gmon.patch new file mode 100644 index 0000000..594fb79 --- /dev/null +++ b/packages/glibc/ports-2.12.1/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.12.1.orig/sysdeps/generic/initfini.c glibc-2.12.1/sysdeps/generic/initfini.c +--- glibc-2.12.1.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.12.1/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/ports-2.12.1/240-check_native-headers.patch b/packages/glibc/ports-2.12.1/240-check_native-headers.patch new file mode 100644 index 0000000..de0cb5b --- /dev/null +++ b/packages/glibc/ports-2.12.1/240-check_native-headers.patch @@ -0,0 +1,17 @@ +many ports hit this warning: +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' + +snipped from suse + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/glibc/ports-2.12.1/250-fix-pr631.patch b/packages/glibc/ports-2.12.1/250-fix-pr631.patch new file mode 100644 index 0000000..af5b347 --- /dev/null +++ b/packages/glibc/ports-2.12.1/250-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig +--- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 ++++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:13.000000000 +0100 +@@ -531,7 +531,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +diff -durN glibc-2.12.1.orig/elf/Makefile glibc-2.12.1/elf/Makefile +--- glibc-2.12.1.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 ++++ glibc-2.12.1/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 +@@ -146,6 +146,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln diff --git a/packages/glibc/ports-2.12.1/260-assume-pipe2.patch b/packages/glibc/ports-2.12.1/260-assume-pipe2.patch new file mode 100644 index 0000000..b84f882 --- /dev/null +++ b/packages/glibc/ports-2.12.1/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.12.1.orig/socket/have_sock_cloexec.c glibc-2.12.1/socket/have_sock_cloexec.c +--- glibc-2.12.1.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.12.1/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/ports-2.12.1/270-china.patch b/packages/glibc/ports-2.12.1/270-china.patch new file mode 100644 index 0000000..4cde1cf --- /dev/null +++ b/packages/glibc/ports-2.12.1/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.12.1.orig/localedata/locales/zh_TW glibc-2.12.1/localedata/locales/zh_TW +--- glibc-2.12.1.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.12.1/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/ports-2.12.1/280-new-valencian-locale.patch b/packages/glibc/ports-2.12.1/280-new-valencian-locale.patch new file mode 100644 index 0000000..6b46b44 --- /dev/null +++ b/packages/glibc/ports-2.12.1/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.12.1.orig/localedata/SUPPORTED glibc-2.12.1/localedata/SUPPORTED +--- glibc-2.12.1.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.12.1/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.12.1.orig/localedata/locales/ca_ES@valencia glibc-2.12.1/localedata/locales/ca_ES@valencia +--- glibc-2.12.1.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.12.1/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/ports-2.12.1/300-nscd-one-fork.patch b/packages/glibc/ports-2.12.1/300-nscd-one-fork.patch new file mode 100644 index 0000000..27eae51 --- /dev/null +++ b/packages/glibc/ports-2.12.1/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.12.1.orig/nscd/nscd.c glibc-2.12.1/nscd/nscd.c +--- glibc-2.12.1.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.12.1/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..947bb58 --- /dev/null +++ b/packages/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.12.1.orig/elf/rtld.c glibc-2.12.1/elf/rtld.c +--- glibc-2.12.1.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.12.1/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -390,14 +390,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.12.1.orig/include/atomic.h glibc-2.12.1/include/atomic.h +--- glibc-2.12.1.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.12.1/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.12.1.orig/nptl/Makefile glibc-2.12.1/nptl/Makefile +--- glibc-2.12.1.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.12.1/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -264,9 +264,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -425,6 +425,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.12.1.orig/nptl/pthread_barrier_wait.c glibc-2.12.1/nptl/pthread_barrier_wait.c +--- glibc-2.12.1.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.12.1/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile glibc-2.12.1/nptl/sysdeps/pthread/Makefile +--- glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.12.1/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.12.1.orig/stdio-common/Makefile glibc-2.12.1/stdio-common/Makefile +--- glibc-2.12.1.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.12.1/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.12.1.orig/sunrpc/clnt_udp.c glibc-2.12.1/sunrpc/clnt_udp.c +--- glibc-2.12.1.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.12.1/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/ports-2.12.1/330-m68k-sys-user.patch b/packages/glibc/ports-2.12.1/330-m68k-sys-user.patch new file mode 100644 index 0000000..b441691 --- /dev/null +++ b/packages/glibc/ports-2.12.1/330-m68k-sys-user.patch @@ -0,0 +1,97 @@ +copied from kernel as it is sanitized now + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +@@ -1,3 +1,90 @@ ++#ifndef _SYS_USER_H ++#define _SYS_USER_H ++ ++/* Core file format: The core file is written in such a way that gdb ++ can understand it and provide useful information to the user (under ++ linux we use the 'trad-core' bfd). There are quite a number of ++ obstacles to being able to view the contents of the floating point ++ registers, and until these are solved you will not be able to view the ++ contents of them. Actually, you can read in the core file and look at ++ the contents of the user struct to find out what the floating point ++ registers contain. ++ The actual file contents are as follows: ++ UPAGE: 1 page consisting of a user struct that tells gdb what is present ++ in the file. Directly after this is a copy of the task_struct, which ++ is currently not used by gdb, but it may come in useful at some point. ++ All of the registers are stored as part of the upage. The upage should ++ always be only one page. ++ DATA: The data area is stored. We use current->end_text to ++ current->brk to pick up all of the user variables, plus any memory ++ that may have been malloced. No attempt is made to determine if a page ++ is demand-zero or if a page is totally unused, we just cover the entire ++ range. All of the addresses are rounded in such a way that an integral ++ number of pages is written. ++ STACK: We need the stack information in order to get a meaningful ++ backtrace. We need to write the data from (esp) to ++ current->start_stack, so we round each of these off in order to be able ++ to write an integer number of pages. ++ The minimum core file size is 3 pages, or 12288 bytes. ++*/ ++ ++struct user_m68kfp_struct { ++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ ++ unsigned long fpcntl[3]; /* fp control regs */ ++}; ++ ++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and ++ is still the layout used by user (the new pt_regs doesn't have ++ all registers). */ ++struct user_regs_struct { ++ long d1,d2,d3,d4,d5,d6,d7; ++ long a0,a1,a2,a3,a4,a5,a6; ++ long d0; ++ long usp; ++ long orig_d0; ++ short stkadj; ++ short sr; ++ long pc; ++ short fmtvec; ++ short __fill; ++}; ++ ++ ++/* When the kernel dumps core, it starts by dumping the user struct - ++ this will be used by gdb to figure out where the data and stack segments ++ are within the file, and what virtual addresses to use. */ ++struct user{ ++/* We start with the registers, to mimic the way that "memory" is returned ++ from the ptrace(3,...) function. */ ++ struct user_regs_struct regs; /* Where the registers are actually stored */ ++/* ptrace does not yet supply these. Someday.... */ ++ int u_fpvalid; /* True if math co-processor being used. */ ++ /* for this mess. Not yet used. */ ++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ ++/* The rest of this junk is to help gdb figure out what goes where */ ++ unsigned long int u_tsize; /* Text segment size (pages). */ ++ unsigned long int u_dsize; /* Data segment size (pages). */ ++ unsigned long int u_ssize; /* Stack segment size (pages). */ ++ unsigned long start_code; /* Starting virtual address of text. */ ++ unsigned long start_stack; /* Starting virtual address of stack area. ++ This is actually the bottom of the stack, ++ the top of the stack is always found in the ++ esp register. */ ++ long int signal; /* Signal that caused the core dump. */ ++ int reserved; /* No longer used */ ++ struct user_regs_struct *u_ar0; ++ /* Used by gdb to help find the values for */ ++ /* the registers. */ ++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ ++ unsigned long magic; /* To uniquely identify a core file */ ++ char u_comm[32]; /* User command that was responsible */ ++}; ++#define NBPG 4096 ++#define UPAGES 1 ++#define HOST_TEXT_START_ADDR (u.start_code) ++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ++ ++#endif + /* Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc/ports-2.12.1/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.12.1/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..afdb39c --- /dev/null +++ b/packages/glibc/ports-2.12.1/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.12.1.orig/nptl/allocatestack.c glibc-2.12.1/nptl/allocatestack.c +--- glibc-2.12.1.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.12.1/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..3f03169 --- /dev/null +++ b/packages/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.12.1.orig/elf/elf.h glibc-2.12.1/elf/elf.h +--- glibc-2.12.1.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.12.1/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/ports-2.12.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.12.1/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..a847cdb --- /dev/null +++ b/packages/glibc/ports-2.12.1/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.12.1.orig/grp/tst_fgetgrent.sh glibc-2.12.1/grp/tst_fgetgrent.sh +--- glibc-2.12.1.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.12.1/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.12.1.orig/iconvdata/run-iconv-test.sh glibc-2.12.1/iconvdata/run-iconv-test.sh +--- glibc-2.12.1.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.12.1/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.12.1.orig/iconvdata/tst-table.sh glibc-2.12.1/iconvdata/tst-table.sh +--- glibc-2.12.1.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.12.1/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.12.1.orig/intl/tst-codeset.sh glibc-2.12.1/intl/tst-codeset.sh +--- glibc-2.12.1.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.12.1/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.12.1.orig/intl/tst-gettext.sh glibc-2.12.1/intl/tst-gettext.sh +--- glibc-2.12.1.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.12.1/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.12.1.orig/intl/tst-gettext2.sh glibc-2.12.1/intl/tst-gettext2.sh +--- glibc-2.12.1.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.12.1/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.12.1.orig/malloc/tst-mtrace.sh glibc-2.12.1/malloc/tst-mtrace.sh +--- glibc-2.12.1.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.12.1/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.12.1.orig/nptl/tst-tls6.sh glibc-2.12.1/nptl/tst-tls6.sh +--- glibc-2.12.1.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.12.1/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.12.1.orig/posix/globtest.sh glibc-2.12.1/posix/globtest.sh +--- glibc-2.12.1.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.12.1/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.12.1.orig/posix/tst-getconf.sh glibc-2.12.1/posix/tst-getconf.sh +--- glibc-2.12.1.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.12.1/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.12.1.orig/posix/wordexp-tst.sh glibc-2.12.1/posix/wordexp-tst.sh +--- glibc-2.12.1.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.12.1/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/ports-2.12.1/370-fnmatch.patch b/packages/glibc/ports-2.12.1/370-fnmatch.patch new file mode 100644 index 0000000..f345b35 --- /dev/null +++ b/packages/glibc/ports-2.12.1/370-fnmatch.patch @@ -0,0 +1,62 @@ +http://sourceware.org/ml/libc-hacker/2002-11/msg00071.html + +When fnmatch detects an invalid multibyte character it should fall back to +single byte matching, so that "*" has a chance to match such a string. + +Andreas. + +2005-04-12 Andreas Schwab + + * posix/fnmatch.c (fnmatch): If conversion to wide character + fails fall back to single byte matching. + +Index: posix/fnmatch.c +=================================================================== + +diff -durN glibc-2.12.1.orig/posix/fnmatch.c glibc-2.12.1/posix/fnmatch.c +--- glibc-2.12.1.orig/posix/fnmatch.c 2007-07-28 22:35:00.000000000 +0200 ++++ glibc-2.12.1/posix/fnmatch.c 2009-11-13 00:50:39.000000000 +0100 +@@ -327,6 +327,7 @@ + # if HANDLE_MULTIBYTE + if (__builtin_expect (MB_CUR_MAX, 1) != 1) + { ++ const char *orig_pattern = pattern; + mbstate_t ps; + size_t n; + const char *p; +@@ -382,10 +383,8 @@ + wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); + n = mbsrtowcs (wstring, &p, n + 1, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- return -1; ++ /* Something wrong. Fall back to single byte matching. */ ++ goto try_singlebyte; + if (p) + { + memset (&ps, '\0', sizeof (ps)); +@@ -397,10 +396,8 @@ + prepare_wstring: + n = mbsrtowcs (NULL, &string, 0, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- return -1; ++ /* Something wrong. Fall back to single byte matching. */ ++ goto try_singlebyte; + wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); + assert (mbsinit (&ps)); + (void) mbsrtowcs (wstring, &string, n + 1, &ps); +@@ -408,6 +405,9 @@ + + return internal_fnwmatch (wpattern, wstring, wstring + n, + flags & FNM_PERIOD, flags, NULL); ++ ++ try_singlebyte: ++ pattern = orig_pattern; + } + # endif /* mbstate_t and mbsrtowcs or _LIBC. */ + diff --git a/packages/glibc/ports-2.12.1/380-dont-build-timezone.patch b/packages/glibc/ports-2.12.1/380-dont-build-timezone.patch new file mode 100644 index 0000000..0a30436 --- /dev/null +++ b/packages/glibc/ports-2.12.1/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig +--- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/ports-2.12.1/400-alpha-xstat.patch b/packages/glibc/ports-2.12.1/400-alpha-xstat.patch new file mode 100644 index 0000000..97bea98 --- /dev/null +++ b/packages/glibc/ports-2.12.1/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/ports-2.12.1/430-alpha-creat.patch b/packages/glibc/ports-2.12.1/430-alpha-creat.patch new file mode 100644 index 0000000..bfb72d0 --- /dev/null +++ b/packages/glibc/ports-2.12.1/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/ports-2.12.1/440-alpha-cache-shape.patch b/packages/glibc/ports-2.12.1/440-alpha-cache-shape.patch new file mode 100644 index 0000000..ea85e99 --- /dev/null +++ b/packages/glibc/ports-2.12.1/440-alpha-cache-shape.patch @@ -0,0 +1,13 @@ +older verisons of glibc would build dl-sysdep as shared-only and dl-support as +static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of +glibc build dl-sysdep as both shared and static which means we now have symbol +duplication for static builds with dl-sysdep and dl-support. since dl-sysdep +is both shared/static, there is no point in hooking dl-support anymore, so we +can punt it. + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +@@ -1,2 +1,1 @@ +-#include "dl-auxv.h" + #include diff --git a/packages/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch new file mode 100644 index 0000000..6438267 --- /dev/null +++ b/packages/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch @@ -0,0 +1,56 @@ +2006-05-30 Falk Hueffner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture + to ev6 in assembly code. + +{standard input}: Assembler messages: +{standard input}:341: Error: macro requires $at register while noat in effect +{standard input}:374: Error: macro requires $at register while noat in effect +{standard input}:438: Error: macro requires $at register while noat in effect +{standard input}:471: Error: macro requires $at register while noat in effect +make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 + +Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. +I cannot really think of anything better than + + ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +@@ -178,13 +178,13 @@ + static inline void + stb_mb(unsigned char val, unsigned long addr) + { +- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); + } + + static inline void + stw_mb(unsigned short val, unsigned long addr) + { +- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); + } + + static inline void +@@ -356,7 +356,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; + +- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; + } + +@@ -366,7 +366,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; + +- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; + } + +diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc/ports-2.12.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/ports-2.12.1/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..9d35ebd --- /dev/null +++ b/packages/glibc/ports-2.12.1/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch new file mode 100644 index 0000000..621a6f3 --- /dev/null +++ b/packages/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch @@ -0,0 +1,21 @@ +2009-05-26 Aurelien Jarno + + * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). + + ports/sysdeps/alpha/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +@@ -35,7 +35,8 @@ + + ifeq ($(subdir),elf) + # The ld.so startup code cannot use literals until it self-relocates. +-CFLAGS-rtld.c = -mbuild-constants ++# It uses more than 64k for the small data area. ++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) + endif + + # Build everything with full IEEE math support, and with dynamic rounding; +diff -durN glibc-2.12.1.orig/ports/sysdeps/alpha/Makefile glibc-2.12.1/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc/ports-2.12.1/560-ppc-atomic.patch b/packages/glibc/ports-2.12.1/560-ppc-atomic.patch new file mode 100644 index 0000000..679ef18 --- /dev/null +++ b/packages/glibc/ports-2.12.1/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/bits/atomic.h +--- glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.12.1/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch new file mode 100644 index 0000000..fc42a92 --- /dev/null +++ b/packages/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -0,0 +1,374 @@ +http://yann.poupet.free.fr/ep93xx/ +Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +@@ -12,7 +12,7 @@ + /* FPA floating point units are always big-endian, irrespective of the + CPU endianness. VFP floating point units use the same endianness + as the rest of the system. */ +-#ifdef __VFP_FP__ ++#if defined __VFP_FP__ || defined __MAVERICK__ + #define __FLOAT_WORD_ORDER __BYTE_ORDER + #else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -30,7 +30,33 @@ + movs r0, r1 /* get the return value in place */ + moveq r0, #1 /* can't let setjmp() return zero! */ + ++#ifdef __MAVERICK__ ++ cfldrd mvd4, [ip], #8 ++ nop ++ cfldrd mvd5, [ip], #8 ++ nop ++ cfldrd mvd6, [ip], #8 ++ nop ++ cfldrd mvd7, [ip], #8 ++ nop ++ cfldrd mvd8, [ip], #8 ++ nop ++ cfldrd mvd9, [ip], #8 ++ nop ++ cfldrd mvd10, [ip], #8 ++ nop ++ cfldrd mvd11, [ip], #8 ++ nop ++ cfldrd mvd12, [ip], #8 ++ nop ++ cfldrd mvd13, [ip], #8 ++ nop ++ cfldrd mvd14, [ip], #8 ++ nop ++ cfldrd mvd15, [ip], #8 ++#else + lfmfd f4, 4, [ip] ! /* load the floating point regs */ ++#endif + + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) + END (__longjmp) +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +@@ -20,6 +20,45 @@ + # error "Never use directly; include instead." + #endif + ++#if defined(__MAVERICK__) ++ ++/* Define bits representing exceptions in the FPU status word. */ ++enum ++ { ++ FE_INVALID = 1, ++#define FE_INVALID FE_INVALID ++ FE_OVERFLOW = 4, ++#define FE_OVERFLOW FE_OVERFLOW ++ FE_UNDERFLOW = 8, ++#define FE_UNDERFLOW FE_UNDERFLOW ++ FE_INEXACT = 16, ++#define FE_INEXACT FE_INEXACT ++ }; ++ ++/* Amount to shift by to convert an exception to a mask bit. */ ++#define FE_EXCEPT_SHIFT 5 ++ ++/* All supported exceptions. */ ++#define FE_ALL_EXCEPT \ ++ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++ ++/* IEEE rounding modes. */ ++enum ++ { ++ FE_TONEAREST = 0, ++#define FE_TONEAREST FE_TONEAREST ++ FE_TOWARDZERO = 0x400, ++#define FE_TOWARDZERO FE_TOWARDZERO ++ FE_DOWNWARD = 0x800, ++#define FE_DOWNWARD FE_DOWNWARD ++ FE_UPWARD = 0xc00, ++#define FE_UPWARD FE_UPWARD ++ }; ++ ++#define FE_ROUND_MASK (FE_UPWARD) ++ ++#else /* FPA */ ++ + /* Define bits representing exceptions in the FPU status word. */ + enum + { +@@ -44,6 +83,8 @@ + modes exist, but you have to encode them in the actual instruction. */ + #define FE_TONEAREST 0 + ++#endif ++ + /* Type representing exception flags. */ + typedef unsigned long int fexcept_t; + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +@@ -28,7 +28,11 @@ + #ifndef _ASM + /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ ++#ifdef __MAVERICK__ ++typedef int __jmp_buf[34]; ++#else + typedef int __jmp_buf[22]; + #endif ++#endif + + #endif +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,9 +18,21 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fegetround (void) + { ++#if defined(__MAVERICK__) ++ ++ unsigned long temp; ++ ++ _FPU_GETCW (temp); ++ return temp & FE_ROUND_MASK; ++ ++#else /* FPA */ ++ + return FE_TONEAREST; /* Easy. :-) */ ++ ++#endif + } +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,12 +18,28 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fesetround (int round) + { ++#if defined(__MAVERICK__) ++ unsigned long temp; ++ ++ if (round & ~FE_ROUND_MASK) ++ return 1; ++ ++ _FPU_GETCW (temp); ++ temp = (temp & ~FE_ROUND_MASK) | round; ++ _FPU_SETCW (temp); ++ return 0; ++ ++#else /* FPA */ ++ + /* We only support FE_TONEAREST, so there is no need for any work. */ + return (round == FE_TONEAREST)?0:1; ++ ++#endif + } + + libm_hidden_def (fesetround) +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +@@ -1,5 +1,6 @@ + /* FPU control word definitions. ARM version. +- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. ++ Copyright (C) 1996, 1997, 1998, 2000, 2005 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,6 +21,79 @@ + #ifndef _FPU_CONTROL_H + #define _FPU_CONTROL_H + ++#if defined(__MAVERICK__) ++ ++/* DSPSC register: (from EP9312 User's Guide) ++ * ++ * bits 31..29 - DAID ++ * bits 28..26 - HVID ++ * bits 25..24 - RSVD ++ * bit 23 - ISAT ++ * bit 22 - UI ++ * bit 21 - INT ++ * bit 20 - AEXC ++ * bits 19..18 - SAT ++ * bits 17..16 - FCC ++ * bit 15 - V ++ * bit 14 - FWDEN ++ * bit 13 - Invalid ++ * bit 12 - Denorm ++ * bits 11..10 - RM ++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE ++ * bits 4..0 - IX, UF, OF, RSVD, IO ++ */ ++ ++/* masking of interrupts */ ++#define _FPU_MASK_IM (1 << 5) /* invalid operation */ ++#define _FPU_MASK_ZM 0 /* divide by zero */ ++#define _FPU_MASK_OM (1 << 7) /* overflow */ ++#define _FPU_MASK_UM (1 << 8) /* underflow */ ++#define _FPU_MASK_PM (1 << 9) /* inexact */ ++#define _FPU_MASK_DM 0 /* denormalized operation */ ++ ++#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ ++ ++#define _FPU_DEFAULT 0x00b00000 /* Default value. */ ++#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ ++ ++/* Type of the control word. */ ++typedef unsigned int fpu_control_t; ++ ++/* Macros for accessing the hardware control word. */ ++#define _FPU_GETCW(cw) ({ \ ++ register int __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv32sc mvdx0, dspsc\n\t" \ ++ "cfmvr64l %0, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ ++ ); \ ++}) ++ ++#define _FPU_SETCW(cw) ({ \ ++ register int __t0, __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %0\n\t" \ ++ "cfmvsc32 dspsc, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ ++ : "0" (cw) \ ++ ); \ ++}) ++ ++/* Default control word set at startup. */ ++extern fpu_control_t __fpu_control; ++ ++#else /* FPA */ ++ + /* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only +@@ -99,4 +173,6 @@ + /* Default control word set at startup. */ + extern fpu_control_t __fpu_control; + ++#endif ++ + #endif /* _FPU_CONTROL_H */ +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,4 +17,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define __JMP_BUF_SP 32 ++#else + #define __JMP_BUF_SP 20 ++#endif +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -24,11 +24,41 @@ + + ENTRY (__sigsetjmp) + /* Save registers */ ++#ifdef __MAVERICK__ ++ cfstrd mvd4, [r0], #8 ++ nop ++ cfstrd mvd5, [r0], #8 ++ nop ++ cfstrd mvd6, [r0], #8 ++ nop ++ cfstrd mvd7, [r0], #8 ++ nop ++ cfstrd mvd8, [r0], #8 ++ nop ++ cfstrd mvd9, [r0], #8 ++ nop ++ cfstrd mvd10, [r0], #8 ++ nop ++ cfstrd mvd11, [r0], #8 ++ nop ++ cfstrd mvd12, [r0], #8 ++ nop ++ cfstrd mvd13, [r0], #8 ++ nop ++ cfstrd mvd14, [r0], #8 ++ nop ++ cfstrd mvd15, [r0], #8 ++#else + sfmea f4, 4, [r0]! ++#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Restore pointer to jmp_buf */ ++#ifdef __MAVERICK__ ++ sub r0, r0, #96 ++#else + sub r0, r0, #48 ++#endif + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,6 +17,10 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define FIRST_PSEUDO_REGISTER 43 ++#else + #define FIRST_PSEUDO_REGISTER 27 ++#endif + + #include +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +@@ -29,7 +29,7 @@ + #if defined(__ARMEB__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 1 +-#elif defined(__VFP_FP__) ++#elif defined(__VFP_FP__) || defined(__MAVERICK__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 0 + #else +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.12.1/ports/sysdeps/arm/bits/endian.h +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/__longjmp.S +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/fenv.h +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/setjmp.h +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fegetround.c +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fesetround.c +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/ports/sysdeps/arm/fpu/fpu_control.h +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/setjmp.S +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.12.1/ports/sysdeps/arm/gccframe.h +diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.12.1/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc/ports-2.12.1/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.12.1/580-nptl-lowlevellock.patch new file mode 100644 index 0000000..c243a76 --- /dev/null +++ b/packages/glibc/ports-2.12.1/580-nptl-lowlevellock.patch @@ -0,0 +1,23 @@ +fix build error on arm like on hppa: + +arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include /* Need THREAD_*, and header.*. */ + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 +diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc/ports-2.12.1/610-fpu-cw-mips.patch b/packages/glibc/ports-2.12.1/610-fpu-cw-mips.patch new file mode 100644 index 0000000..7d990de --- /dev/null +++ b/packages/glibc/ports-2.12.1/610-fpu-cw-mips.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html + +diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h +--- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +@@ -86,7 +86,7 @@ + #define _FPU_RC_UP 0x2 + #define _FPU_RC_DOWN 0x3 + +-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ ++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ + + + /* The fdlibm code requires strict IEEE double precision arithmetic, +diff -durN glibc-2.12.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.12.1/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..f6a5eb6 --- /dev/null +++ b/packages/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.12.1.orig/elf/dl-lookup.c glibc-2.12.1/elf/dl-lookup.c +--- glibc-2.12.1.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.12.1/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/ports-2.12.1/640-alpha-atfcts.patch b/packages/glibc/ports-2.12.1/640-alpha-atfcts.patch new file mode 100644 index 0000000..90a9d0d --- /dev/null +++ b/packages/glibc/ports-2.12.1/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/ports-2.12.1/650-syslog.patch b/packages/glibc/ports-2.12.1/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/ports-2.12.1/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/ports-2.12.1/670-support-hard-float-eabi.patch b/packages/glibc/ports-2.12.1/670-support-hard-float-eabi.patch new file mode 100644 index 0000000..3f2bc0f --- /dev/null +++ b/packages/glibc/ports-2.12.1/670-support-hard-float-eabi.patch @@ -0,0 +1,22 @@ +diff -ur glibc-2.12.1/ports/sysdeps/arm/preconfigure glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure +--- glibc-2.12.1/ports/sysdeps/arm/preconfigure 2017-03-07 15:33:56.410265000 -0700 ++++ glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:34:42.016840000 -0700 +@@ -2,7 +2,7 @@ + arm*) + base_machine=arm + case $config_os in +- linux-gnueabi) ++ linux-gnueabi*) + machine=arm/eabi/$machine + ;; + *) +diff -ur glibc-2.12.1/ports/sysdeps/arm/shlib-versions glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions +--- glibc-2.12.1/ports/sysdeps/arm/shlib-versions 2017-03-07 15:33:56.439267000 -0700 ++++ glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:34:42.018837000 -0700 +@@ -1,4 +1,4 @@ +-arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 ++arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 + +-arm.*-.*-linux-gnueabi ld=ld-linux.so.3 ++arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 + arm.*-.*-linux.* ld=ld-linux.so.2 diff --git a/packages/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..1a632fe --- /dev/null +++ b/packages/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,72 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/packages/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/ports-2.13/160-manual-no-perl.patch b/packages/glibc/ports-2.13/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/ports-2.13/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +If we're using a cvs snapshot which updates the source files, and +perl isn't installed yet, then we can't regen the docs. Not a big +deal, so just whine a little and continue on our merry way. + +http://bugs.gentoo.org/60132 + +diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 +@@ -104,9 +104,14 @@ + libm-err.texi: stamp-libm-err + stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ + $(dir)/libm-test-ulps)) ++ifneq ($(PERL),no) + pwd=`pwd`; \ + $(PERL) $< $$pwd/.. > libm-err-tmp + $(move-if-change) libm-err-tmp libm-err.texi ++else ++ echo "Unable to rebuild math docs, no perl installed" ++ touch libm-err.texi ++endif + touch $@ + + # Generate Texinfo files from the C source for the example programs. diff --git a/packages/glibc/ports-2.13/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.13/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/ports-2.13/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/ports-2.13/180-resolv-dynamic.patch b/packages/glibc/ports-2.13/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/ports-2.13/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/ports-2.13/190-localedef-mmap.patch b/packages/glibc/ports-2.13/190-localedef-mmap.patch new file mode 100644 index 0000000..f3914cd --- /dev/null +++ b/packages/glibc/ports-2.13/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c +--- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/ports-2.13/200-fadvise64_64.patch b/packages/glibc/ports-2.13/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/ports-2.13/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/ports-2.13/220-section-comments.patch b/packages/glibc/ports-2.13/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/ports-2.13/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/ports-2.13/230-no-inline-gmon.patch b/packages/glibc/ports-2.13/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/ports-2.13/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/ports-2.13/240-check_native-headers.patch b/packages/glibc/ports-2.13/240-check_native-headers.patch new file mode 100644 index 0000000..c936f71 --- /dev/null +++ b/packages/glibc/ports-2.13/240-check_native-headers.patch @@ -0,0 +1,17 @@ +many ports hit this warning: +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' + +snipped from suse + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/glibc/ports-2.13/250-fix-pr631.patch b/packages/glibc/ports-2.13/250-fix-pr631.patch new file mode 100644 index 0000000..a48912e --- /dev/null +++ b/packages/glibc/ports-2.13/250-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:13.000000000 +0100 +@@ -531,7 +531,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +diff -durN glibc-2.13.orig/elf/Makefile glibc-2.13/elf/Makefile +--- glibc-2.13.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 ++++ glibc-2.13/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 +@@ -146,6 +146,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln diff --git a/packages/glibc/ports-2.13/260-assume-pipe2.patch b/packages/glibc/ports-2.13/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/ports-2.13/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/ports-2.13/270-china.patch b/packages/glibc/ports-2.13/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/ports-2.13/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/ports-2.13/280-new-valencian-locale.patch b/packages/glibc/ports-2.13/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/ports-2.13/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/ports-2.13/300-nscd-one-fork.patch b/packages/glibc/ports-2.13/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/ports-2.13/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/ports-2.13/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.13/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/ports-2.13/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/ports-2.13/330-m68k-sys-user.patch b/packages/glibc/ports-2.13/330-m68k-sys-user.patch new file mode 100644 index 0000000..191e0c6 --- /dev/null +++ b/packages/glibc/ports-2.13/330-m68k-sys-user.patch @@ -0,0 +1,97 @@ +copied from kernel as it is sanitized now + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +@@ -1,3 +1,90 @@ ++#ifndef _SYS_USER_H ++#define _SYS_USER_H ++ ++/* Core file format: The core file is written in such a way that gdb ++ can understand it and provide useful information to the user (under ++ linux we use the 'trad-core' bfd). There are quite a number of ++ obstacles to being able to view the contents of the floating point ++ registers, and until these are solved you will not be able to view the ++ contents of them. Actually, you can read in the core file and look at ++ the contents of the user struct to find out what the floating point ++ registers contain. ++ The actual file contents are as follows: ++ UPAGE: 1 page consisting of a user struct that tells gdb what is present ++ in the file. Directly after this is a copy of the task_struct, which ++ is currently not used by gdb, but it may come in useful at some point. ++ All of the registers are stored as part of the upage. The upage should ++ always be only one page. ++ DATA: The data area is stored. We use current->end_text to ++ current->brk to pick up all of the user variables, plus any memory ++ that may have been malloced. No attempt is made to determine if a page ++ is demand-zero or if a page is totally unused, we just cover the entire ++ range. All of the addresses are rounded in such a way that an integral ++ number of pages is written. ++ STACK: We need the stack information in order to get a meaningful ++ backtrace. We need to write the data from (esp) to ++ current->start_stack, so we round each of these off in order to be able ++ to write an integer number of pages. ++ The minimum core file size is 3 pages, or 12288 bytes. ++*/ ++ ++struct user_m68kfp_struct { ++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ ++ unsigned long fpcntl[3]; /* fp control regs */ ++}; ++ ++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and ++ is still the layout used by user (the new pt_regs doesn't have ++ all registers). */ ++struct user_regs_struct { ++ long d1,d2,d3,d4,d5,d6,d7; ++ long a0,a1,a2,a3,a4,a5,a6; ++ long d0; ++ long usp; ++ long orig_d0; ++ short stkadj; ++ short sr; ++ long pc; ++ short fmtvec; ++ short __fill; ++}; ++ ++ ++/* When the kernel dumps core, it starts by dumping the user struct - ++ this will be used by gdb to figure out where the data and stack segments ++ are within the file, and what virtual addresses to use. */ ++struct user{ ++/* We start with the registers, to mimic the way that "memory" is returned ++ from the ptrace(3,...) function. */ ++ struct user_regs_struct regs; /* Where the registers are actually stored */ ++/* ptrace does not yet supply these. Someday.... */ ++ int u_fpvalid; /* True if math co-processor being used. */ ++ /* for this mess. Not yet used. */ ++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ ++/* The rest of this junk is to help gdb figure out what goes where */ ++ unsigned long int u_tsize; /* Text segment size (pages). */ ++ unsigned long int u_dsize; /* Data segment size (pages). */ ++ unsigned long int u_ssize; /* Stack segment size (pages). */ ++ unsigned long start_code; /* Starting virtual address of text. */ ++ unsigned long start_stack; /* Starting virtual address of stack area. ++ This is actually the bottom of the stack, ++ the top of the stack is always found in the ++ esp register. */ ++ long int signal; /* Signal that caused the core dump. */ ++ int reserved; /* No longer used */ ++ struct user_regs_struct *u_ar0; ++ /* Used by gdb to help find the values for */ ++ /* the registers. */ ++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ ++ unsigned long magic; /* To uniquely identify a core file */ ++ char u_comm[32]; /* User command that was responsible */ ++}; ++#define NBPG 4096 ++#define UPAGES 1 ++#define HOST_TEXT_START_ADDR (u.start_code) ++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ++ ++#endif + /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc/ports-2.13/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.13/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/ports-2.13/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/ports-2.13/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.13/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/ports-2.13/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/ports-2.13/380-dont-build-timezone.patch b/packages/glibc/ports-2.13/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/ports-2.13/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/ports-2.13/400-alpha-xstat.patch b/packages/glibc/ports-2.13/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/ports-2.13/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch b/packages/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch new file mode 100644 index 0000000..fd55537 --- /dev/null +++ b/packages/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch @@ -0,0 +1,19 @@ +2011-02-28 Aurelien Jarno + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ, + F_GETPIPE_SZ): Define. + +diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +index 860e9ac..e5e726b 100644 +--- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h ++++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +@@ -97,6 +97,8 @@ + # define F_SETLEASE 1024 /* Set a lease. */ + # define F_GETLEASE 1025 /* Enquire what lease is active. */ + # define F_NOTIFY 1026 /* Request notfications on a directory. */ ++# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ ++# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ + #endif + #ifdef __USE_XOPEN2K8 + # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with + diff --git a/packages/glibc/ports-2.13/420-alpha-statfs.patch b/packages/glibc/ports-2.13/420-alpha-statfs.patch new file mode 100644 index 0000000..65c925a --- /dev/null +++ b/packages/glibc/ports-2.13/420-alpha-statfs.patch @@ -0,0 +1,29 @@ +2011-02-28 Aurelien Jarno + + * sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs, + struct statfs64): Add f_flags field. + +diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +index d838e6b..157591d 100644 +--- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h ++++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +@@ -42,7 +42,8 @@ struct statfs + __fsid_t f_fsid; + int f_namelen; + int f_frsize; +- int f_spare[5]; ++ int f_flags; ++ int f_spare[4]; + }; + + #ifdef __USE_LARGEFILE64 +@@ -58,7 +59,8 @@ struct statfs64 + __fsid_t f_fsid; + int f_namelen; + int f_frsize; +- int f_spare[5]; ++ int f_flags; ++ int f_spare[4]; + }; + #endif + diff --git a/packages/glibc/ports-2.13/430-alpha-creat.patch b/packages/glibc/ports-2.13/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/ports-2.13/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/ports-2.13/440-alpha-cache-shape.patch b/packages/glibc/ports-2.13/440-alpha-cache-shape.patch new file mode 100644 index 0000000..62ade7b --- /dev/null +++ b/packages/glibc/ports-2.13/440-alpha-cache-shape.patch @@ -0,0 +1,13 @@ +older verisons of glibc would build dl-sysdep as shared-only and dl-support as +static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of +glibc build dl-sysdep as both shared and static which means we now have symbol +duplication for static builds with dl-sysdep and dl-support. since dl-sysdep +is both shared/static, there is no point in hooking dl-support anymore, so we +can punt it. + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +@@ -1,2 +1,1 @@ +-#include "dl-auxv.h" + #include diff --git a/packages/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch b/packages/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch new file mode 100644 index 0000000..ac3ea9a --- /dev/null +++ b/packages/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch @@ -0,0 +1,23 @@ +2011-02-28 Aurelien Jarno + + * sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. + +diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h +index 0a281bd..d9dbc35 100644 +--- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h ++++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h +@@ -22,7 +22,13 @@ + #ifndef _STACKINFO_H + #define _STACKINFO_H 1 + ++#include ++ + /* On Alpha the stack grows down. */ + #define _STACK_GROWS_DOWN 1 + ++/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is ++ * present, but it is presumed absent. */ ++#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) ++ + #endif /* stackinfo.h */ + diff --git a/packages/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch new file mode 100644 index 0000000..313e0e0 --- /dev/null +++ b/packages/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch @@ -0,0 +1,56 @@ +2006-05-30 Falk Hueffner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture + to ev6 in assembly code. + +{standard input}: Assembler messages: +{standard input}:341: Error: macro requires $at register while noat in effect +{standard input}:374: Error: macro requires $at register while noat in effect +{standard input}:438: Error: macro requires $at register while noat in effect +{standard input}:471: Error: macro requires $at register while noat in effect +make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 + +Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. +I cannot really think of anything better than + + ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +@@ -178,13 +178,13 @@ + static inline void + stb_mb(unsigned char val, unsigned long addr) + { +- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); + } + + static inline void + stw_mb(unsigned short val, unsigned long addr) + { +- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); + } + + static inline void +@@ -356,7 +356,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; + +- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; + } + +@@ -366,7 +366,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; + +- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; + } + +diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc/ports-2.13/470-alpha-feupdateenv.patch b/packages/glibc/ports-2.13/470-alpha-feupdateenv.patch new file mode 100644 index 0000000..45a7051 --- /dev/null +++ b/packages/glibc/ports-2.13/470-alpha-feupdateenv.patch @@ -0,0 +1,26 @@ +2011-03-01 Aurelien Jarno + + * sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add + libm_hidden_def. + * sysdeps/alpha/fpu/ftestexcept.c (fetestexcept): Likewise. + +diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c +index c798070..9abbf11 100644 +--- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c ++++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c +@@ -46,4 +46,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) + compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); + #endif + ++libm_hidden_ver (__feupdateenv, feupdateenv) + versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); +diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c +index a4b3081..34d8113 100644 +--- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c ++++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c +@@ -30,3 +30,4 @@ fetestexcept (int excepts) + + return tmp & excepts & SWCR_STATUS_MASK; + } ++libm_hidden_def (fetestexcept) + diff --git a/packages/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..372f34c --- /dev/null +++ b/packages/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch new file mode 100644 index 0000000..b2ae9b5 --- /dev/null +++ b/packages/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch @@ -0,0 +1,21 @@ +2009-05-26 Aurelien Jarno + + * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). + + ports/sysdeps/alpha/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +@@ -35,7 +35,8 @@ + + ifeq ($(subdir),elf) + # The ld.so startup code cannot use literals until it self-relocates. +-CFLAGS-rtld.c = -mbuild-constants ++# It uses more than 64k for the small data area. ++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) + endif + + # Build everything with full IEEE math support, and with dynamic rounding; +diff -durN glibc-2.13.orig/ports/sysdeps/alpha/Makefile glibc-2.13/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc/ports-2.13/560-ppc-atomic.patch b/packages/glibc/ports-2.13/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/ports-2.13/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch new file mode 100644 index 0000000..4f4dbec --- /dev/null +++ b/packages/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -0,0 +1,374 @@ +http://yann.poupet.free.fr/ep93xx/ +Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +@@ -12,7 +12,7 @@ + /* FPA floating point units are always big-endian, irrespective of the + CPU endianness. VFP floating point units use the same endianness + as the rest of the system. */ +-#ifdef __VFP_FP__ ++#if defined __VFP_FP__ || defined __MAVERICK__ + #define __FLOAT_WORD_ORDER __BYTE_ORDER + #else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -30,7 +30,33 @@ + movs r0, r1 /* get the return value in place */ + moveq r0, #1 /* can't let setjmp() return zero! */ + ++#ifdef __MAVERICK__ ++ cfldrd mvd4, [ip], #8 ++ nop ++ cfldrd mvd5, [ip], #8 ++ nop ++ cfldrd mvd6, [ip], #8 ++ nop ++ cfldrd mvd7, [ip], #8 ++ nop ++ cfldrd mvd8, [ip], #8 ++ nop ++ cfldrd mvd9, [ip], #8 ++ nop ++ cfldrd mvd10, [ip], #8 ++ nop ++ cfldrd mvd11, [ip], #8 ++ nop ++ cfldrd mvd12, [ip], #8 ++ nop ++ cfldrd mvd13, [ip], #8 ++ nop ++ cfldrd mvd14, [ip], #8 ++ nop ++ cfldrd mvd15, [ip], #8 ++#else + lfmfd f4, 4, [ip] ! /* load the floating point regs */ ++#endif + + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) + END (__longjmp) +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +@@ -20,6 +20,45 @@ + # error "Never use directly; include instead." + #endif + ++#if defined(__MAVERICK__) ++ ++/* Define bits representing exceptions in the FPU status word. */ ++enum ++ { ++ FE_INVALID = 1, ++#define FE_INVALID FE_INVALID ++ FE_OVERFLOW = 4, ++#define FE_OVERFLOW FE_OVERFLOW ++ FE_UNDERFLOW = 8, ++#define FE_UNDERFLOW FE_UNDERFLOW ++ FE_INEXACT = 16, ++#define FE_INEXACT FE_INEXACT ++ }; ++ ++/* Amount to shift by to convert an exception to a mask bit. */ ++#define FE_EXCEPT_SHIFT 5 ++ ++/* All supported exceptions. */ ++#define FE_ALL_EXCEPT \ ++ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++ ++/* IEEE rounding modes. */ ++enum ++ { ++ FE_TONEAREST = 0, ++#define FE_TONEAREST FE_TONEAREST ++ FE_TOWARDZERO = 0x400, ++#define FE_TOWARDZERO FE_TOWARDZERO ++ FE_DOWNWARD = 0x800, ++#define FE_DOWNWARD FE_DOWNWARD ++ FE_UPWARD = 0xc00, ++#define FE_UPWARD FE_UPWARD ++ }; ++ ++#define FE_ROUND_MASK (FE_UPWARD) ++ ++#else /* FPA */ ++ + /* Define bits representing exceptions in the FPU status word. */ + enum + { +@@ -44,6 +83,8 @@ + modes exist, but you have to encode them in the actual instruction. */ + #define FE_TONEAREST 0 + ++#endif ++ + /* Type representing exception flags. */ + typedef unsigned long int fexcept_t; + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +@@ -28,7 +28,11 @@ + #ifndef _ASM + /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ ++#ifdef __MAVERICK__ ++typedef int __jmp_buf[34]; ++#else + typedef int __jmp_buf[22]; + #endif ++#endif + + #endif +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,9 +18,21 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fegetround (void) + { ++#if defined(__MAVERICK__) ++ ++ unsigned long temp; ++ ++ _FPU_GETCW (temp); ++ return temp & FE_ROUND_MASK; ++ ++#else /* FPA */ ++ + return FE_TONEAREST; /* Easy. :-) */ ++ ++#endif + } +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,12 +18,28 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fesetround (int round) + { ++#if defined(__MAVERICK__) ++ unsigned long temp; ++ ++ if (round & ~FE_ROUND_MASK) ++ return 1; ++ ++ _FPU_GETCW (temp); ++ temp = (temp & ~FE_ROUND_MASK) | round; ++ _FPU_SETCW (temp); ++ return 0; ++ ++#else /* FPA */ ++ + /* We only support FE_TONEAREST, so there is no need for any work. */ + return (round == FE_TONEAREST)?0:1; ++ ++#endif + } + + libm_hidden_def (fesetround) +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +@@ -1,5 +1,6 @@ + /* FPU control word definitions. ARM version. +- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. ++ Copyright (C) 1996, 1997, 1998, 2000, 2005 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,6 +21,79 @@ + #ifndef _FPU_CONTROL_H + #define _FPU_CONTROL_H + ++#if defined(__MAVERICK__) ++ ++/* DSPSC register: (from EP9312 User's Guide) ++ * ++ * bits 31..29 - DAID ++ * bits 28..26 - HVID ++ * bits 25..24 - RSVD ++ * bit 23 - ISAT ++ * bit 22 - UI ++ * bit 21 - INT ++ * bit 20 - AEXC ++ * bits 19..18 - SAT ++ * bits 17..16 - FCC ++ * bit 15 - V ++ * bit 14 - FWDEN ++ * bit 13 - Invalid ++ * bit 12 - Denorm ++ * bits 11..10 - RM ++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE ++ * bits 4..0 - IX, UF, OF, RSVD, IO ++ */ ++ ++/* masking of interrupts */ ++#define _FPU_MASK_IM (1 << 5) /* invalid operation */ ++#define _FPU_MASK_ZM 0 /* divide by zero */ ++#define _FPU_MASK_OM (1 << 7) /* overflow */ ++#define _FPU_MASK_UM (1 << 8) /* underflow */ ++#define _FPU_MASK_PM (1 << 9) /* inexact */ ++#define _FPU_MASK_DM 0 /* denormalized operation */ ++ ++#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ ++ ++#define _FPU_DEFAULT 0x00b00000 /* Default value. */ ++#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ ++ ++/* Type of the control word. */ ++typedef unsigned int fpu_control_t; ++ ++/* Macros for accessing the hardware control word. */ ++#define _FPU_GETCW(cw) ({ \ ++ register int __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv32sc mvdx0, dspsc\n\t" \ ++ "cfmvr64l %0, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ ++ ); \ ++}) ++ ++#define _FPU_SETCW(cw) ({ \ ++ register int __t0, __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %0\n\t" \ ++ "cfmvsc32 dspsc, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ ++ : "0" (cw) \ ++ ); \ ++}) ++ ++/* Default control word set at startup. */ ++extern fpu_control_t __fpu_control; ++ ++#else /* FPA */ ++ + /* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only +@@ -99,4 +173,6 @@ + /* Default control word set at startup. */ + extern fpu_control_t __fpu_control; + ++#endif ++ + #endif /* _FPU_CONTROL_H */ +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,4 +17,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define __JMP_BUF_SP 32 ++#else + #define __JMP_BUF_SP 20 ++#endif +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -24,11 +24,41 @@ + + ENTRY (__sigsetjmp) + /* Save registers */ ++#ifdef __MAVERICK__ ++ cfstrd mvd4, [r0], #8 ++ nop ++ cfstrd mvd5, [r0], #8 ++ nop ++ cfstrd mvd6, [r0], #8 ++ nop ++ cfstrd mvd7, [r0], #8 ++ nop ++ cfstrd mvd8, [r0], #8 ++ nop ++ cfstrd mvd9, [r0], #8 ++ nop ++ cfstrd mvd10, [r0], #8 ++ nop ++ cfstrd mvd11, [r0], #8 ++ nop ++ cfstrd mvd12, [r0], #8 ++ nop ++ cfstrd mvd13, [r0], #8 ++ nop ++ cfstrd mvd14, [r0], #8 ++ nop ++ cfstrd mvd15, [r0], #8 ++#else + sfmea f4, 4, [r0]! ++#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Restore pointer to jmp_buf */ ++#ifdef __MAVERICK__ ++ sub r0, r0, #96 ++#else + sub r0, r0, #48 ++#endif + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,6 +17,10 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define FIRST_PSEUDO_REGISTER 43 ++#else + #define FIRST_PSEUDO_REGISTER 27 ++#endif + + #include +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +@@ -29,7 +29,7 @@ + #if defined(__ARMEB__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 1 +-#elif defined(__VFP_FP__) ++#elif defined(__VFP_FP__) || defined(__MAVERICK__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 0 + #else +diff -durN glibc-2.13.orig/ports/sysdeps/arm/bits/endian.h glibc-2.13/ports/sysdeps/arm/bits/endian.h +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.13/ports/sysdeps/arm/fpu/__longjmp.S +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/ports/sysdeps/arm/fpu/bits/fenv.h +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/ports/sysdeps/arm/fpu/bits/setjmp.h +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.13/ports/sysdeps/arm/fpu/fegetround.c +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.13/ports/sysdeps/arm/fpu/fesetround.c +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.13/ports/sysdeps/arm/fpu/fpu_control.h +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/ports/sysdeps/arm/fpu/jmpbuf-offsets.h +diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.13/ports/sysdeps/arm/fpu/setjmp.S +diff -durN glibc-2.13.orig/ports/sysdeps/arm/gccframe.h glibc-2.13/ports/sysdeps/arm/gccframe.h +diff -durN glibc-2.13.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.13/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc/ports-2.13/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.13/580-nptl-lowlevellock.patch new file mode 100644 index 0000000..08518e9 --- /dev/null +++ b/packages/glibc/ports-2.13/580-nptl-lowlevellock.patch @@ -0,0 +1,23 @@ +fix build error on arm like on hppa: + +arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include /* Need THREAD_*, and header.*. */ + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 +diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc/ports-2.13/610-fpu-cw-mips.patch b/packages/glibc/ports-2.13/610-fpu-cw-mips.patch new file mode 100644 index 0000000..cd2b4d9 --- /dev/null +++ b/packages/glibc/ports-2.13/610-fpu-cw-mips.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html + +diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h +--- glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +@@ -86,7 +86,7 @@ + #define _FPU_RC_UP 0x2 + #define _FPU_RC_DOWN 0x3 + +-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ ++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ + + + /* The fdlibm code requires strict IEEE double precision arithmetic, +diff -durN glibc-2.13.orig/ports/sysdeps/mips/fpu_control.h glibc-2.13/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc/ports-2.13/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.13/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/ports-2.13/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/ports-2.13/640-alpha-atfcts.patch b/packages/glibc/ports-2.13/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/ports-2.13/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/ports-2.13/650-syslog.patch b/packages/glibc/ports-2.13/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/ports-2.13/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/ports-2.13/670-support-hard-float-eabi.patch b/packages/glibc/ports-2.13/670-support-hard-float-eabi.patch new file mode 100644 index 0000000..589f11e --- /dev/null +++ b/packages/glibc/ports-2.13/670-support-hard-float-eabi.patch @@ -0,0 +1,22 @@ +diff -ur glibc-2.13/ports/sysdeps/arm/preconfigure glibc-2.13-patched/ports/sysdeps/arm/preconfigure +--- glibc-2.13/ports/sysdeps/arm/preconfigure 2011-01-25 14:00:16.000000000 -0700 ++++ glibc-2.13-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:36:50.310454000 -0700 +@@ -2,7 +2,7 @@ + arm*) + base_machine=arm + case $config_os in +- linux-gnueabi) ++ linux-gnueabi*) + machine=arm/eabi/$machine + if [ "${CFLAGS+set}" != "set" ]; then + CFLAGS="-g -O2" +diff -ur glibc-2.13/ports/sysdeps/arm/shlib-versions glibc-2.13-patched/ports/sysdeps/arm/shlib-versions +--- glibc-2.13/ports/sysdeps/arm/shlib-versions 2011-01-25 14:00:16.000000000 -0700 ++++ glibc-2.13-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:36:50.312457000 -0700 +@@ -1,4 +1,4 @@ +-arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 ++arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 + +-arm.*-.*-linux-gnueabi ld=ld-linux.so.3 ++arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 + arm.*-.*-linux.* ld=ld-linux.so.2 diff --git a/packages/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..1a632fe --- /dev/null +++ b/packages/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,72 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/packages/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/ports-2.14.1/160-manual-no-perl.patch b/packages/glibc/ports-2.14.1/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/ports-2.14.1/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +If we're using a cvs snapshot which updates the source files, and +perl isn't installed yet, then we can't regen the docs. Not a big +deal, so just whine a little and continue on our merry way. + +http://bugs.gentoo.org/60132 + +diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 +@@ -104,9 +104,14 @@ + libm-err.texi: stamp-libm-err + stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ + $(dir)/libm-test-ulps)) ++ifneq ($(PERL),no) + pwd=`pwd`; \ + $(PERL) $< $$pwd/.. > libm-err-tmp + $(move-if-change) libm-err-tmp libm-err.texi ++else ++ echo "Unable to rebuild math docs, no perl installed" ++ touch libm-err.texi ++endif + touch $@ + + # Generate Texinfo files from the C source for the example programs. diff --git a/packages/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/ports-2.14.1/180-resolv-dynamic.patch b/packages/glibc/ports-2.14.1/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/ports-2.14.1/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/ports-2.14.1/190-localedef-mmap.patch b/packages/glibc/ports-2.14.1/190-localedef-mmap.patch new file mode 100644 index 0000000..f3914cd --- /dev/null +++ b/packages/glibc/ports-2.14.1/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c +--- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/ports-2.14.1/200-fadvise64_64.patch b/packages/glibc/ports-2.14.1/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/ports-2.14.1/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/ports-2.14.1/220-section-comments.patch b/packages/glibc/ports-2.14.1/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/ports-2.14.1/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/ports-2.14.1/230-no-inline-gmon.patch b/packages/glibc/ports-2.14.1/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/ports-2.14.1/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/ports-2.14.1/260-assume-pipe2.patch b/packages/glibc/ports-2.14.1/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/ports-2.14.1/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/ports-2.14.1/270-china.patch b/packages/glibc/ports-2.14.1/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/ports-2.14.1/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/ports-2.14.1/280-new-valencian-locale.patch b/packages/glibc/ports-2.14.1/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/ports-2.14.1/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/ports-2.14.1/300-nscd-one-fork.patch b/packages/glibc/ports-2.14.1/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/ports-2.14.1/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/ports-2.14.1/330-m68k-sys-user.patch b/packages/glibc/ports-2.14.1/330-m68k-sys-user.patch new file mode 100644 index 0000000..8fbe2e5 --- /dev/null +++ b/packages/glibc/ports-2.14.1/330-m68k-sys-user.patch @@ -0,0 +1,97 @@ +copied from kernel as it is sanitized now + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +@@ -1,3 +1,90 @@ ++#ifndef _SYS_USER_H ++#define _SYS_USER_H ++ ++/* Core file format: The core file is written in such a way that gdb ++ can understand it and provide useful information to the user (under ++ linux we use the 'trad-core' bfd). There are quite a number of ++ obstacles to being able to view the contents of the floating point ++ registers, and until these are solved you will not be able to view the ++ contents of them. Actually, you can read in the core file and look at ++ the contents of the user struct to find out what the floating point ++ registers contain. ++ The actual file contents are as follows: ++ UPAGE: 1 page consisting of a user struct that tells gdb what is present ++ in the file. Directly after this is a copy of the task_struct, which ++ is currently not used by gdb, but it may come in useful at some point. ++ All of the registers are stored as part of the upage. The upage should ++ always be only one page. ++ DATA: The data area is stored. We use current->end_text to ++ current->brk to pick up all of the user variables, plus any memory ++ that may have been malloced. No attempt is made to determine if a page ++ is demand-zero or if a page is totally unused, we just cover the entire ++ range. All of the addresses are rounded in such a way that an integral ++ number of pages is written. ++ STACK: We need the stack information in order to get a meaningful ++ backtrace. We need to write the data from (esp) to ++ current->start_stack, so we round each of these off in order to be able ++ to write an integer number of pages. ++ The minimum core file size is 3 pages, or 12288 bytes. ++*/ ++ ++struct user_m68kfp_struct { ++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ ++ unsigned long fpcntl[3]; /* fp control regs */ ++}; ++ ++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and ++ is still the layout used by user (the new pt_regs doesn't have ++ all registers). */ ++struct user_regs_struct { ++ long d1,d2,d3,d4,d5,d6,d7; ++ long a0,a1,a2,a3,a4,a5,a6; ++ long d0; ++ long usp; ++ long orig_d0; ++ short stkadj; ++ short sr; ++ long pc; ++ short fmtvec; ++ short __fill; ++}; ++ ++ ++/* When the kernel dumps core, it starts by dumping the user struct - ++ this will be used by gdb to figure out where the data and stack segments ++ are within the file, and what virtual addresses to use. */ ++struct user{ ++/* We start with the registers, to mimic the way that "memory" is returned ++ from the ptrace(3,...) function. */ ++ struct user_regs_struct regs; /* Where the registers are actually stored */ ++/* ptrace does not yet supply these. Someday.... */ ++ int u_fpvalid; /* True if math co-processor being used. */ ++ /* for this mess. Not yet used. */ ++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ ++/* The rest of this junk is to help gdb figure out what goes where */ ++ unsigned long int u_tsize; /* Text segment size (pages). */ ++ unsigned long int u_dsize; /* Data segment size (pages). */ ++ unsigned long int u_ssize; /* Stack segment size (pages). */ ++ unsigned long start_code; /* Starting virtual address of text. */ ++ unsigned long start_stack; /* Starting virtual address of stack area. ++ This is actually the bottom of the stack, ++ the top of the stack is always found in the ++ esp register. */ ++ long int signal; /* Signal that caused the core dump. */ ++ int reserved; /* No longer used */ ++ struct user_regs_struct *u_ar0; ++ /* Used by gdb to help find the values for */ ++ /* the registers. */ ++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ ++ unsigned long magic; /* To uniquely identify a core file */ ++ char u_comm[32]; /* User command that was responsible */ ++}; ++#define NBPG 4096 ++#define UPAGES 1 ++#define HOST_TEXT_START_ADDR (u.start_code) ++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ++ ++#endif + /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc/ports-2.14.1/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.14.1/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/ports-2.14.1/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/ports-2.14.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.14.1/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/ports-2.14.1/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/ports-2.14.1/380-dont-build-timezone.patch b/packages/glibc/ports-2.14.1/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/ports-2.14.1/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/ports-2.14.1/400-alpha-xstat.patch b/packages/glibc/ports-2.14.1/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/ports-2.14.1/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/ports-2.14.1/430-alpha-creat.patch b/packages/glibc/ports-2.14.1/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/ports-2.14.1/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/ports-2.14.1/440-alpha-cache-shape.patch b/packages/glibc/ports-2.14.1/440-alpha-cache-shape.patch new file mode 100644 index 0000000..8ca0bd6 --- /dev/null +++ b/packages/glibc/ports-2.14.1/440-alpha-cache-shape.patch @@ -0,0 +1,13 @@ +older verisons of glibc would build dl-sysdep as shared-only and dl-support as +static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of +glibc build dl-sysdep as both shared and static which means we now have symbol +duplication for static builds with dl-sysdep and dl-support. since dl-sysdep +is both shared/static, there is no point in hooking dl-support anymore, so we +can punt it. + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +@@ -1,2 +1,1 @@ +-#include "dl-auxv.h" + #include diff --git a/packages/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch new file mode 100644 index 0000000..c3e59f4 --- /dev/null +++ b/packages/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch @@ -0,0 +1,56 @@ +2006-05-30 Falk Hueffner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture + to ev6 in assembly code. + +{standard input}: Assembler messages: +{standard input}:341: Error: macro requires $at register while noat in effect +{standard input}:374: Error: macro requires $at register while noat in effect +{standard input}:438: Error: macro requires $at register while noat in effect +{standard input}:471: Error: macro requires $at register while noat in effect +make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 + +Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. +I cannot really think of anything better than + + ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +@@ -178,13 +178,13 @@ + static inline void + stb_mb(unsigned char val, unsigned long addr) + { +- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); + } + + static inline void + stw_mb(unsigned short val, unsigned long addr) + { +- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); + } + + static inline void +@@ -356,7 +356,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; + +- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; + } + +@@ -366,7 +366,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; + +- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; + } + +diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc/ports-2.14.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/ports-2.14.1/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..372f34c --- /dev/null +++ b/packages/glibc/ports-2.14.1/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch new file mode 100644 index 0000000..2691a99 --- /dev/null +++ b/packages/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch @@ -0,0 +1,21 @@ +2009-05-26 Aurelien Jarno + + * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). + + ports/sysdeps/alpha/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +@@ -35,7 +35,8 @@ + + ifeq ($(subdir),elf) + # The ld.so startup code cannot use literals until it self-relocates. +-CFLAGS-rtld.c = -mbuild-constants ++# It uses more than 64k for the small data area. ++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) + endif + + # Build everything with full IEEE math support, and with dynamic rounding; +diff -durN glibc-2.14.1.orig/ports/sysdeps/alpha/Makefile glibc-2.14.1/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc/ports-2.14.1/560-ppc-atomic.patch b/packages/glibc/ports-2.14.1/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/ports-2.14.1/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch new file mode 100644 index 0000000..5e45682 --- /dev/null +++ b/packages/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -0,0 +1,374 @@ +http://yann.poupet.free.fr/ep93xx/ +Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +@@ -12,7 +12,7 @@ + /* FPA floating point units are always big-endian, irrespective of the + CPU endianness. VFP floating point units use the same endianness + as the rest of the system. */ +-#ifdef __VFP_FP__ ++#if defined __VFP_FP__ || defined __MAVERICK__ + #define __FLOAT_WORD_ORDER __BYTE_ORDER + #else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -30,7 +30,33 @@ + movs r0, r1 /* get the return value in place */ + moveq r0, #1 /* can't let setjmp() return zero! */ + ++#ifdef __MAVERICK__ ++ cfldrd mvd4, [ip], #8 ++ nop ++ cfldrd mvd5, [ip], #8 ++ nop ++ cfldrd mvd6, [ip], #8 ++ nop ++ cfldrd mvd7, [ip], #8 ++ nop ++ cfldrd mvd8, [ip], #8 ++ nop ++ cfldrd mvd9, [ip], #8 ++ nop ++ cfldrd mvd10, [ip], #8 ++ nop ++ cfldrd mvd11, [ip], #8 ++ nop ++ cfldrd mvd12, [ip], #8 ++ nop ++ cfldrd mvd13, [ip], #8 ++ nop ++ cfldrd mvd14, [ip], #8 ++ nop ++ cfldrd mvd15, [ip], #8 ++#else + lfmfd f4, 4, [ip] ! /* load the floating point regs */ ++#endif + + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) + END (__longjmp) +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +@@ -20,6 +20,45 @@ + # error "Never use directly; include instead." + #endif + ++#if defined(__MAVERICK__) ++ ++/* Define bits representing exceptions in the FPU status word. */ ++enum ++ { ++ FE_INVALID = 1, ++#define FE_INVALID FE_INVALID ++ FE_OVERFLOW = 4, ++#define FE_OVERFLOW FE_OVERFLOW ++ FE_UNDERFLOW = 8, ++#define FE_UNDERFLOW FE_UNDERFLOW ++ FE_INEXACT = 16, ++#define FE_INEXACT FE_INEXACT ++ }; ++ ++/* Amount to shift by to convert an exception to a mask bit. */ ++#define FE_EXCEPT_SHIFT 5 ++ ++/* All supported exceptions. */ ++#define FE_ALL_EXCEPT \ ++ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++ ++/* IEEE rounding modes. */ ++enum ++ { ++ FE_TONEAREST = 0, ++#define FE_TONEAREST FE_TONEAREST ++ FE_TOWARDZERO = 0x400, ++#define FE_TOWARDZERO FE_TOWARDZERO ++ FE_DOWNWARD = 0x800, ++#define FE_DOWNWARD FE_DOWNWARD ++ FE_UPWARD = 0xc00, ++#define FE_UPWARD FE_UPWARD ++ }; ++ ++#define FE_ROUND_MASK (FE_UPWARD) ++ ++#else /* FPA */ ++ + /* Define bits representing exceptions in the FPU status word. */ + enum + { +@@ -44,6 +83,8 @@ + modes exist, but you have to encode them in the actual instruction. */ + #define FE_TONEAREST 0 + ++#endif ++ + /* Type representing exception flags. */ + typedef unsigned long int fexcept_t; + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +@@ -28,7 +28,11 @@ + #ifndef _ASM + /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ ++#ifdef __MAVERICK__ ++typedef int __jmp_buf[34]; ++#else + typedef int __jmp_buf[22]; + #endif ++#endif + + #endif +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,9 +18,21 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fegetround (void) + { ++#if defined(__MAVERICK__) ++ ++ unsigned long temp; ++ ++ _FPU_GETCW (temp); ++ return temp & FE_ROUND_MASK; ++ ++#else /* FPA */ ++ + return FE_TONEAREST; /* Easy. :-) */ ++ ++#endif + } +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,12 +18,28 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fesetround (int round) + { ++#if defined(__MAVERICK__) ++ unsigned long temp; ++ ++ if (round & ~FE_ROUND_MASK) ++ return 1; ++ ++ _FPU_GETCW (temp); ++ temp = (temp & ~FE_ROUND_MASK) | round; ++ _FPU_SETCW (temp); ++ return 0; ++ ++#else /* FPA */ ++ + /* We only support FE_TONEAREST, so there is no need for any work. */ + return (round == FE_TONEAREST)?0:1; ++ ++#endif + } + + libm_hidden_def (fesetround) +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +@@ -1,5 +1,6 @@ + /* FPU control word definitions. ARM version. +- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. ++ Copyright (C) 1996, 1997, 1998, 2000, 2005 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,6 +21,79 @@ + #ifndef _FPU_CONTROL_H + #define _FPU_CONTROL_H + ++#if defined(__MAVERICK__) ++ ++/* DSPSC register: (from EP9312 User's Guide) ++ * ++ * bits 31..29 - DAID ++ * bits 28..26 - HVID ++ * bits 25..24 - RSVD ++ * bit 23 - ISAT ++ * bit 22 - UI ++ * bit 21 - INT ++ * bit 20 - AEXC ++ * bits 19..18 - SAT ++ * bits 17..16 - FCC ++ * bit 15 - V ++ * bit 14 - FWDEN ++ * bit 13 - Invalid ++ * bit 12 - Denorm ++ * bits 11..10 - RM ++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE ++ * bits 4..0 - IX, UF, OF, RSVD, IO ++ */ ++ ++/* masking of interrupts */ ++#define _FPU_MASK_IM (1 << 5) /* invalid operation */ ++#define _FPU_MASK_ZM 0 /* divide by zero */ ++#define _FPU_MASK_OM (1 << 7) /* overflow */ ++#define _FPU_MASK_UM (1 << 8) /* underflow */ ++#define _FPU_MASK_PM (1 << 9) /* inexact */ ++#define _FPU_MASK_DM 0 /* denormalized operation */ ++ ++#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ ++ ++#define _FPU_DEFAULT 0x00b00000 /* Default value. */ ++#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ ++ ++/* Type of the control word. */ ++typedef unsigned int fpu_control_t; ++ ++/* Macros for accessing the hardware control word. */ ++#define _FPU_GETCW(cw) ({ \ ++ register int __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv32sc mvdx0, dspsc\n\t" \ ++ "cfmvr64l %0, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ ++ ); \ ++}) ++ ++#define _FPU_SETCW(cw) ({ \ ++ register int __t0, __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %0\n\t" \ ++ "cfmvsc32 dspsc, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ ++ : "0" (cw) \ ++ ); \ ++}) ++ ++/* Default control word set at startup. */ ++extern fpu_control_t __fpu_control; ++ ++#else /* FPA */ ++ + /* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only +@@ -99,4 +173,6 @@ + /* Default control word set at startup. */ + extern fpu_control_t __fpu_control; + ++#endif ++ + #endif /* _FPU_CONTROL_H */ +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,4 +17,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define __JMP_BUF_SP 32 ++#else + #define __JMP_BUF_SP 20 ++#endif +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -24,11 +24,41 @@ + + ENTRY (__sigsetjmp) + /* Save registers */ ++#ifdef __MAVERICK__ ++ cfstrd mvd4, [r0], #8 ++ nop ++ cfstrd mvd5, [r0], #8 ++ nop ++ cfstrd mvd6, [r0], #8 ++ nop ++ cfstrd mvd7, [r0], #8 ++ nop ++ cfstrd mvd8, [r0], #8 ++ nop ++ cfstrd mvd9, [r0], #8 ++ nop ++ cfstrd mvd10, [r0], #8 ++ nop ++ cfstrd mvd11, [r0], #8 ++ nop ++ cfstrd mvd12, [r0], #8 ++ nop ++ cfstrd mvd13, [r0], #8 ++ nop ++ cfstrd mvd14, [r0], #8 ++ nop ++ cfstrd mvd15, [r0], #8 ++#else + sfmea f4, 4, [r0]! ++#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Restore pointer to jmp_buf */ ++#ifdef __MAVERICK__ ++ sub r0, r0, #96 ++#else + sub r0, r0, #48 ++#endif + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,6 +17,10 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define FIRST_PSEUDO_REGISTER 43 ++#else + #define FIRST_PSEUDO_REGISTER 27 ++#endif + + #include +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +@@ -29,7 +29,7 @@ + #if defined(__ARMEB__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 1 +-#elif defined(__VFP_FP__) ++#elif defined(__VFP_FP__) || defined(__MAVERICK__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 0 + #else +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14.1/ports/sysdeps/arm/bits/endian.h +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/__longjmp.S +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/fenv.h +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/setjmp.h +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fegetround.c +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fesetround.c +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/ports/sysdeps/arm/fpu/fpu_control.h +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/setjmp.S +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.14.1/ports/sysdeps/arm/gccframe.h +diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14.1/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc/ports-2.14.1/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.14.1/580-nptl-lowlevellock.patch new file mode 100644 index 0000000..6bf5250 --- /dev/null +++ b/packages/glibc/ports-2.14.1/580-nptl-lowlevellock.patch @@ -0,0 +1,23 @@ +fix build error on arm like on hppa: + +arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include /* Need THREAD_*, and header.*. */ + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 +diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc/ports-2.14.1/610-fpu-cw-mips.patch b/packages/glibc/ports-2.14.1/610-fpu-cw-mips.patch new file mode 100644 index 0000000..e53ac78 --- /dev/null +++ b/packages/glibc/ports-2.14.1/610-fpu-cw-mips.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html + +diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h +--- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +@@ -86,7 +86,7 @@ + #define _FPU_RC_UP 0x2 + #define _FPU_RC_DOWN 0x3 + +-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ ++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ + + + /* The fdlibm code requires strict IEEE double precision arithmetic, +diff -durN glibc-2.14.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14.1/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc/ports-2.14.1/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.14.1/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/ports-2.14.1/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/ports-2.14.1/640-alpha-atfcts.patch b/packages/glibc/ports-2.14.1/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/ports-2.14.1/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/ports-2.14.1/650-syslog.patch b/packages/glibc/ports-2.14.1/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/ports-2.14.1/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..1a632fe --- /dev/null +++ b/packages/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,72 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/packages/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/ports-2.14/160-manual-no-perl.patch b/packages/glibc/ports-2.14/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/ports-2.14/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +If we're using a cvs snapshot which updates the source files, and +perl isn't installed yet, then we can't regen the docs. Not a big +deal, so just whine a little and continue on our merry way. + +http://bugs.gentoo.org/60132 + +diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 +@@ -104,9 +104,14 @@ + libm-err.texi: stamp-libm-err + stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ + $(dir)/libm-test-ulps)) ++ifneq ($(PERL),no) + pwd=`pwd`; \ + $(PERL) $< $$pwd/.. > libm-err-tmp + $(move-if-change) libm-err-tmp libm-err.texi ++else ++ echo "Unable to rebuild math docs, no perl installed" ++ touch libm-err.texi ++endif + touch $@ + + # Generate Texinfo files from the C source for the example programs. diff --git a/packages/glibc/ports-2.14/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.14/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/ports-2.14/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/ports-2.14/180-resolv-dynamic.patch b/packages/glibc/ports-2.14/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/ports-2.14/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/ports-2.14/190-localedef-mmap.patch b/packages/glibc/ports-2.14/190-localedef-mmap.patch new file mode 100644 index 0000000..f3914cd --- /dev/null +++ b/packages/glibc/ports-2.14/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c +--- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/ports-2.14/200-fadvise64_64.patch b/packages/glibc/ports-2.14/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/ports-2.14/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/ports-2.14/220-section-comments.patch b/packages/glibc/ports-2.14/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/ports-2.14/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/ports-2.14/230-no-inline-gmon.patch b/packages/glibc/ports-2.14/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/ports-2.14/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/ports-2.14/240-check_native-headers.patch b/packages/glibc/ports-2.14/240-check_native-headers.patch new file mode 100644 index 0000000..c936f71 --- /dev/null +++ b/packages/glibc/ports-2.14/240-check_native-headers.patch @@ -0,0 +1,17 @@ +many ports hit this warning: +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' + +snipped from suse + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/glibc/ports-2.14/260-assume-pipe2.patch b/packages/glibc/ports-2.14/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/ports-2.14/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/ports-2.14/270-china.patch b/packages/glibc/ports-2.14/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/ports-2.14/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/ports-2.14/280-new-valencian-locale.patch b/packages/glibc/ports-2.14/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/ports-2.14/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/ports-2.14/300-nscd-one-fork.patch b/packages/glibc/ports-2.14/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/ports-2.14/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/ports-2.14/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.14/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/ports-2.14/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/ports-2.14/330-m68k-sys-user.patch b/packages/glibc/ports-2.14/330-m68k-sys-user.patch new file mode 100644 index 0000000..28bcb11 --- /dev/null +++ b/packages/glibc/ports-2.14/330-m68k-sys-user.patch @@ -0,0 +1,97 @@ +copied from kernel as it is sanitized now + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +@@ -1,3 +1,90 @@ ++#ifndef _SYS_USER_H ++#define _SYS_USER_H ++ ++/* Core file format: The core file is written in such a way that gdb ++ can understand it and provide useful information to the user (under ++ linux we use the 'trad-core' bfd). There are quite a number of ++ obstacles to being able to view the contents of the floating point ++ registers, and until these are solved you will not be able to view the ++ contents of them. Actually, you can read in the core file and look at ++ the contents of the user struct to find out what the floating point ++ registers contain. ++ The actual file contents are as follows: ++ UPAGE: 1 page consisting of a user struct that tells gdb what is present ++ in the file. Directly after this is a copy of the task_struct, which ++ is currently not used by gdb, but it may come in useful at some point. ++ All of the registers are stored as part of the upage. The upage should ++ always be only one page. ++ DATA: The data area is stored. We use current->end_text to ++ current->brk to pick up all of the user variables, plus any memory ++ that may have been malloced. No attempt is made to determine if a page ++ is demand-zero or if a page is totally unused, we just cover the entire ++ range. All of the addresses are rounded in such a way that an integral ++ number of pages is written. ++ STACK: We need the stack information in order to get a meaningful ++ backtrace. We need to write the data from (esp) to ++ current->start_stack, so we round each of these off in order to be able ++ to write an integer number of pages. ++ The minimum core file size is 3 pages, or 12288 bytes. ++*/ ++ ++struct user_m68kfp_struct { ++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ ++ unsigned long fpcntl[3]; /* fp control regs */ ++}; ++ ++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and ++ is still the layout used by user (the new pt_regs doesn't have ++ all registers). */ ++struct user_regs_struct { ++ long d1,d2,d3,d4,d5,d6,d7; ++ long a0,a1,a2,a3,a4,a5,a6; ++ long d0; ++ long usp; ++ long orig_d0; ++ short stkadj; ++ short sr; ++ long pc; ++ short fmtvec; ++ short __fill; ++}; ++ ++ ++/* When the kernel dumps core, it starts by dumping the user struct - ++ this will be used by gdb to figure out where the data and stack segments ++ are within the file, and what virtual addresses to use. */ ++struct user{ ++/* We start with the registers, to mimic the way that "memory" is returned ++ from the ptrace(3,...) function. */ ++ struct user_regs_struct regs; /* Where the registers are actually stored */ ++/* ptrace does not yet supply these. Someday.... */ ++ int u_fpvalid; /* True if math co-processor being used. */ ++ /* for this mess. Not yet used. */ ++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ ++/* The rest of this junk is to help gdb figure out what goes where */ ++ unsigned long int u_tsize; /* Text segment size (pages). */ ++ unsigned long int u_dsize; /* Data segment size (pages). */ ++ unsigned long int u_ssize; /* Stack segment size (pages). */ ++ unsigned long start_code; /* Starting virtual address of text. */ ++ unsigned long start_stack; /* Starting virtual address of stack area. ++ This is actually the bottom of the stack, ++ the top of the stack is always found in the ++ esp register. */ ++ long int signal; /* Signal that caused the core dump. */ ++ int reserved; /* No longer used */ ++ struct user_regs_struct *u_ar0; ++ /* Used by gdb to help find the values for */ ++ /* the registers. */ ++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ ++ unsigned long magic; /* To uniquely identify a core file */ ++ char u_comm[32]; /* User command that was responsible */ ++}; ++#define NBPG 4096 ++#define UPAGES 1 ++#define HOST_TEXT_START_ADDR (u.start_code) ++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ++ ++#endif + /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc/ports-2.14/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.14/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/ports-2.14/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/ports-2.14/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.14/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/ports-2.14/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/ports-2.14/380-dont-build-timezone.patch b/packages/glibc/ports-2.14/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/ports-2.14/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/ports-2.14/400-alpha-xstat.patch b/packages/glibc/ports-2.14/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/ports-2.14/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/ports-2.14/430-alpha-creat.patch b/packages/glibc/ports-2.14/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/ports-2.14/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/ports-2.14/440-alpha-cache-shape.patch b/packages/glibc/ports-2.14/440-alpha-cache-shape.patch new file mode 100644 index 0000000..def0181 --- /dev/null +++ b/packages/glibc/ports-2.14/440-alpha-cache-shape.patch @@ -0,0 +1,13 @@ +older verisons of glibc would build dl-sysdep as shared-only and dl-support as +static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of +glibc build dl-sysdep as both shared and static which means we now have symbol +duplication for static builds with dl-sysdep and dl-support. since dl-sysdep +is both shared/static, there is no point in hooking dl-support anymore, so we +can punt it. + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +@@ -1,2 +1,1 @@ +-#include "dl-auxv.h" + #include diff --git a/packages/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch new file mode 100644 index 0000000..1569ce4 --- /dev/null +++ b/packages/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch @@ -0,0 +1,56 @@ +2006-05-30 Falk Hueffner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture + to ev6 in assembly code. + +{standard input}: Assembler messages: +{standard input}:341: Error: macro requires $at register while noat in effect +{standard input}:374: Error: macro requires $at register while noat in effect +{standard input}:438: Error: macro requires $at register while noat in effect +{standard input}:471: Error: macro requires $at register while noat in effect +make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 + +Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. +I cannot really think of anything better than + + ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +@@ -178,13 +178,13 @@ + static inline void + stb_mb(unsigned char val, unsigned long addr) + { +- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); + } + + static inline void + stw_mb(unsigned short val, unsigned long addr) + { +- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); + } + + static inline void +@@ -356,7 +356,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; + +- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; + } + +@@ -366,7 +366,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; + +- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; + } + +diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc/ports-2.14/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/ports-2.14/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..372f34c --- /dev/null +++ b/packages/glibc/ports-2.14/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch new file mode 100644 index 0000000..3560e2a --- /dev/null +++ b/packages/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch @@ -0,0 +1,21 @@ +2009-05-26 Aurelien Jarno + + * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). + + ports/sysdeps/alpha/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +@@ -35,7 +35,8 @@ + + ifeq ($(subdir),elf) + # The ld.so startup code cannot use literals until it self-relocates. +-CFLAGS-rtld.c = -mbuild-constants ++# It uses more than 64k for the small data area. ++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) + endif + + # Build everything with full IEEE math support, and with dynamic rounding; +diff -durN glibc-2.14.orig/ports/sysdeps/alpha/Makefile glibc-2.14/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc/ports-2.14/560-ppc-atomic.patch b/packages/glibc/ports-2.14/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/ports-2.14/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch new file mode 100644 index 0000000..b297ff0 --- /dev/null +++ b/packages/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -0,0 +1,374 @@ +http://yann.poupet.free.fr/ep93xx/ +Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +@@ -12,7 +12,7 @@ + /* FPA floating point units are always big-endian, irrespective of the + CPU endianness. VFP floating point units use the same endianness + as the rest of the system. */ +-#ifdef __VFP_FP__ ++#if defined __VFP_FP__ || defined __MAVERICK__ + #define __FLOAT_WORD_ORDER __BYTE_ORDER + #else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -30,7 +30,33 @@ + movs r0, r1 /* get the return value in place */ + moveq r0, #1 /* can't let setjmp() return zero! */ + ++#ifdef __MAVERICK__ ++ cfldrd mvd4, [ip], #8 ++ nop ++ cfldrd mvd5, [ip], #8 ++ nop ++ cfldrd mvd6, [ip], #8 ++ nop ++ cfldrd mvd7, [ip], #8 ++ nop ++ cfldrd mvd8, [ip], #8 ++ nop ++ cfldrd mvd9, [ip], #8 ++ nop ++ cfldrd mvd10, [ip], #8 ++ nop ++ cfldrd mvd11, [ip], #8 ++ nop ++ cfldrd mvd12, [ip], #8 ++ nop ++ cfldrd mvd13, [ip], #8 ++ nop ++ cfldrd mvd14, [ip], #8 ++ nop ++ cfldrd mvd15, [ip], #8 ++#else + lfmfd f4, 4, [ip] ! /* load the floating point regs */ ++#endif + + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) + END (__longjmp) +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +@@ -20,6 +20,45 @@ + # error "Never use directly; include instead." + #endif + ++#if defined(__MAVERICK__) ++ ++/* Define bits representing exceptions in the FPU status word. */ ++enum ++ { ++ FE_INVALID = 1, ++#define FE_INVALID FE_INVALID ++ FE_OVERFLOW = 4, ++#define FE_OVERFLOW FE_OVERFLOW ++ FE_UNDERFLOW = 8, ++#define FE_UNDERFLOW FE_UNDERFLOW ++ FE_INEXACT = 16, ++#define FE_INEXACT FE_INEXACT ++ }; ++ ++/* Amount to shift by to convert an exception to a mask bit. */ ++#define FE_EXCEPT_SHIFT 5 ++ ++/* All supported exceptions. */ ++#define FE_ALL_EXCEPT \ ++ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++ ++/* IEEE rounding modes. */ ++enum ++ { ++ FE_TONEAREST = 0, ++#define FE_TONEAREST FE_TONEAREST ++ FE_TOWARDZERO = 0x400, ++#define FE_TOWARDZERO FE_TOWARDZERO ++ FE_DOWNWARD = 0x800, ++#define FE_DOWNWARD FE_DOWNWARD ++ FE_UPWARD = 0xc00, ++#define FE_UPWARD FE_UPWARD ++ }; ++ ++#define FE_ROUND_MASK (FE_UPWARD) ++ ++#else /* FPA */ ++ + /* Define bits representing exceptions in the FPU status word. */ + enum + { +@@ -44,6 +83,8 @@ + modes exist, but you have to encode them in the actual instruction. */ + #define FE_TONEAREST 0 + ++#endif ++ + /* Type representing exception flags. */ + typedef unsigned long int fexcept_t; + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +@@ -28,7 +28,11 @@ + #ifndef _ASM + /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ ++#ifdef __MAVERICK__ ++typedef int __jmp_buf[34]; ++#else + typedef int __jmp_buf[22]; + #endif ++#endif + + #endif +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,9 +18,21 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fegetround (void) + { ++#if defined(__MAVERICK__) ++ ++ unsigned long temp; ++ ++ _FPU_GETCW (temp); ++ return temp & FE_ROUND_MASK; ++ ++#else /* FPA */ ++ + return FE_TONEAREST; /* Easy. :-) */ ++ ++#endif + } +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,12 +18,28 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fesetround (int round) + { ++#if defined(__MAVERICK__) ++ unsigned long temp; ++ ++ if (round & ~FE_ROUND_MASK) ++ return 1; ++ ++ _FPU_GETCW (temp); ++ temp = (temp & ~FE_ROUND_MASK) | round; ++ _FPU_SETCW (temp); ++ return 0; ++ ++#else /* FPA */ ++ + /* We only support FE_TONEAREST, so there is no need for any work. */ + return (round == FE_TONEAREST)?0:1; ++ ++#endif + } + + libm_hidden_def (fesetround) +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +@@ -1,5 +1,6 @@ + /* FPU control word definitions. ARM version. +- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. ++ Copyright (C) 1996, 1997, 1998, 2000, 2005 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,6 +21,79 @@ + #ifndef _FPU_CONTROL_H + #define _FPU_CONTROL_H + ++#if defined(__MAVERICK__) ++ ++/* DSPSC register: (from EP9312 User's Guide) ++ * ++ * bits 31..29 - DAID ++ * bits 28..26 - HVID ++ * bits 25..24 - RSVD ++ * bit 23 - ISAT ++ * bit 22 - UI ++ * bit 21 - INT ++ * bit 20 - AEXC ++ * bits 19..18 - SAT ++ * bits 17..16 - FCC ++ * bit 15 - V ++ * bit 14 - FWDEN ++ * bit 13 - Invalid ++ * bit 12 - Denorm ++ * bits 11..10 - RM ++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE ++ * bits 4..0 - IX, UF, OF, RSVD, IO ++ */ ++ ++/* masking of interrupts */ ++#define _FPU_MASK_IM (1 << 5) /* invalid operation */ ++#define _FPU_MASK_ZM 0 /* divide by zero */ ++#define _FPU_MASK_OM (1 << 7) /* overflow */ ++#define _FPU_MASK_UM (1 << 8) /* underflow */ ++#define _FPU_MASK_PM (1 << 9) /* inexact */ ++#define _FPU_MASK_DM 0 /* denormalized operation */ ++ ++#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ ++ ++#define _FPU_DEFAULT 0x00b00000 /* Default value. */ ++#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ ++ ++/* Type of the control word. */ ++typedef unsigned int fpu_control_t; ++ ++/* Macros for accessing the hardware control word. */ ++#define _FPU_GETCW(cw) ({ \ ++ register int __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv32sc mvdx0, dspsc\n\t" \ ++ "cfmvr64l %0, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ ++ ); \ ++}) ++ ++#define _FPU_SETCW(cw) ({ \ ++ register int __t0, __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %0\n\t" \ ++ "cfmvsc32 dspsc, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ ++ : "0" (cw) \ ++ ); \ ++}) ++ ++/* Default control word set at startup. */ ++extern fpu_control_t __fpu_control; ++ ++#else /* FPA */ ++ + /* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only +@@ -99,4 +173,6 @@ + /* Default control word set at startup. */ + extern fpu_control_t __fpu_control; + ++#endif ++ + #endif /* _FPU_CONTROL_H */ +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,4 +17,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define __JMP_BUF_SP 32 ++#else + #define __JMP_BUF_SP 20 ++#endif +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -24,11 +24,41 @@ + + ENTRY (__sigsetjmp) + /* Save registers */ ++#ifdef __MAVERICK__ ++ cfstrd mvd4, [r0], #8 ++ nop ++ cfstrd mvd5, [r0], #8 ++ nop ++ cfstrd mvd6, [r0], #8 ++ nop ++ cfstrd mvd7, [r0], #8 ++ nop ++ cfstrd mvd8, [r0], #8 ++ nop ++ cfstrd mvd9, [r0], #8 ++ nop ++ cfstrd mvd10, [r0], #8 ++ nop ++ cfstrd mvd11, [r0], #8 ++ nop ++ cfstrd mvd12, [r0], #8 ++ nop ++ cfstrd mvd13, [r0], #8 ++ nop ++ cfstrd mvd14, [r0], #8 ++ nop ++ cfstrd mvd15, [r0], #8 ++#else + sfmea f4, 4, [r0]! ++#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Restore pointer to jmp_buf */ ++#ifdef __MAVERICK__ ++ sub r0, r0, #96 ++#else + sub r0, r0, #48 ++#endif + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,6 +17,10 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define FIRST_PSEUDO_REGISTER 43 ++#else + #define FIRST_PSEUDO_REGISTER 27 ++#endif + + #include +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +@@ -29,7 +29,7 @@ + #if defined(__ARMEB__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 1 +-#elif defined(__VFP_FP__) ++#elif defined(__VFP_FP__) || defined(__MAVERICK__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 0 + #else +diff -durN glibc-2.14.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14/ports/sysdeps/arm/bits/endian.h +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14/ports/sysdeps/arm/fpu/__longjmp.S +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/ports/sysdeps/arm/fpu/bits/fenv.h +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/ports/sysdeps/arm/fpu/bits/setjmp.h +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14/ports/sysdeps/arm/fpu/fegetround.c +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14/ports/sysdeps/arm/fpu/fesetround.c +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14/ports/sysdeps/arm/fpu/fpu_control.h +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/ports/sysdeps/arm/fpu/jmpbuf-offsets.h +diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14/ports/sysdeps/arm/fpu/setjmp.S +diff -durN glibc-2.14.orig/ports/sysdeps/arm/gccframe.h glibc-2.14/ports/sysdeps/arm/gccframe.h +diff -durN glibc-2.14.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc/ports-2.14/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.14/580-nptl-lowlevellock.patch new file mode 100644 index 0000000..a2a141c --- /dev/null +++ b/packages/glibc/ports-2.14/580-nptl-lowlevellock.patch @@ -0,0 +1,23 @@ +fix build error on arm like on hppa: + +arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include /* Need THREAD_*, and header.*. */ + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 +diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc/ports-2.14/610-fpu-cw-mips.patch b/packages/glibc/ports-2.14/610-fpu-cw-mips.patch new file mode 100644 index 0000000..c624565 --- /dev/null +++ b/packages/glibc/ports-2.14/610-fpu-cw-mips.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html + +diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h +--- glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +@@ -86,7 +86,7 @@ + #define _FPU_RC_UP 0x2 + #define _FPU_RC_DOWN 0x3 + +-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ ++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ + + + /* The fdlibm code requires strict IEEE double precision arithmetic, +diff -durN glibc-2.14.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc/ports-2.14/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.14/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/ports-2.14/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/ports-2.14/640-alpha-atfcts.patch b/packages/glibc/ports-2.14/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/ports-2.14/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/ports-2.14/650-syslog.patch b/packages/glibc/ports-2.14/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/ports-2.14/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..1a632fe --- /dev/null +++ b/packages/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,72 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +@@ -23,7 +23,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +@@ -21,7 +21,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/packages/glibc/ports-2.15/091-libmemusage-link-failure.patch b/packages/glibc/ports-2.15/091-libmemusage-link-failure.patch new file mode 100644 index 0000000..9f9887c --- /dev/null +++ b/packages/glibc/ports-2.15/091-libmemusage-link-failure.patch @@ -0,0 +1,19 @@ +commit 2d80bda39073a35af4b904d27fa1511cd309b26f +Author: Nathan Sidwell +Date: Fri Jan 6 20:14:44 2012 +0000 + + Add ARM dependency of libmemusage.so on libc_nonshared.a. + +diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile +index 5651161..1a88430 100644 +--- a/ports/sysdeps/arm/Makefile ++++ b/ports/sysdeps/arm/Makefile +@@ -7,3 +7,8 @@ endif + ifeq ($(subdir),csu) + gen-as-const-headers += tlsdesc.sym + endif ++ ++# to pull in __aeabi_read_tp, needed for tls ++ifeq ($(subdir),malloc) ++$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a ++endif diff --git a/packages/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/ports-2.15/160-manual-no-perl.patch b/packages/glibc/ports-2.15/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/ports-2.15/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +If we're using a cvs snapshot which updates the source files, and +perl isn't installed yet, then we can't regen the docs. Not a big +deal, so just whine a little and continue on our merry way. + +http://bugs.gentoo.org/60132 + +diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 +@@ -104,9 +104,14 @@ + libm-err.texi: stamp-libm-err + stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ + $(dir)/libm-test-ulps)) ++ifneq ($(PERL),no) + pwd=`pwd`; \ + $(PERL) $< $$pwd/.. > libm-err-tmp + $(move-if-change) libm-err-tmp libm-err.texi ++else ++ echo "Unable to rebuild math docs, no perl installed" ++ touch libm-err.texi ++endif + touch $@ + + # Generate Texinfo files from the C source for the example programs. diff --git a/packages/glibc/ports-2.15/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.15/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/ports-2.15/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/ports-2.15/180-resolv-dynamic.patch b/packages/glibc/ports-2.15/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/ports-2.15/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/ports-2.15/200-fadvise64_64.patch b/packages/glibc/ports-2.15/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/ports-2.15/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/ports-2.15/220-section-comments.patch b/packages/glibc/ports-2.15/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/ports-2.15/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/ports-2.15/230-no-inline-gmon.patch b/packages/glibc/ports-2.15/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/ports-2.15/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/ports-2.15/260-assume-pipe2.patch b/packages/glibc/ports-2.15/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/ports-2.15/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/ports-2.15/270-china.patch b/packages/glibc/ports-2.15/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/ports-2.15/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/ports-2.15/280-new-valencian-locale.patch b/packages/glibc/ports-2.15/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/ports-2.15/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/ports-2.15/300-nscd-one-fork.patch b/packages/glibc/ports-2.15/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/ports-2.15/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/ports-2.15/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.15/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/ports-2.15/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/ports-2.15/330-m68k-sys-user.patch b/packages/glibc/ports-2.15/330-m68k-sys-user.patch new file mode 100644 index 0000000..faee18f --- /dev/null +++ b/packages/glibc/ports-2.15/330-m68k-sys-user.patch @@ -0,0 +1,97 @@ +copied from kernel as it is sanitized now + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +@@ -1,3 +1,90 @@ ++#ifndef _SYS_USER_H ++#define _SYS_USER_H ++ ++/* Core file format: The core file is written in such a way that gdb ++ can understand it and provide useful information to the user (under ++ linux we use the 'trad-core' bfd). There are quite a number of ++ obstacles to being able to view the contents of the floating point ++ registers, and until these are solved you will not be able to view the ++ contents of them. Actually, you can read in the core file and look at ++ the contents of the user struct to find out what the floating point ++ registers contain. ++ The actual file contents are as follows: ++ UPAGE: 1 page consisting of a user struct that tells gdb what is present ++ in the file. Directly after this is a copy of the task_struct, which ++ is currently not used by gdb, but it may come in useful at some point. ++ All of the registers are stored as part of the upage. The upage should ++ always be only one page. ++ DATA: The data area is stored. We use current->end_text to ++ current->brk to pick up all of the user variables, plus any memory ++ that may have been malloced. No attempt is made to determine if a page ++ is demand-zero or if a page is totally unused, we just cover the entire ++ range. All of the addresses are rounded in such a way that an integral ++ number of pages is written. ++ STACK: We need the stack information in order to get a meaningful ++ backtrace. We need to write the data from (esp) to ++ current->start_stack, so we round each of these off in order to be able ++ to write an integer number of pages. ++ The minimum core file size is 3 pages, or 12288 bytes. ++*/ ++ ++struct user_m68kfp_struct { ++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ ++ unsigned long fpcntl[3]; /* fp control regs */ ++}; ++ ++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and ++ is still the layout used by user (the new pt_regs doesn't have ++ all registers). */ ++struct user_regs_struct { ++ long d1,d2,d3,d4,d5,d6,d7; ++ long a0,a1,a2,a3,a4,a5,a6; ++ long d0; ++ long usp; ++ long orig_d0; ++ short stkadj; ++ short sr; ++ long pc; ++ short fmtvec; ++ short __fill; ++}; ++ ++ ++/* When the kernel dumps core, it starts by dumping the user struct - ++ this will be used by gdb to figure out where the data and stack segments ++ are within the file, and what virtual addresses to use. */ ++struct user{ ++/* We start with the registers, to mimic the way that "memory" is returned ++ from the ptrace(3,...) function. */ ++ struct user_regs_struct regs; /* Where the registers are actually stored */ ++/* ptrace does not yet supply these. Someday.... */ ++ int u_fpvalid; /* True if math co-processor being used. */ ++ /* for this mess. Not yet used. */ ++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ ++/* The rest of this junk is to help gdb figure out what goes where */ ++ unsigned long int u_tsize; /* Text segment size (pages). */ ++ unsigned long int u_dsize; /* Data segment size (pages). */ ++ unsigned long int u_ssize; /* Stack segment size (pages). */ ++ unsigned long start_code; /* Starting virtual address of text. */ ++ unsigned long start_stack; /* Starting virtual address of stack area. ++ This is actually the bottom of the stack, ++ the top of the stack is always found in the ++ esp register. */ ++ long int signal; /* Signal that caused the core dump. */ ++ int reserved; /* No longer used */ ++ struct user_regs_struct *u_ar0; ++ /* Used by gdb to help find the values for */ ++ /* the registers. */ ++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ ++ unsigned long magic; /* To uniquely identify a core file */ ++ char u_comm[32]; /* User command that was responsible */ ++}; ++#define NBPG 4096 ++#define UPAGES 1 ++#define HOST_TEXT_START_ADDR (u.start_code) ++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ++ ++#endif + /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc/ports-2.15/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.15/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/ports-2.15/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/ports-2.15/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.15/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/ports-2.15/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/ports-2.15/380-dont-build-timezone.patch b/packages/glibc/ports-2.15/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/ports-2.15/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/ports-2.15/400-alpha-xstat.patch b/packages/glibc/ports-2.15/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/ports-2.15/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/ports-2.15/430-alpha-creat.patch b/packages/glibc/ports-2.15/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/ports-2.15/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/ports-2.15/440-alpha-cache-shape.patch b/packages/glibc/ports-2.15/440-alpha-cache-shape.patch new file mode 100644 index 0000000..b3158da --- /dev/null +++ b/packages/glibc/ports-2.15/440-alpha-cache-shape.patch @@ -0,0 +1,13 @@ +older verisons of glibc would build dl-sysdep as shared-only and dl-support as +static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of +glibc build dl-sysdep as both shared and static which means we now have symbol +duplication for static builds with dl-sysdep and dl-support. since dl-sysdep +is both shared/static, there is no point in hooking dl-support anymore, so we +can punt it. + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +@@ -1,2 +1,1 @@ +-#include "dl-auxv.h" + #include diff --git a/packages/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch new file mode 100644 index 0000000..a54d823 --- /dev/null +++ b/packages/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch @@ -0,0 +1,56 @@ +2006-05-30 Falk Hueffner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture + to ev6 in assembly code. + +{standard input}: Assembler messages: +{standard input}:341: Error: macro requires $at register while noat in effect +{standard input}:374: Error: macro requires $at register while noat in effect +{standard input}:438: Error: macro requires $at register while noat in effect +{standard input}:471: Error: macro requires $at register while noat in effect +make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 + +Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. +I cannot really think of anything better than + + ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +@@ -178,13 +178,13 @@ + static inline void + stb_mb(unsigned char val, unsigned long addr) + { +- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); + } + + static inline void + stw_mb(unsigned short val, unsigned long addr) + { +- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); + } + + static inline void +@@ -356,7 +356,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; + +- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; + } + +@@ -366,7 +366,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; + +- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; + } + +diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..acf250d --- /dev/null +++ b/packages/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -21,6 +21,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch new file mode 100644 index 0000000..800a789 --- /dev/null +++ b/packages/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch @@ -0,0 +1,21 @@ +2009-05-26 Aurelien Jarno + + * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). + + ports/sysdeps/alpha/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +@@ -35,7 +35,8 @@ + + ifeq ($(subdir),elf) + # The ld.so startup code cannot use literals until it self-relocates. +-CFLAGS-rtld.c = -mbuild-constants ++# It uses more than 64k for the small data area. ++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) + endif + + # Build everything with full IEEE math support, and with dynamic rounding; +diff -durN glibc-2.15.orig/ports/sysdeps/alpha/Makefile glibc-2.15/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc/ports-2.15/560-ppc-atomic.patch b/packages/glibc/ports-2.15/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/ports-2.15/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch new file mode 100644 index 0000000..8a05574 --- /dev/null +++ b/packages/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -0,0 +1,374 @@ +http://yann.poupet.free.fr/ep93xx/ +Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +@@ -12,7 +12,7 @@ + /* FPA floating point units are always big-endian, irrespective of the + CPU endianness. VFP floating point units use the same endianness + as the rest of the system. */ +-#ifdef __VFP_FP__ ++#if defined __VFP_FP__ || defined __MAVERICK__ + #define __FLOAT_WORD_ORDER __BYTE_ORDER + #else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -30,7 +30,33 @@ + movs r0, r1 /* get the return value in place */ + moveq r0, #1 /* can't let setjmp() return zero! */ + ++#ifdef __MAVERICK__ ++ cfldrd mvd4, [ip], #8 ++ nop ++ cfldrd mvd5, [ip], #8 ++ nop ++ cfldrd mvd6, [ip], #8 ++ nop ++ cfldrd mvd7, [ip], #8 ++ nop ++ cfldrd mvd8, [ip], #8 ++ nop ++ cfldrd mvd9, [ip], #8 ++ nop ++ cfldrd mvd10, [ip], #8 ++ nop ++ cfldrd mvd11, [ip], #8 ++ nop ++ cfldrd mvd12, [ip], #8 ++ nop ++ cfldrd mvd13, [ip], #8 ++ nop ++ cfldrd mvd14, [ip], #8 ++ nop ++ cfldrd mvd15, [ip], #8 ++#else + lfmfd f4, 4, [ip] ! /* load the floating point regs */ ++#endif + + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) + END (__longjmp) +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +@@ -20,6 +20,45 @@ + # error "Never use directly; include instead." + #endif + ++#if defined(__MAVERICK__) ++ ++/* Define bits representing exceptions in the FPU status word. */ ++enum ++ { ++ FE_INVALID = 1, ++#define FE_INVALID FE_INVALID ++ FE_OVERFLOW = 4, ++#define FE_OVERFLOW FE_OVERFLOW ++ FE_UNDERFLOW = 8, ++#define FE_UNDERFLOW FE_UNDERFLOW ++ FE_INEXACT = 16, ++#define FE_INEXACT FE_INEXACT ++ }; ++ ++/* Amount to shift by to convert an exception to a mask bit. */ ++#define FE_EXCEPT_SHIFT 5 ++ ++/* All supported exceptions. */ ++#define FE_ALL_EXCEPT \ ++ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++ ++/* IEEE rounding modes. */ ++enum ++ { ++ FE_TONEAREST = 0, ++#define FE_TONEAREST FE_TONEAREST ++ FE_TOWARDZERO = 0x400, ++#define FE_TOWARDZERO FE_TOWARDZERO ++ FE_DOWNWARD = 0x800, ++#define FE_DOWNWARD FE_DOWNWARD ++ FE_UPWARD = 0xc00, ++#define FE_UPWARD FE_UPWARD ++ }; ++ ++#define FE_ROUND_MASK (FE_UPWARD) ++ ++#else /* FPA */ ++ + /* Define bits representing exceptions in the FPU status word. */ + enum + { +@@ -44,6 +83,8 @@ + modes exist, but you have to encode them in the actual instruction. */ + #define FE_TONEAREST 0 + ++#endif ++ + /* Type representing exception flags. */ + typedef unsigned long int fexcept_t; + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +@@ -28,7 +28,11 @@ + #ifndef _ASM + /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ ++#ifdef __MAVERICK__ ++typedef int __jmp_buf[34]; ++#else + typedef int __jmp_buf[22]; + #endif ++#endif + + #endif +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,9 +18,21 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fegetround (void) + { ++#if defined(__MAVERICK__) ++ ++ unsigned long temp; ++ ++ _FPU_GETCW (temp); ++ return temp & FE_ROUND_MASK; ++ ++#else /* FPA */ ++ + return FE_TONEAREST; /* Easy. :-) */ ++ ++#endif + } +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +@@ -18,12 +18,28 @@ + 02111-1307 USA. */ + + #include ++#include + + int + fesetround (int round) + { ++#if defined(__MAVERICK__) ++ unsigned long temp; ++ ++ if (round & ~FE_ROUND_MASK) ++ return 1; ++ ++ _FPU_GETCW (temp); ++ temp = (temp & ~FE_ROUND_MASK) | round; ++ _FPU_SETCW (temp); ++ return 0; ++ ++#else /* FPA */ ++ + /* We only support FE_TONEAREST, so there is no need for any work. */ + return (round == FE_TONEAREST)?0:1; ++ ++#endif + } + + libm_hidden_def (fesetround) +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +@@ -1,5 +1,6 @@ + /* FPU control word definitions. ARM version. +- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. ++ Copyright (C) 1996, 1997, 1998, 2000, 2005 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,6 +21,79 @@ + #ifndef _FPU_CONTROL_H + #define _FPU_CONTROL_H + ++#if defined(__MAVERICK__) ++ ++/* DSPSC register: (from EP9312 User's Guide) ++ * ++ * bits 31..29 - DAID ++ * bits 28..26 - HVID ++ * bits 25..24 - RSVD ++ * bit 23 - ISAT ++ * bit 22 - UI ++ * bit 21 - INT ++ * bit 20 - AEXC ++ * bits 19..18 - SAT ++ * bits 17..16 - FCC ++ * bit 15 - V ++ * bit 14 - FWDEN ++ * bit 13 - Invalid ++ * bit 12 - Denorm ++ * bits 11..10 - RM ++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE ++ * bits 4..0 - IX, UF, OF, RSVD, IO ++ */ ++ ++/* masking of interrupts */ ++#define _FPU_MASK_IM (1 << 5) /* invalid operation */ ++#define _FPU_MASK_ZM 0 /* divide by zero */ ++#define _FPU_MASK_OM (1 << 7) /* overflow */ ++#define _FPU_MASK_UM (1 << 8) /* underflow */ ++#define _FPU_MASK_PM (1 << 9) /* inexact */ ++#define _FPU_MASK_DM 0 /* denormalized operation */ ++ ++#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ ++ ++#define _FPU_DEFAULT 0x00b00000 /* Default value. */ ++#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ ++ ++/* Type of the control word. */ ++typedef unsigned int fpu_control_t; ++ ++/* Macros for accessing the hardware control word. */ ++#define _FPU_GETCW(cw) ({ \ ++ register int __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv32sc mvdx0, dspsc\n\t" \ ++ "cfmvr64l %0, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ ++ ); \ ++}) ++ ++#define _FPU_SETCW(cw) ({ \ ++ register int __t0, __t1, __t2; \ ++ \ ++ __asm__ volatile ( \ ++ "cfmvr64l %1, mvdx0\n\t" \ ++ "cfmvr64h %2, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %0\n\t" \ ++ "cfmvsc32 dspsc, mvdx0\n\t" \ ++ "cfmv64lr mvdx0, %1\n\t" \ ++ "cfmv64hr mvdx0, %2" \ ++ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ ++ : "0" (cw) \ ++ ); \ ++}) ++ ++/* Default control word set at startup. */ ++extern fpu_control_t __fpu_control; ++ ++#else /* FPA */ ++ + /* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only +@@ -99,4 +173,6 @@ + /* Default control word set at startup. */ + extern fpu_control_t __fpu_control; + ++#endif ++ + #endif /* _FPU_CONTROL_H */ +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,4 +17,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define __JMP_BUF_SP 32 ++#else + #define __JMP_BUF_SP 20 ++#endif +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +@@ -24,11 +24,41 @@ + + ENTRY (__sigsetjmp) + /* Save registers */ ++#ifdef __MAVERICK__ ++ cfstrd mvd4, [r0], #8 ++ nop ++ cfstrd mvd5, [r0], #8 ++ nop ++ cfstrd mvd6, [r0], #8 ++ nop ++ cfstrd mvd7, [r0], #8 ++ nop ++ cfstrd mvd8, [r0], #8 ++ nop ++ cfstrd mvd9, [r0], #8 ++ nop ++ cfstrd mvd10, [r0], #8 ++ nop ++ cfstrd mvd11, [r0], #8 ++ nop ++ cfstrd mvd12, [r0], #8 ++ nop ++ cfstrd mvd13, [r0], #8 ++ nop ++ cfstrd mvd14, [r0], #8 ++ nop ++ cfstrd mvd15, [r0], #8 ++#else + sfmea f4, 4, [r0]! ++#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Restore pointer to jmp_buf */ ++#ifdef __MAVERICK__ ++ sub r0, r0, #96 ++#else + sub r0, r0, #48 ++#endif + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +@@ -17,6 +17,10 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#ifdef __MAVERICK__ ++#define FIRST_PSEUDO_REGISTER 43 ++#else + #define FIRST_PSEUDO_REGISTER 27 ++#endif + + #include +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +@@ -29,7 +29,7 @@ + #if defined(__ARMEB__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 1 +-#elif defined(__VFP_FP__) ++#elif defined(__VFP_FP__) || defined(__MAVERICK__) + # define IEEE_DOUBLE_MIXED_ENDIAN 0 + # define IEEE_DOUBLE_BIG_ENDIAN 0 + #else +diff -durN glibc-2.15.orig/ports/sysdeps/arm/bits/endian.h glibc-2.15/ports/sysdeps/arm/bits/endian.h +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.15/ports/sysdeps/arm/fpu/__longjmp.S +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/ports/sysdeps/arm/fpu/bits/fenv.h +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/ports/sysdeps/arm/fpu/bits/setjmp.h +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.15/ports/sysdeps/arm/fpu/fegetround.c +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.15/ports/sysdeps/arm/fpu/fesetround.c +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.15/ports/sysdeps/arm/fpu/fpu_control.h +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/ports/sysdeps/arm/fpu/jmpbuf-offsets.h +diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.15/ports/sysdeps/arm/fpu/setjmp.S +diff -durN glibc-2.15.orig/ports/sysdeps/arm/gccframe.h glibc-2.15/ports/sysdeps/arm/gccframe.h +diff -durN glibc-2.15.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.15/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc/ports-2.15/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.15/580-nptl-lowlevellock.patch new file mode 100644 index 0000000..a39e463 --- /dev/null +++ b/packages/glibc/ports-2.15/580-nptl-lowlevellock.patch @@ -0,0 +1,23 @@ +fix build error on arm like on hppa: + +arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include /* Need THREAD_*, and header.*. */ + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 +diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc/ports-2.15/610-fpu-cw-mips.patch b/packages/glibc/ports-2.15/610-fpu-cw-mips.patch new file mode 100644 index 0000000..8692a1f --- /dev/null +++ b/packages/glibc/ports-2.15/610-fpu-cw-mips.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html + +diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h +--- glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +@@ -86,7 +86,7 @@ + #define _FPU_RC_UP 0x2 + #define _FPU_RC_DOWN 0x3 + +-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ ++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ + + + /* The fdlibm code requires strict IEEE double precision arithmetic, +diff -durN glibc-2.15.orig/ports/sysdeps/mips/fpu_control.h glibc-2.15/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc/ports-2.15/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.15/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/ports-2.15/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/ports-2.15/640-alpha-atfcts.patch b/packages/glibc/ports-2.15/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/ports-2.15/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/ports-2.15/650-syslog.patch b/packages/glibc/ports-2.15/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/ports-2.15/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch new file mode 100644 index 0000000..59f95aa --- /dev/null +++ b/packages/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch @@ -0,0 +1,54 @@ +From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Tue, 20 May 2014 21:27:13 +0000 +Subject: [PATCH] Fix ARM build with GCC trunk. + +sysdeps/unix/sysv/linux/arm/unwind-resume.c and +sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static +variables that are written in C code but only read from toplevel asms. +Current GCC trunk now optimizes away such apparently write-only static +variables, so causing a build failure. This patch marks those +variables with __attribute_used__ to avoid that optimization. + +Tested that this fixes the build for ARM. + + * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c + (libgcc_s_resume): Use __attribute_used__. + * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): + Likewise. +--- + sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +index 6ccd9b4..660d148 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +@@ -22,7 +22,8 @@ + #include + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index bff3e2b..1f1eb71 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +@@ -20,7 +20,8 @@ + #include + #include + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + +-- +1.9.4 + diff --git a/packages/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..dce491c --- /dev/null +++ b/packages/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -668,6 +668,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/ports-2.16.0/180-resolv-dynamic.patch b/packages/glibc/ports-2.16.0/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/ports-2.16.0/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/ports-2.16.0/200-fadvise64_64.patch b/packages/glibc/ports-2.16.0/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/ports-2.16.0/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/ports-2.16.0/260-assume-pipe2.patch b/packages/glibc/ports-2.16.0/260-assume-pipe2.patch new file mode 100644 index 0000000..54f0382 --- /dev/null +++ b/packages/glibc/ports-2.16.0/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.16.0.orig/socket/have_sock_cloexec.c glibc-2.16.0/socket/have_sock_cloexec.c +--- glibc-2.16.0.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.16.0/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -15,9 +15,14 @@ + License along with the GNU C Library; if not, see + . */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/ports-2.16.0/270-china.patch b/packages/glibc/ports-2.16.0/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/ports-2.16.0/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/ports-2.16.0/280-new-valencian-locale.patch b/packages/glibc/ports-2.16.0/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/ports-2.16.0/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/ports-2.16.0/300-nscd-one-fork.patch b/packages/glibc/ports-2.16.0/300-nscd-one-fork.patch new file mode 100644 index 0000000..13b2861 --- /dev/null +++ b/packages/glibc/ports-2.16.0/300-nscd-one-fork.patch @@ -0,0 +1,43 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -203,6 +203,9 @@ + exit (0); + } + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -252,15 +255,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- if (run_mode == RUN_DAEMONIZE) +- { +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- } +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..11e8a65 --- /dev/null +++ b/packages/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -266,9 +266,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + gen-as-const-headers = pthread-errnos.sym + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/ports-2.16.0/330-m68k-sys-user.patch b/packages/glibc/ports-2.16.0/330-m68k-sys-user.patch new file mode 100644 index 0000000..f113996 --- /dev/null +++ b/packages/glibc/ports-2.16.0/330-m68k-sys-user.patch @@ -0,0 +1,97 @@ +copied from kernel as it is sanitized now + +diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +@@ -1,3 +1,90 @@ ++#ifndef _SYS_USER_H ++#define _SYS_USER_H ++ ++/* Core file format: The core file is written in such a way that gdb ++ can understand it and provide useful information to the user (under ++ linux we use the 'trad-core' bfd). There are quite a number of ++ obstacles to being able to view the contents of the floating point ++ registers, and until these are solved you will not be able to view the ++ contents of them. Actually, you can read in the core file and look at ++ the contents of the user struct to find out what the floating point ++ registers contain. ++ The actual file contents are as follows: ++ UPAGE: 1 page consisting of a user struct that tells gdb what is present ++ in the file. Directly after this is a copy of the task_struct, which ++ is currently not used by gdb, but it may come in useful at some point. ++ All of the registers are stored as part of the upage. The upage should ++ always be only one page. ++ DATA: The data area is stored. We use current->end_text to ++ current->brk to pick up all of the user variables, plus any memory ++ that may have been malloced. No attempt is made to determine if a page ++ is demand-zero or if a page is totally unused, we just cover the entire ++ range. All of the addresses are rounded in such a way that an integral ++ number of pages is written. ++ STACK: We need the stack information in order to get a meaningful ++ backtrace. We need to write the data from (esp) to ++ current->start_stack, so we round each of these off in order to be able ++ to write an integer number of pages. ++ The minimum core file size is 3 pages, or 12288 bytes. ++*/ ++ ++struct user_m68kfp_struct { ++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ ++ unsigned long fpcntl[3]; /* fp control regs */ ++}; ++ ++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and ++ is still the layout used by user (the new pt_regs doesn't have ++ all registers). */ ++struct user_regs_struct { ++ long d1,d2,d3,d4,d5,d6,d7; ++ long a0,a1,a2,a3,a4,a5,a6; ++ long d0; ++ long usp; ++ long orig_d0; ++ short stkadj; ++ short sr; ++ long pc; ++ short fmtvec; ++ short __fill; ++}; ++ ++ ++/* When the kernel dumps core, it starts by dumping the user struct - ++ this will be used by gdb to figure out where the data and stack segments ++ are within the file, and what virtual addresses to use. */ ++struct user{ ++/* We start with the registers, to mimic the way that "memory" is returned ++ from the ptrace(3,...) function. */ ++ struct user_regs_struct regs; /* Where the registers are actually stored */ ++/* ptrace does not yet supply these. Someday.... */ ++ int u_fpvalid; /* True if math co-processor being used. */ ++ /* for this mess. Not yet used. */ ++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ ++/* The rest of this junk is to help gdb figure out what goes where */ ++ unsigned long int u_tsize; /* Text segment size (pages). */ ++ unsigned long int u_dsize; /* Data segment size (pages). */ ++ unsigned long int u_ssize; /* Stack segment size (pages). */ ++ unsigned long start_code; /* Starting virtual address of text. */ ++ unsigned long start_stack; /* Starting virtual address of stack area. ++ This is actually the bottom of the stack, ++ the top of the stack is always found in the ++ esp register. */ ++ long int signal; /* Signal that caused the core dump. */ ++ int reserved; /* No longer used */ ++ struct user_regs_struct *u_ar0; ++ /* Used by gdb to help find the values for */ ++ /* the registers. */ ++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ ++ unsigned long magic; /* To uniquely identify a core file */ ++ char u_comm[32]; /* User command that was responsible */ ++}; ++#define NBPG 4096 ++#define UPAGES 1 ++#define HOST_TEXT_START_ADDR (u.start_code) ++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ++ ++#endif + /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc/ports-2.16.0/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.16.0/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/ports-2.16.0/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/ports-2.16.0/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.16.0/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/ports-2.16.0/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/ports-2.16.0/380-dont-build-timezone.patch b/packages/glibc/ports-2.16.0/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/ports-2.16.0/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/ports-2.16.0/400-alpha-xstat.patch b/packages/glibc/ports-2.16.0/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/ports-2.16.0/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/ports-2.16.0/430-alpha-creat.patch b/packages/glibc/ports-2.16.0/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/ports-2.16.0/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/ports-2.16.0/440-alpha-cache-shape.patch b/packages/glibc/ports-2.16.0/440-alpha-cache-shape.patch new file mode 100644 index 0000000..5b1a298 --- /dev/null +++ b/packages/glibc/ports-2.16.0/440-alpha-cache-shape.patch @@ -0,0 +1,13 @@ +older verisons of glibc would build dl-sysdep as shared-only and dl-support as +static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of +glibc build dl-sysdep as both shared and static which means we now have symbol +duplication for static builds with dl-sysdep and dl-support. since dl-sysdep +is both shared/static, there is no point in hooking dl-support anymore, so we +can punt it. + +diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +@@ -1,2 +1,1 @@ +-#include "dl-auxv.h" + #include diff --git a/packages/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch new file mode 100644 index 0000000..f2ff04f --- /dev/null +++ b/packages/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch @@ -0,0 +1,56 @@ +2006-05-30 Falk Hueffner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture + to ev6 in assembly code. + +{standard input}: Assembler messages: +{standard input}:341: Error: macro requires $at register while noat in effect +{standard input}:374: Error: macro requires $at register while noat in effect +{standard input}:438: Error: macro requires $at register while noat in effect +{standard input}:471: Error: macro requires $at register while noat in effect +make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 + +Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. +I cannot really think of anything better than + + ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +@@ -178,13 +178,13 @@ + static inline void + stb_mb(unsigned char val, unsigned long addr) + { +- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); ++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); + } + + static inline void + stw_mb(unsigned short val, unsigned long addr) + { +- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); ++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); + } + + static inline void +@@ -356,7 +356,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; + +- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); ++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; + } + +@@ -366,7 +366,7 @@ + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; + +- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); ++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; + } + +diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc/ports-2.16.0/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/ports-2.16.0/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..acf250d --- /dev/null +++ b/packages/glibc/ports-2.16.0/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -21,6 +21,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch new file mode 100644 index 0000000..42faaa5 --- /dev/null +++ b/packages/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch @@ -0,0 +1,21 @@ +2009-05-26 Aurelien Jarno + + * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). + + ports/sysdeps/alpha/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile +--- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +@@ -35,7 +35,8 @@ + + ifeq ($(subdir),elf) + # The ld.so startup code cannot use literals until it self-relocates. +-CFLAGS-rtld.c = -mbuild-constants ++# It uses more than 64k for the small data area. ++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) + endif + + # Build everything with full IEEE math support, and with dynamic rounding; +diff -durN glibc-2.16.0.orig/ports/sysdeps/alpha/Makefile glibc-2.16.0/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc/ports-2.16.0/560-ppc-atomic.patch b/packages/glibc/ports-2.16.0/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/ports-2.16.0/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/ports-2.16.0/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.16.0/580-nptl-lowlevellock.patch new file mode 100644 index 0000000..185331c --- /dev/null +++ b/packages/glibc/ports-2.16.0/580-nptl-lowlevellock.patch @@ -0,0 +1,23 @@ +fix build error on arm like on hppa: + +arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) + +diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include /* Need THREAD_*, and header.*. */ + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 +diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc/ports-2.16.0/610-fpu-cw-mips.patch b/packages/glibc/ports-2.16.0/610-fpu-cw-mips.patch new file mode 100644 index 0000000..0c0daf3 --- /dev/null +++ b/packages/glibc/ports-2.16.0/610-fpu-cw-mips.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html + +diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h +--- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +@@ -86,7 +86,7 @@ + #define _FPU_RC_UP 0x2 + #define _FPU_RC_DOWN 0x3 + +-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ ++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ + + + /* The fdlibm code requires strict IEEE double precision arithmetic, +diff -durN glibc-2.16.0.orig/ports/sysdeps/mips/fpu_control.h glibc-2.16.0/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc/ports-2.16.0/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.16.0/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/ports-2.16.0/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/ports-2.16.0/640-alpha-atfcts.patch b/packages/glibc/ports-2.16.0/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/ports-2.16.0/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/ports-2.16.0/650-syslog.patch b/packages/glibc/ports-2.16.0/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/ports-2.16.0/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/linux/2.6.32.27/100-unifdef-strclpy.patch b/packages/linux/2.6.32.27/100-unifdef-strclpy.patch new file mode 100644 index 0000000..072fac6 --- /dev/null +++ b/packages/linux/2.6.32.27/100-unifdef-strclpy.patch @@ -0,0 +1,11 @@ +--- linux-2.6.32.27/scripts/unifdef.c.orig 2017-03-08 21:42:27.000000000 -0800 ++++ linux-2.6.32.27/scripts/unifdef.c 2017-03-08 21:42:44.000000000 -0800 +@@ -72,8 +72,6 @@ + #include + #include + +-size_t strlcpy(char *dst, const char *src, size_t siz); +- + /* types of input lines: */ + typedef enum { + LT_TRUEI, /* a true #if with ignore flag */ diff --git a/packages/linux/2.6.32.27/version.desc b/packages/linux/2.6.32.27/version.desc new file mode 100644 index 0000000..3475dc2 --- /dev/null +++ b/packages/linux/2.6.32.27/version.desc @@ -0,0 +1 @@ +# Not obsolete: used by CentOS6.x, EOL 11/2020 diff --git a/packages/linux/2.6.33.7/version.desc b/packages/linux/2.6.33.7/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.33.7/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/2.6.34.7/version.desc b/packages/linux/2.6.34.7/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.34.7/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/2.6.35.9/version.desc b/packages/linux/2.6.35.9/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.35.9/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/2.6.36.4/version.desc b/packages/linux/2.6.36.4/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.36.4/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/2.6.37.6/version.desc b/packages/linux/2.6.37.6/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.37.6/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/2.6.38.8/version.desc b/packages/linux/2.6.38.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.38.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/2.6.39.4/version.desc b/packages/linux/2.6.39.4/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/2.6.39.4/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.0.101/version.desc b/packages/linux/3.0.101/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.0.101/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.1.10/version.desc b/packages/linux/3.1.10/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.1.10/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.10.105/version.desc b/packages/linux/3.10.105/version.desc new file mode 100644 index 0000000..7c0a082 --- /dev/null +++ b/packages/linux/3.10.105/version.desc @@ -0,0 +1 @@ +# Not obsolete: used by CentOS7.x, EOL 06/2024 diff --git a/packages/linux/3.11.10/version.desc b/packages/linux/3.11.10/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.11.10/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.12.72/version.desc b/packages/linux/3.12.72/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/linux/3.13.11/version.desc b/packages/linux/3.13.11/version.desc new file mode 100644 index 0000000..89c1908 --- /dev/null +++ b/packages/linux/3.13.11/version.desc @@ -0,0 +1 @@ +# Not obsolete: used by Ubuntu14.04, EOL 04/2019 diff --git a/packages/linux/3.14.79/version.desc b/packages/linux/3.14.79/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.14.79/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.15.10/version.desc b/packages/linux/3.15.10/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.15.10/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.16.42/version.desc b/packages/linux/3.16.42/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/linux/3.17.8/version.desc b/packages/linux/3.17.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.17.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.18.48/version.desc b/packages/linux/3.18.48/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.18.48/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.19.8/version.desc b/packages/linux/3.19.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.19.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.2.87/version.desc b/packages/linux/3.2.87/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/linux/3.3.8/version.desc b/packages/linux/3.3.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.3.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.4.113/version.desc b/packages/linux/3.4.113/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/linux/3.5.7/version.desc b/packages/linux/3.5.7/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.5.7/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.6.11/version.desc b/packages/linux/3.6.11/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.6.11/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.7.10/version.desc b/packages/linux/3.7.10/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.7.10/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.8.13/version.desc b/packages/linux/3.8.13/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.8.13/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/3.9.11/version.desc b/packages/linux/3.9.11/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/3.9.11/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.0.9/version.desc b/packages/linux/4.0.9/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.0.9/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.1.39/version.desc b/packages/linux/4.1.39/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/linux/4.10.8/version.desc b/packages/linux/4.10.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.10.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.2.8/version.desc b/packages/linux/4.2.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.2.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.3.6/version.desc b/packages/linux/4.3.6/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.3.6/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.4.59/version.desc b/packages/linux/4.4.59/version.desc new file mode 100644 index 0000000..7d5188f --- /dev/null +++ b/packages/linux/4.4.59/version.desc @@ -0,0 +1 @@ +# Not obsolete: used by Ubuntu16.04, EOL 04/2021 diff --git a/packages/linux/4.5.7/version.desc b/packages/linux/4.5.7/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.5.7/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.6.7/version.desc b/packages/linux/4.6.7/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.6.7/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.7.10/version.desc b/packages/linux/4.7.10/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.7.10/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.8.17/version.desc b/packages/linux/4.8.17/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/linux/4.8.17/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/linux/4.9.20/version.desc b/packages/linux/4.9.20/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/linux/package.desc b/packages/linux/package.desc new file mode 100644 index 0000000..2e5f7a3 --- /dev/null +++ b/packages/linux/package.desc @@ -0,0 +1 @@ +repository="git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" diff --git a/packages/mingw-w64/package.desc b/packages/mingw-w64/package.desc new file mode 100644 index 0000000..7bae1f7 --- /dev/null +++ b/packages/mingw-w64/package.desc @@ -0,0 +1 @@ +repository="git https://git.code.sf.net/p/mingw-w64/mingw-w64" diff --git a/packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v2.0.7/version.desc b/packages/mingw-w64/v2.0.7/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v2.0.7/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v2.0.8/version.desc b/packages/mingw-w64/v2.0.8/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v2.0.8/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v2.0.9/version.desc b/packages/mingw-w64/v2.0.9/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v2.0.9/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v3.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v3.0.0/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v3.0.0/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v3.0.0/version.desc b/packages/mingw-w64/v3.0.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v3.0.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v3.1.0/100-mingw64-malloc.patch b/packages/mingw-w64/v3.1.0/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v3.1.0/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v3.1.0/version.desc b/packages/mingw-w64/v3.1.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v3.1.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v3.2.0/100-mingw64-malloc.patch b/packages/mingw-w64/v3.2.0/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v3.2.0/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v3.2.0/version.desc b/packages/mingw-w64/v3.2.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v3.2.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v3.3.0/100-mingw64-malloc.patch b/packages/mingw-w64/v3.3.0/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v3.3.0/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v3.3.0/version.desc b/packages/mingw-w64/v3.3.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v3.3.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v4.0.0/version.desc b/packages/mingw-w64/v4.0.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v4.0.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v4.0.1/version.desc b/packages/mingw-w64/v4.0.1/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v4.0.1/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v4.0.2/version.desc b/packages/mingw-w64/v4.0.2/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v4.0.2/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v4.0.4/version.desc b/packages/mingw-w64/v4.0.4/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v4.0.4/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v4.0.5/version.desc b/packages/mingw-w64/v4.0.5/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v4.0.5/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v4.0.6/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.6/100-mingw64-malloc.patch new file mode 100644 index 0000000..d9d5a61 --- /dev/null +++ b/packages/mingw-w64/v4.0.6/100-mingw64-malloc.patch @@ -0,0 +1,27 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v4.0.6/version.desc b/packages/mingw-w64/v4.0.6/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch new file mode 100644 index 0000000..3d05b63 --- /dev/null +++ b/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch @@ -0,0 +1,55 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 +@@ -12,9 +12,8 @@ + #define PATHTOOLS_H + + #include +-#if defined(__APPLE__) + #include +-#else ++#if defined(HAVE_MALLOC_H) + #include + #endif + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 +@@ -8,9 +8,8 @@ + .email: . + */ + +-#if defined(__APPLE__) + #include +-#else ++#if defined(HAVE_MALLOC_H) + #include + #endif + #include diff --git a/packages/mingw-w64/v5.0.0/version.desc b/packages/mingw-w64/v5.0.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/mingw-w64/v5.0.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch new file mode 100644 index 0000000..3d05b63 --- /dev/null +++ b/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch @@ -0,0 +1,55 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 +@@ -12,9 +12,8 @@ + #define PATHTOOLS_H + + #include +-#if defined(__APPLE__) + #include +-#else ++#if defined(HAVE_MALLOC_H) + #include + #endif + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 +@@ -8,9 +8,8 @@ + .email: . + */ + +-#if defined(__APPLE__) + #include +-#else ++#if defined(HAVE_MALLOC_H) + #include + #endif + #include diff --git a/packages/mingw-w64/v5.0.1/version.desc b/packages/mingw-w64/v5.0.1/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/mingw-w64/v5.0.2/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.2/100-mingw64-malloc.patch new file mode 100644 index 0000000..3d05b63 --- /dev/null +++ b/packages/mingw-w64/v5.0.2/100-mingw64-malloc.patch @@ -0,0 +1,55 @@ +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 +@@ -12,9 +12,8 @@ + #define PATHTOOLS_H + + #include +-#if defined(__APPLE__) + #include +-#else ++#if defined(HAVE_MALLOC_H) + #include + #endif + #include +diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c +--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 ++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 +@@ -8,9 +8,8 @@ + .email: . + */ + +-#if defined(__APPLE__) + #include +-#else ++#if defined(HAVE_MALLOC_H) + #include + #endif + #include diff --git a/packages/mingw-w64/v5.0.2/version.desc b/packages/mingw-w64/v5.0.2/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/musl/1.1.15/version.desc b/packages/musl/1.1.15/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/musl/1.1.15/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/musl/1.1.16/version.desc b/packages/musl/1.1.16/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/musl/package.desc b/packages/musl/package.desc new file mode 100644 index 0000000..23870dd --- /dev/null +++ b/packages/musl/package.desc @@ -0,0 +1 @@ +repository="git git://git.musl-libc.org/musl" diff --git a/packages/newlib-linaro/2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib-linaro/2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib-linaro/2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib-linaro/2.1.0-2014.09/110-fix-eabihf.patch b/packages/newlib-linaro/2.1.0-2014.09/110-fix-eabihf.patch new file mode 100644 index 0000000..21a3149 --- /dev/null +++ b/packages/newlib-linaro/2.1.0-2014.09/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure newlib-linaro-2.1.0-2014.09/libgloss/arm/configure +--- newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure 2017-04-11 00:41:25.484880978 -0700 ++++ newlib-linaro-2.1.0-2014.09/libgloss/arm/configure 2017-04-11 00:43:12.341789130 -0700 +@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure.in newlib-linaro-2.1.0-2014.09/libgloss/arm/configure.in +--- newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.484880978 -0700 ++++ newlib-linaro-2.1.0-2014.09/libgloss/arm/configure.in 2017-04-11 00:43:12.341789130 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib-linaro/2.1.0-2014.09/200-fix-mt-cflags.patch b/packages/newlib-linaro/2.1.0-2014.09/200-fix-mt-cflags.patch new file mode 100644 index 0000000..f64c170 --- /dev/null +++ b/packages/newlib-linaro/2.1.0-2014.09/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-linaro-2.1.0-2014.09.orig/config/mt-d30v newlib-linaro-2.1.0-2014.09/config/mt-d30v +--- newlib-linaro-2.1.0-2014.09.orig/config/mt-d30v 2017-04-11 00:51:28.188768929 -0700 ++++ newlib-linaro-2.1.0-2014.09/config/mt-d30v 2017-04-11 00:55:51.142626761 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-linaro-2.1.0-2014.09.orig/config/mt-gnu newlib-linaro-2.1.0-2014.09/config/mt-gnu +--- newlib-linaro-2.1.0-2014.09.orig/config/mt-gnu 2017-04-11 00:51:28.188768929 -0700 ++++ newlib-linaro-2.1.0-2014.09/config/mt-gnu 2017-04-11 00:55:51.142626761 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-linaro-2.1.0-2014.09.orig/config/mt-ospace newlib-linaro-2.1.0-2014.09/config/mt-ospace +--- newlib-linaro-2.1.0-2014.09.orig/config/mt-ospace 2017-04-11 00:51:28.188768929 -0700 ++++ newlib-linaro-2.1.0-2014.09/config/mt-ospace 2017-04-11 00:55:51.142626761 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib-linaro/2.1.0-2014.09/version.desc b/packages/newlib-linaro/2.1.0-2014.09/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib-linaro/2.1.0-2014.09/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib-linaro/2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib-linaro/2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib-linaro/2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib-linaro/2.2.0-2015.01/110-fix-eabihf.patch b/packages/newlib-linaro/2.2.0-2015.01/110-fix-eabihf.patch new file mode 100644 index 0000000..1fa21cc --- /dev/null +++ b/packages/newlib-linaro/2.2.0-2015.01/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure newlib-linaro-2.2.0-2015.01/libgloss/arm/configure +--- newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure 2017-04-11 00:41:25.672882574 -0700 ++++ newlib-linaro-2.2.0-2015.01/libgloss/arm/configure 2017-04-11 00:43:12.349789198 -0700 +@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure.in newlib-linaro-2.2.0-2015.01/libgloss/arm/configure.in +--- newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.672882574 -0700 ++++ newlib-linaro-2.2.0-2015.01/libgloss/arm/configure.in 2017-04-11 00:43:12.349789198 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib-linaro/2.2.0-2015.01/200-fix-mt-cflags.patch b/packages/newlib-linaro/2.2.0-2015.01/200-fix-mt-cflags.patch new file mode 100644 index 0000000..68e935b --- /dev/null +++ b/packages/newlib-linaro/2.2.0-2015.01/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-linaro-2.2.0-2015.01.orig/config/mt-d30v newlib-linaro-2.2.0-2015.01/config/mt-d30v +--- newlib-linaro-2.2.0-2015.01.orig/config/mt-d30v 2017-04-11 00:51:28.364770125 -0700 ++++ newlib-linaro-2.2.0-2015.01/config/mt-d30v 2017-04-11 00:55:51.142626761 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-linaro-2.2.0-2015.01.orig/config/mt-gnu newlib-linaro-2.2.0-2015.01/config/mt-gnu +--- newlib-linaro-2.2.0-2015.01.orig/config/mt-gnu 2017-04-11 00:51:28.364770125 -0700 ++++ newlib-linaro-2.2.0-2015.01/config/mt-gnu 2017-04-11 00:55:51.142626761 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-linaro-2.2.0-2015.01.orig/config/mt-ospace newlib-linaro-2.2.0-2015.01/config/mt-ospace +--- newlib-linaro-2.2.0-2015.01.orig/config/mt-ospace 2017-04-11 00:51:28.368770153 -0700 ++++ newlib-linaro-2.2.0-2015.01/config/mt-ospace 2017-04-11 00:55:51.142626761 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib-linaro/2.2.0-2015.01/version.desc b/packages/newlib-linaro/2.2.0-2015.01/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib-linaro/2.2.0-2015.01/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib-linaro/package.desc b/packages/newlib-linaro/package.desc new file mode 100644 index 0000000..d1bc373 --- /dev/null +++ b/packages/newlib-linaro/package.desc @@ -0,0 +1,4 @@ +origin="Linaro" +master="newlib" +repository="git https://git.linaro.org/toolchain/newlib.git" +experimental="yes" diff --git a/packages/newlib/1.17.0/110-fix-eabihf.patch b/packages/newlib/1.17.0/110-fix-eabihf.patch new file mode 100644 index 0000000..d896ad0 --- /dev/null +++ b/packages/newlib/1.17.0/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-1.17.0.orig/libgloss/arm/configure newlib-1.17.0/libgloss/arm/configure +--- newlib-1.17.0.orig/libgloss/arm/configure 2017-04-11 00:41:23.720866007 -0700 ++++ newlib-1.17.0/libgloss/arm/configure 2017-04-11 00:43:12.265788484 -0700 +@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-1.17.0.orig/libgloss/arm/configure.in newlib-1.17.0/libgloss/arm/configure.in +--- newlib-1.17.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:23.720866007 -0700 ++++ newlib-1.17.0/libgloss/arm/configure.in 2017-04-11 00:43:12.265788484 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/1.17.0/200-fix-mt-cflags.patch b/packages/newlib/1.17.0/200-fix-mt-cflags.patch new file mode 100644 index 0000000..f97ba15 --- /dev/null +++ b/packages/newlib/1.17.0/200-fix-mt-cflags.patch @@ -0,0 +1,26 @@ +diff -urpN newlib-1.17.0.orig/config/mt-d30v newlib-1.17.0/config/mt-d30v +--- newlib-1.17.0.orig/config/mt-d30v 2017-04-11 00:51:26.572757941 -0700 ++++ newlib-1.17.0/config/mt-d30v 2017-04-11 00:55:51.110626527 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-1.17.0.orig/config/mt-gnu newlib-1.17.0/config/mt-gnu +--- newlib-1.17.0.orig/config/mt-gnu 2017-04-11 00:51:26.572757941 -0700 ++++ newlib-1.17.0/config/mt-gnu 2017-04-11 00:55:51.110626527 -0700 +@@ -1,2 +1,2 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \ ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \ + $(DEBUG_PREFIX_CFLAGS_FOR_TARGET) -D_GNU_SOURCE +diff -urpN newlib-1.17.0.orig/config/mt-ospace newlib-1.17.0/config/mt-ospace +--- newlib-1.17.0.orig/config/mt-ospace 2017-04-11 00:51:26.572757941 -0700 ++++ newlib-1.17.0/config/mt-ospace 2017-04-11 00:55:51.110626527 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/1.17.0/999-fix-arm-build.patch b/packages/newlib/1.17.0/999-fix-arm-build.patch new file mode 100644 index 0000000..154a92f --- /dev/null +++ b/packages/newlib/1.17.0/999-fix-arm-build.patch @@ -0,0 +1,62 @@ +diff -urpN newlib-1.17.0.orig/libgloss/arm/linux-syscalls0.S newlib-1.17.0/libgloss/arm/linux-syscalls0.S +--- newlib-1.17.0.orig/libgloss/arm/linux-syscalls0.S 2017-04-10 23:18:30.559142019 -0700 ++++ newlib-1.17.0/libgloss/arm/linux-syscalls0.S 2017-04-10 23:35:06.422568832 -0700 +@@ -19,47 +19,6 @@ + #define GLOBAL(name) .global name; FUNC(name) + #define SIZE(name) .size name, .-name + +-#if __thumb__ +- +-# define SYSCALL0(name) \ +- GLOBAL(_ ## name); \ +- mov r12, r7; \ +- mov r7, #SYS_ ## name; \ +- swi; \ +- mov r7, r12; \ +- b _set_errno; \ +- SIZE(_ ## name) +- +-/* static int _syscall3(int a, int b, int c, int number); */ +-FUNC(_syscall3) +- push { r7 } +- mov r7, r3 +- swi +- pop { r7 } +- b _set_errno +- SIZE(_syscall3) +- +-# define SYSCALL3(name) \ +- GLOBAL(_ ## name); \ +- mov r3, #SYS_ ## name; \ +- b _syscall3; \ +- SIZE(_ ## name) +- +-# define SYSCALL6(name) \ +- GLOBAL(_ ## name); \ +- push { r4 - r5, r7 }; \ +- ldr r4, [sp, #12]; \ +- ldr r5, [sp, #16]; \ +- mov r7, #SYS_ ## name; \ +- swi; \ +- pop { r4 - r5, r7 }; \ +- b _set_errno; \ +- SIZE(_ ## name) +- +-# define SYSCALL4(name) SYSCALL6(name) +- +-#else /* __thumb__ */ +- + # define SYSCALL4(name) \ + GLOBAL(_ ## name); \ + swi #SYS_ ## name; \ +@@ -78,9 +37,6 @@ FUNC(_syscall3) + + #define SYSCALL0(name) SYSCALL3(name) + #define SYSCALL3(name) SYSCALL4(name) +- +-#endif /* __thumb__ */ +- + #define SYSCALL1(name) SYSCALL3(name) + #define SYSCALL2(name) SYSCALL3(name) + #define SYSCALL5(name) SYSCALL6(name) +Binary files newlib-1.17.0.orig/libgloss/arm/.linux-syscalls0.S.swp and newlib-1.17.0/libgloss/arm/.linux-syscalls0.S.swp differ diff --git a/packages/newlib/1.17.0/version.desc b/packages/newlib/1.17.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/1.17.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..6214ee5 --- /dev/null +++ b/packages/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,23 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.18.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mcpu32__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/1.18.0/110-fix-eabihf.patch b/packages/newlib/1.18.0/110-fix-eabihf.patch new file mode 100644 index 0000000..c2868b9 --- /dev/null +++ b/packages/newlib/1.18.0/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-1.18.0.orig/libgloss/arm/configure newlib-1.18.0/libgloss/arm/configure +--- newlib-1.18.0.orig/libgloss/arm/configure 2017-04-11 00:41:23.864867229 -0700 ++++ newlib-1.18.0/libgloss/arm/configure 2017-04-11 00:43:12.273788551 -0700 +@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-1.18.0.orig/libgloss/arm/configure.in newlib-1.18.0/libgloss/arm/configure.in +--- newlib-1.18.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:23.864867229 -0700 ++++ newlib-1.18.0/libgloss/arm/configure.in 2017-04-11 00:43:12.273788551 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/1.18.0/200-fix-mt-cflags.patch b/packages/newlib/1.18.0/200-fix-mt-cflags.patch new file mode 100644 index 0000000..718e0c9 --- /dev/null +++ b/packages/newlib/1.18.0/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-1.18.0.orig/config/mt-d30v newlib-1.18.0/config/mt-d30v +--- newlib-1.18.0.orig/config/mt-d30v 2017-04-11 00:51:26.740759083 -0700 ++++ newlib-1.18.0/config/mt-d30v 2017-04-11 00:55:51.114626557 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-1.18.0.orig/config/mt-gnu newlib-1.18.0/config/mt-gnu +--- newlib-1.18.0.orig/config/mt-gnu 2017-04-11 00:51:26.740759083 -0700 ++++ newlib-1.18.0/config/mt-gnu 2017-04-11 00:55:51.114626557 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-1.18.0.orig/config/mt-ospace newlib-1.18.0/config/mt-ospace +--- newlib-1.18.0.orig/config/mt-ospace 2017-04-11 00:51:26.740759083 -0700 ++++ newlib-1.18.0/config/mt-ospace 2017-04-11 00:55:51.114626557 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/1.18.0/version.desc b/packages/newlib/1.18.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/1.18.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..191363a --- /dev/null +++ b/packages/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,25 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.19.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.19.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.19.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/1.19.0/110-fix-eabihf.patch b/packages/newlib/1.19.0/110-fix-eabihf.patch new file mode 100644 index 0000000..69ddff3 --- /dev/null +++ b/packages/newlib/1.19.0/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-1.19.0.orig/libgloss/arm/configure newlib-1.19.0/libgloss/arm/configure +--- newlib-1.19.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.072868994 -0700 ++++ newlib-1.19.0/libgloss/arm/configure 2017-04-11 00:43:12.281788619 -0700 +@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-1.19.0.orig/libgloss/arm/configure.in newlib-1.19.0/libgloss/arm/configure.in +--- newlib-1.19.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.072868994 -0700 ++++ newlib-1.19.0/libgloss/arm/configure.in 2017-04-11 00:43:12.281788619 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/1.19.0/200-fix-mt-cflags.patch b/packages/newlib/1.19.0/200-fix-mt-cflags.patch new file mode 100644 index 0000000..9158e90 --- /dev/null +++ b/packages/newlib/1.19.0/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-1.19.0.orig/config/mt-d30v newlib-1.19.0/config/mt-d30v +--- newlib-1.19.0.orig/config/mt-d30v 2017-04-11 00:51:26.912760252 -0700 ++++ newlib-1.19.0/config/mt-d30v 2017-04-11 00:55:51.118626585 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-1.19.0.orig/config/mt-gnu newlib-1.19.0/config/mt-gnu +--- newlib-1.19.0.orig/config/mt-gnu 2017-04-11 00:51:26.912760252 -0700 ++++ newlib-1.19.0/config/mt-gnu 2017-04-11 00:55:51.118626585 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-1.19.0.orig/config/mt-ospace newlib-1.19.0/config/mt-ospace +--- newlib-1.19.0.orig/config/mt-ospace 2017-04-11 00:51:26.912760252 -0700 ++++ newlib-1.19.0/config/mt-ospace 2017-04-11 00:55:51.118626585 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/1.19.0/version.desc b/packages/newlib/1.19.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/1.19.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/1.20.0/110-fix-eabihf.patch b/packages/newlib/1.20.0/110-fix-eabihf.patch new file mode 100644 index 0000000..8e30823 --- /dev/null +++ b/packages/newlib/1.20.0/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-1.20.0.orig/libgloss/arm/configure newlib-1.20.0/libgloss/arm/configure +--- newlib-1.20.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.120869401 -0700 ++++ newlib-1.20.0/libgloss/arm/configure 2017-04-11 00:43:12.289788688 -0700 +@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-1.20.0.orig/libgloss/arm/configure.in newlib-1.20.0/libgloss/arm/configure.in +--- newlib-1.20.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.120869401 -0700 ++++ newlib-1.20.0/libgloss/arm/configure.in 2017-04-11 00:43:12.289788688 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/1.20.0/200-fix-mt-cflags.patch b/packages/newlib/1.20.0/200-fix-mt-cflags.patch new file mode 100644 index 0000000..b470af7 --- /dev/null +++ b/packages/newlib/1.20.0/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-1.20.0.orig/config/mt-d30v newlib-1.20.0/config/mt-d30v +--- newlib-1.20.0.orig/config/mt-d30v 2017-04-11 00:51:27.080761393 -0700 ++++ newlib-1.20.0/config/mt-d30v 2017-04-11 00:55:51.122626615 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-1.20.0.orig/config/mt-gnu newlib-1.20.0/config/mt-gnu +--- newlib-1.20.0.orig/config/mt-gnu 2017-04-11 00:51:27.080761393 -0700 ++++ newlib-1.20.0/config/mt-gnu 2017-04-11 00:55:51.122626615 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-1.20.0.orig/config/mt-ospace newlib-1.20.0/config/mt-ospace +--- newlib-1.20.0.orig/config/mt-ospace 2017-04-11 00:51:27.080761393 -0700 ++++ newlib-1.20.0/config/mt-ospace 2017-04-11 00:55:51.122626615 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/1.20.0/version.desc b/packages/newlib/1.20.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/1.20.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/2.0.0/110-fix-eabihf.patch b/packages/newlib/2.0.0/110-fix-eabihf.patch new file mode 100644 index 0000000..5bb2405 --- /dev/null +++ b/packages/newlib/2.0.0/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-2.0.0.orig/libgloss/arm/configure newlib-2.0.0/libgloss/arm/configure +--- newlib-2.0.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.304870963 -0700 ++++ newlib-2.0.0/libgloss/arm/configure 2017-04-11 00:43:12.297788756 -0700 +@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-2.0.0.orig/libgloss/arm/configure.in newlib-2.0.0/libgloss/arm/configure.in +--- newlib-2.0.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.304870963 -0700 ++++ newlib-2.0.0/libgloss/arm/configure.in 2017-04-11 00:43:12.297788756 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/2.0.0/200-fix-mt-cflags.patch b/packages/newlib/2.0.0/200-fix-mt-cflags.patch new file mode 100644 index 0000000..d2b0529 --- /dev/null +++ b/packages/newlib/2.0.0/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-2.0.0.orig/config/mt-d30v newlib-2.0.0/config/mt-d30v +--- newlib-2.0.0.orig/config/mt-d30v 2017-04-11 00:51:27.256762590 -0700 ++++ newlib-2.0.0/config/mt-d30v 2017-04-11 00:55:51.126626644 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-2.0.0.orig/config/mt-gnu newlib-2.0.0/config/mt-gnu +--- newlib-2.0.0.orig/config/mt-gnu 2017-04-11 00:51:27.256762590 -0700 ++++ newlib-2.0.0/config/mt-gnu 2017-04-11 00:55:51.126626644 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-2.0.0.orig/config/mt-ospace newlib-2.0.0/config/mt-ospace +--- newlib-2.0.0.orig/config/mt-ospace 2017-04-11 00:51:27.256762590 -0700 ++++ newlib-2.0.0/config/mt-ospace 2017-04-11 00:55:51.126626644 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/2.0.0/version.desc b/packages/newlib/2.0.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/2.0.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/2.1.0/110-fix-eabihf.patch b/packages/newlib/2.1.0/110-fix-eabihf.patch new file mode 100644 index 0000000..5f91a23 --- /dev/null +++ b/packages/newlib/2.1.0/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-2.1.0.orig/libgloss/arm/configure newlib-2.1.0/libgloss/arm/configure +--- newlib-2.1.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.592873407 -0700 ++++ newlib-2.1.0/libgloss/arm/configure 2017-04-11 00:43:12.305788823 -0700 +@@ -2541,7 +2541,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-2.1.0.orig/libgloss/arm/configure.in newlib-2.1.0/libgloss/arm/configure.in +--- newlib-2.1.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.592873407 -0700 ++++ newlib-2.1.0/libgloss/arm/configure.in 2017-04-11 00:43:12.305788823 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi) ++ *-*-elf | *-*-eabi*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/2.1.0/200-fix-mt-cflags.patch b/packages/newlib/2.1.0/200-fix-mt-cflags.patch new file mode 100644 index 0000000..57839ed --- /dev/null +++ b/packages/newlib/2.1.0/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-2.1.0.orig/config/mt-d30v newlib-2.1.0/config/mt-d30v +--- newlib-2.1.0.orig/config/mt-d30v 2017-04-11 00:51:27.380763434 -0700 ++++ newlib-2.1.0/config/mt-d30v 2017-04-11 00:55:51.130626674 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-2.1.0.orig/config/mt-gnu newlib-2.1.0/config/mt-gnu +--- newlib-2.1.0.orig/config/mt-gnu 2017-04-11 00:51:27.380763434 -0700 ++++ newlib-2.1.0/config/mt-gnu 2017-04-11 00:55:51.130626674 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-2.1.0.orig/config/mt-ospace newlib-2.1.0/config/mt-ospace +--- newlib-2.1.0.orig/config/mt-ospace 2017-04-11 00:51:27.380763434 -0700 ++++ newlib-2.1.0/config/mt-ospace 2017-04-11 00:55:51.130626674 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/2.1.0/version.desc b/packages/newlib/2.1.0/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/2.1.0/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/2.2.0.20151023/110-fix-eabihf.patch b/packages/newlib/2.2.0.20151023/110-fix-eabihf.patch new file mode 100644 index 0000000..2d5a3ff --- /dev/null +++ b/packages/newlib/2.2.0.20151023/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-2.2.0.20151023.orig/libgloss/arm/configure newlib-2.2.0.20151023/libgloss/arm/configure +--- newlib-2.2.0.20151023.orig/libgloss/arm/configure 2017-04-11 00:41:24.816875309 -0700 ++++ newlib-2.2.0.20151023/libgloss/arm/configure 2017-04-11 00:43:12.313788892 -0700 +@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-2.2.0.20151023.orig/libgloss/arm/configure.in newlib-2.2.0.20151023/libgloss/arm/configure.in +--- newlib-2.2.0.20151023.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.816875309 -0700 ++++ newlib-2.2.0.20151023/libgloss/arm/configure.in 2017-04-11 00:43:12.313788892 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/2.2.0.20151023/200-fix-mt-cflags.patch b/packages/newlib/2.2.0.20151023/200-fix-mt-cflags.patch new file mode 100644 index 0000000..e1d8c02 --- /dev/null +++ b/packages/newlib/2.2.0.20151023/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-2.2.0.20151023.orig/config/mt-d30v newlib-2.2.0.20151023/config/mt-d30v +--- newlib-2.2.0.20151023.orig/config/mt-d30v 2017-04-11 00:51:27.580764794 -0700 ++++ newlib-2.2.0.20151023/config/mt-d30v 2017-04-11 00:55:51.130626674 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-2.2.0.20151023.orig/config/mt-gnu newlib-2.2.0.20151023/config/mt-gnu +--- newlib-2.2.0.20151023.orig/config/mt-gnu 2017-04-11 00:51:27.576764766 -0700 ++++ newlib-2.2.0.20151023/config/mt-gnu 2017-04-11 00:55:51.130626674 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-2.2.0.20151023.orig/config/mt-ospace newlib-2.2.0.20151023/config/mt-ospace +--- newlib-2.2.0.20151023.orig/config/mt-ospace 2017-04-11 00:51:27.576764766 -0700 ++++ newlib-2.2.0.20151023/config/mt-ospace 2017-04-11 00:55:51.130626674 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/2.2.0.20151023/version.desc b/packages/newlib/2.2.0.20151023/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/2.2.0.20151023/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/2.3.0.20160226/110-fix-eabihf.patch b/packages/newlib/2.3.0.20160226/110-fix-eabihf.patch new file mode 100644 index 0000000..37d8842 --- /dev/null +++ b/packages/newlib/2.3.0.20160226/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-2.3.0.20160226.orig/libgloss/arm/configure newlib-2.3.0.20160226/libgloss/arm/configure +--- newlib-2.3.0.20160226.orig/libgloss/arm/configure 2017-04-11 00:41:25.064877413 -0700 ++++ newlib-2.3.0.20160226/libgloss/arm/configure 2017-04-11 00:43:12.321788960 -0700 +@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-2.3.0.20160226.orig/libgloss/arm/configure.in newlib-2.3.0.20160226/libgloss/arm/configure.in +--- newlib-2.3.0.20160226.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.064877413 -0700 ++++ newlib-2.3.0.20160226/libgloss/arm/configure.in 2017-04-11 00:43:12.321788960 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/2.3.0.20160226/200-fix-mt-cflags.patch b/packages/newlib/2.3.0.20160226/200-fix-mt-cflags.patch new file mode 100644 index 0000000..8c080e4 --- /dev/null +++ b/packages/newlib/2.3.0.20160226/200-fix-mt-cflags.patch @@ -0,0 +1,25 @@ +diff -urpN newlib-2.3.0.20160226.orig/config/mt-d30v newlib-2.3.0.20160226/config/mt-d30v +--- newlib-2.3.0.20160226.orig/config/mt-d30v 2017-04-11 00:51:27.736765855 -0700 ++++ newlib-2.3.0.20160226/config/mt-d30v 2017-04-11 00:55:51.134626702 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C +diff -urpN newlib-2.3.0.20160226.orig/config/mt-gnu newlib-2.3.0.20160226/config/mt-gnu +--- newlib-2.3.0.20160226.orig/config/mt-gnu 2017-04-11 00:51:27.736765855 -0700 ++++ newlib-2.3.0.20160226/config/mt-gnu 2017-04-11 00:55:51.134626702 -0700 +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE +diff -urpN newlib-2.3.0.20160226.orig/config/mt-ospace newlib-2.3.0.20160226/config/mt-ospace +--- newlib-2.3.0.20160226.orig/config/mt-ospace 2017-04-11 00:51:27.736765855 -0700 ++++ newlib-2.3.0.20160226/config/mt-ospace 2017-04-11 00:55:51.134626702 -0700 +@@ -1,3 +1,3 @@ + # Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/packages/newlib/2.3.0.20160226/version.desc b/packages/newlib/2.3.0.20160226/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/2.3.0.20160226/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/2.4.0.20161025/110-fix-eabihf.patch b/packages/newlib/2.4.0.20161025/110-fix-eabihf.patch new file mode 100644 index 0000000..65122f1 --- /dev/null +++ b/packages/newlib/2.4.0.20161025/110-fix-eabihf.patch @@ -0,0 +1,24 @@ +diff -urpN newlib-2.4.0.20161025.orig/libgloss/arm/configure newlib-2.4.0.20161025/libgloss/arm/configure +--- newlib-2.4.0.20161025.orig/libgloss/arm/configure 2017-04-11 00:41:25.240878908 -0700 ++++ newlib-2.4.0.20161025/libgloss/arm/configure 2017-04-11 00:43:12.325788994 -0700 +@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA + + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) +diff -urpN newlib-2.4.0.20161025.orig/libgloss/arm/configure.in newlib-2.4.0.20161025/libgloss/arm/configure.in +--- newlib-2.4.0.20161025.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.236878874 -0700 ++++ newlib-2.4.0.20161025/libgloss/arm/configure.in 2017-04-11 00:43:12.325788994 -0700 +@@ -49,7 +49,7 @@ AC_PROG_RANLIB + LIB_AM_PROG_AS + + case "${target}" in +- *-*-elf | *-*-eabi | *-*-tirtos*) ++ *-*-elf | *-*-eabi* | *-*-tirtos*) + objtype=elf- + ;; + *-*-coff) diff --git a/packages/newlib/2.4.0.20161025/200-fix-mt-cflags.patch b/packages/newlib/2.4.0.20161025/200-fix-mt-cflags.patch new file mode 100644 index 0000000..dcf6826 --- /dev/null +++ b/packages/newlib/2.4.0.20161025/200-fix-mt-cflags.patch @@ -0,0 +1,10 @@ +diff -urpN newlib-2.4.0.20161025.orig/config/mt-d30v newlib-2.4.0.20161025/config/mt-d30v +--- newlib-2.4.0.20161025.orig/config/mt-d30v 2017-04-11 00:51:27.980767513 -0700 ++++ newlib-2.4.0.20161025/config/mt-d30v 2017-04-11 00:55:51.138626731 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C diff --git a/packages/newlib/2.4.0.20161025/version.desc b/packages/newlib/2.4.0.20161025/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/newlib/2.4.0.20161025/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch new file mode 100644 index 0000000..1d0b49b --- /dev/null +++ b/packages/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch @@ -0,0 +1,27 @@ +The m68k mcpu processor does not like unaligned access + +Disable at least mcpu32, m68010 and m68020. These processors certainly +do not like unaligned accesses. + +Signed-off-by: Remy Bohmer +[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] +Signed-off-by: "Yann E. MORIN" +[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] +Signed-off-by: Austin Morton +--- + newlib/libc/machine/m68k/memcpy.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +=================================================================== +--- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S ++++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S +@@ -15,7 +15,7 @@ + + #include "m68kasm.h" + +-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) ++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) + # define MISALIGNED_OK 1 + #else + # define MISALIGNED_OK 0 diff --git a/packages/newlib/2.5.0.20170519/200-fix-mt-cflags.patch b/packages/newlib/2.5.0.20170519/200-fix-mt-cflags.patch new file mode 100644 index 0000000..cc15551 --- /dev/null +++ b/packages/newlib/2.5.0.20170519/200-fix-mt-cflags.patch @@ -0,0 +1,10 @@ +diff -urpN newlib-2.5.0.20170323.orig/config/mt-d30v newlib-2.5.0.20170323/config/mt-d30v +--- newlib-2.5.0.20170323.orig/config/mt-d30v 2017-04-11 00:51:28.180768874 -0700 ++++ newlib-2.5.0.20170323/config/mt-d30v 2017-04-11 00:55:51.138626731 -0700 +@@ -1,4 +1,4 @@ + # Build libraries optimizing for space, not speed. + # Turn off warnings about symbols named the same as registers +- CFLAGS_FOR_TARGET = -g -Os -Wa,-C +- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C ++ CFLAGS_FOR_TARGET += -g -Os -Wa,-C ++ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C diff --git a/packages/newlib/2.5.0.20170519/version.desc b/packages/newlib/2.5.0.20170519/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/newlib/package.desc b/packages/newlib/package.desc new file mode 100644 index 0000000..3abfe27 --- /dev/null +++ b/packages/newlib/package.desc @@ -0,0 +1,3 @@ +origin="RedHat" +repository="git git://sourceware.org/git/newlib-cygwin.git" +milestones="2.0" diff --git a/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch b/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch new file mode 100644 index 0000000..3f8a518 --- /dev/null +++ b/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch @@ -0,0 +1,34 @@ +diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch +--- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 13:02:51.385861492 -0800 ++++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 19:08:53.150146970 -0800 +@@ -32,10 +32,11 @@ libpthread_arch_SOBJ = $(patsubst %.S,$( + libpthread_arch_OBJS = $(libpthread_subarch_OBJS) $(libpthread_arch_COBJ) $(libpthread_arch_SOBJ) + + libc_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_CSRC)) +-libc_arch_SOBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC)) ++libc_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC)) + libc_arch_OBJS = $(libc_arch_COBJ) $(libc_arch_SOBJ) + libc_arch_a_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_CSRC)) +-libc_arch_a_OBJS = $(libc_arch_a_COBJ) ++libc_arch_a_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_SSRC)) ++libc_arch_a_OBJS = $(libc_arch_a_COBJ) $(libc_arch_a_SOBJ) + + librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC)) + librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC)) +diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S +--- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 1969-12-31 16:00:00.000000000 -0800 ++++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 2016-12-06 19:08:53.150146970 -0800 +@@ -0,0 +1 @@ ++#include +diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch +--- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 13:02:51.401861642 -0800 ++++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 19:08:53.150146970 -0800 +@@ -20,7 +20,7 @@ + ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread + + libc_arch_a_CSRC = libc-tls.c +-librt_arch_a_SSRC = dl-tlsdesc.S ++libc_arch_a_SSRC = libc-dl-tlsdesc.S + + CFLAGS-gen_tlsdesc.c = -S + $(libpthread_arch_OUT)/gen_tlsdesc.c: $(libpthread_arch_DIR)/tlsdesc.sym | $(libpthread_arch_OUT) diff --git a/packages/uClibc-ng/1.0.20/110-has-lfs.patch b/packages/uClibc-ng/1.0.20/110-has-lfs.patch new file mode 100644 index 0000000..c5b90de --- /dev/null +++ b/packages/uClibc-ng/1.0.20/110-has-lfs.patch @@ -0,0 +1,31 @@ +From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Mon, 23 Jan 2017 14:21:54 -0800 +Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled". + +Otherwise, buildroot rejects uClibc-ng in an external toolchain. + +Signed-off-by: Alexey Neyman +--- + extra/Configs/Config.in | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in +index a9d62f5..b2cf977 100644 +--- a/extra/Configs/Config.in ++++ b/extra/Configs/Config.in +@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG + Support sending messages to the system logger. + This requires socket-support. + ++config UCLIBC_HAS_LFS ++ def_bool y ++ help ++ Large file support (always enabled; config symbol retained for ++ feature test to be compatible with uClibc). + choice + prompt "Malloc Implementation" + default MALLOC if ! ARCH_USE_MMU +-- +2.9.3 + diff --git a/packages/uClibc-ng/1.0.20/500-no-install-D.patch b/packages/uClibc-ng/1.0.20/500-no-install-D.patch new file mode 100644 index 0000000..83d3ff6 --- /dev/null +++ b/packages/uClibc-ng/1.0.20/500-no-install-D.patch @@ -0,0 +1,30 @@ +diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in +--- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 ++++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 +@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : + install-y += utils_install + + # This installs both utils and hostutils, so doesn't depend on either. ++$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: ++ $(do_mkdir) ++ ++utils_install: $(PREFIX)$(DEVEL_PREFIX)bin ++ifeq ($(HAVE_SHARED),y) ++utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin ++endif + + utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf + ifeq ($(HAVE_SHARED),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig + endif + ifeq ($(UCLIBC_HAS_LOCALE),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv + $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale + endif + diff --git a/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch new file mode 100644 index 0000000..4338f9f --- /dev/null +++ b/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch @@ -0,0 +1,46 @@ +diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c +--- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 ++++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 +@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr + } + } + #endif ++ ++#ifdef LDSO_MULTILIB_DIR ++ /* If multilib directory is selected, search it before falling back to ++ standard lib directories. */ ++ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); ++ tpnt1 = search_for_named_library(libname, rflags, ++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" ++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, ++ rpnt, NULL); ++ if (tpnt1 != NULL) ++ return tpnt1; ++#endif ++ + #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ + /* Look for libraries wherever the shared library loader + * was installed */ +@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr + if (tpnt1 != NULL) + return tpnt1; + #endif ++ + /* Lastly, search the standard list of paths for the library. + This list must exactly match the list in uClibc/ldso/util/ldd.c */ + _dl_if_debug_dprint("\tsearching full lib path list\n"); +diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in +--- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 ++++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 +@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g + + CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" + ++# Search non-default multilib directories ++ifneq ($(MULTILIB_DIR),lib) ++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" ++endif ++ + ifeq ($(TARGET_ARCH),arc) + CFLAGS-ldso.c += -mno-long-calls + endif diff --git a/packages/uClibc-ng/1.0.20/700-features.h-c11.patch b/packages/uClibc-ng/1.0.20/700-features.h-c11.patch new file mode 100644 index 0000000..cb1d2a8 --- /dev/null +++ b/packages/uClibc-ng/1.0.20/700-features.h-c11.patch @@ -0,0 +1,61 @@ +From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sun, 7 May 2017 16:28:14 +0200 +Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation + +--- + include/features.h | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/include/features.h b/include/features.h +index e76bbba..f982079 100644 +--- a/include/features.h ++++ b/include/features.h +@@ -55,6 +55,7 @@ + These are defined by this file and are used by the + header files to decide what to declare or define: + ++ __USE_ISOC11 Define ISO C11 things. + __USE_ISOC99 Define ISO C99 things. + __USE_ISOC95 Define ISO C90 AMD1 (C95) things. + __USE_POSIX Define IEEE Std 1003.1 things. +@@ -91,6 +92,7 @@ + + + /* Undefine everything, so we get a clean slate. */ ++#undef __USE_ISOC11 + #undef __USE_ISOC99 + #undef __USE_ISOC95 + #undef __USE_POSIX +@@ -151,6 +153,8 @@ + #ifdef _GNU_SOURCE + # undef _ISOC99_SOURCE + # define _ISOC99_SOURCE 1 ++# undef _ISOC11_SOURCE ++# define _ISOC11_SOURCE 1 + # undef _POSIX_SOURCE + # define _POSIX_SOURCE 1 + # undef _POSIX_C_SOURCE +@@ -223,11 +227,14 @@ + # define _SVID_SOURCE 1 + #endif + +-/* This is to enable the ISO C99 extension. Also recognize the old macro +- which was used prior to the standard acceptance. This macro will +- eventually go away and the features enabled by default once the ISO C99 +- standard is widely adopted. */ +-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ ++/* This is to enable the ISO C11 extension. */ ++#if (defined _ISOC11_SOURCE \ ++ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) ++# define __USE_ISOC11 1 ++#endif ++ ++/* This is to enable the ISO C99 extension. */ ++#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + # define __USE_ISOC99 1 + #endif +-- +cgit v0.11.2-3-g2eb4 + diff --git a/packages/uClibc-ng/1.0.20/version.desc b/packages/uClibc-ng/1.0.20/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/uClibc-ng/1.0.20/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/uClibc-ng/1.0.21/110-has-lfs.patch b/packages/uClibc-ng/1.0.21/110-has-lfs.patch new file mode 100644 index 0000000..c5b90de --- /dev/null +++ b/packages/uClibc-ng/1.0.21/110-has-lfs.patch @@ -0,0 +1,31 @@ +From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Mon, 23 Jan 2017 14:21:54 -0800 +Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled". + +Otherwise, buildroot rejects uClibc-ng in an external toolchain. + +Signed-off-by: Alexey Neyman +--- + extra/Configs/Config.in | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in +index a9d62f5..b2cf977 100644 +--- a/extra/Configs/Config.in ++++ b/extra/Configs/Config.in +@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG + Support sending messages to the system logger. + This requires socket-support. + ++config UCLIBC_HAS_LFS ++ def_bool y ++ help ++ Large file support (always enabled; config symbol retained for ++ feature test to be compatible with uClibc). + choice + prompt "Malloc Implementation" + default MALLOC if ! ARCH_USE_MMU +-- +2.9.3 + diff --git a/packages/uClibc-ng/1.0.21/120-module.patch b/packages/uClibc-ng/1.0.21/120-module.patch new file mode 100644 index 0000000..2e8a989 --- /dev/null +++ b/packages/uClibc-ng/1.0.21/120-module.patch @@ -0,0 +1,50 @@ +commit 03884934b32c79da545ef38a42835a6c257b125d +Author: Waldemar Brodkorb +Date: Tue Dec 27 09:24:24 2016 +0100 + + add init_module/delete_module syscall wrappers + + Add the wrappers unconditionally, because kmod package + still uses them. + +diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in +index 595074c..faed6fd 100644 +--- a/libc/sysdeps/linux/common/Makefile.in ++++ b/libc/sysdeps/linux/common/Makefile.in +@@ -31,6 +31,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \ + ioperm.c \ + iopl.c \ + modify_ldt.c \ ++ module.c \ + personality.c \ + pipe2.c \ + ppoll.c \ +diff --git a/libc/sysdeps/linux/common/module.c b/libc/sysdeps/linux/common/module.c +new file mode 100644 +index 0000000..146a43e +--- /dev/null ++++ b/libc/sysdeps/linux/common/module.c +@@ -0,0 +1,23 @@ ++/* ++ * init_module()/delete_module() for uClibc ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++ ++#ifdef __NR_init_module ++int init_module(void *first, void *second, void *third, void *fourth, void *fifth); ++/* This may have 5 arguments (for old 2.0 kernels) or 2 arguments ++ * (for 2.2 and 2.4 kernels). Use the greatest common denominator, ++ * and let the kernel cope with whatever it gets. It's good at that. */ ++_syscall5(int, init_module, void *, first, void *, second, void *, third, ++ void *, fourth, void *, fifth) ++#endif ++ ++#ifdef __NR_delete_module ++int delete_module(const char *name, unsigned int flags); ++_syscall2(int, delete_module, const char *, name, unsigned int, flags) ++#endif diff --git a/packages/uClibc-ng/1.0.21/500-no-install-D.patch b/packages/uClibc-ng/1.0.21/500-no-install-D.patch new file mode 100644 index 0000000..83d3ff6 --- /dev/null +++ b/packages/uClibc-ng/1.0.21/500-no-install-D.patch @@ -0,0 +1,30 @@ +diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in +--- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 ++++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 +@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : + install-y += utils_install + + # This installs both utils and hostutils, so doesn't depend on either. ++$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: ++ $(do_mkdir) ++ ++utils_install: $(PREFIX)$(DEVEL_PREFIX)bin ++ifeq ($(HAVE_SHARED),y) ++utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin ++endif + + utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf + ifeq ($(HAVE_SHARED),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig + endif + ifeq ($(UCLIBC_HAS_LOCALE),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv + $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale + endif + diff --git a/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch new file mode 100644 index 0000000..4338f9f --- /dev/null +++ b/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch @@ -0,0 +1,46 @@ +diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c +--- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 ++++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 +@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr + } + } + #endif ++ ++#ifdef LDSO_MULTILIB_DIR ++ /* If multilib directory is selected, search it before falling back to ++ standard lib directories. */ ++ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); ++ tpnt1 = search_for_named_library(libname, rflags, ++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" ++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, ++ rpnt, NULL); ++ if (tpnt1 != NULL) ++ return tpnt1; ++#endif ++ + #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ + /* Look for libraries wherever the shared library loader + * was installed */ +@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr + if (tpnt1 != NULL) + return tpnt1; + #endif ++ + /* Lastly, search the standard list of paths for the library. + This list must exactly match the list in uClibc/ldso/util/ldd.c */ + _dl_if_debug_dprint("\tsearching full lib path list\n"); +diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in +--- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 ++++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 +@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g + + CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" + ++# Search non-default multilib directories ++ifneq ($(MULTILIB_DIR),lib) ++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" ++endif ++ + ifeq ($(TARGET_ARCH),arc) + CFLAGS-ldso.c += -mno-long-calls + endif diff --git a/packages/uClibc-ng/1.0.21/700-features.h-c11.patch b/packages/uClibc-ng/1.0.21/700-features.h-c11.patch new file mode 100644 index 0000000..cb1d2a8 --- /dev/null +++ b/packages/uClibc-ng/1.0.21/700-features.h-c11.patch @@ -0,0 +1,61 @@ +From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sun, 7 May 2017 16:28:14 +0200 +Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation + +--- + include/features.h | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/include/features.h b/include/features.h +index e76bbba..f982079 100644 +--- a/include/features.h ++++ b/include/features.h +@@ -55,6 +55,7 @@ + These are defined by this file and are used by the + header files to decide what to declare or define: + ++ __USE_ISOC11 Define ISO C11 things. + __USE_ISOC99 Define ISO C99 things. + __USE_ISOC95 Define ISO C90 AMD1 (C95) things. + __USE_POSIX Define IEEE Std 1003.1 things. +@@ -91,6 +92,7 @@ + + + /* Undefine everything, so we get a clean slate. */ ++#undef __USE_ISOC11 + #undef __USE_ISOC99 + #undef __USE_ISOC95 + #undef __USE_POSIX +@@ -151,6 +153,8 @@ + #ifdef _GNU_SOURCE + # undef _ISOC99_SOURCE + # define _ISOC99_SOURCE 1 ++# undef _ISOC11_SOURCE ++# define _ISOC11_SOURCE 1 + # undef _POSIX_SOURCE + # define _POSIX_SOURCE 1 + # undef _POSIX_C_SOURCE +@@ -223,11 +227,14 @@ + # define _SVID_SOURCE 1 + #endif + +-/* This is to enable the ISO C99 extension. Also recognize the old macro +- which was used prior to the standard acceptance. This macro will +- eventually go away and the features enabled by default once the ISO C99 +- standard is widely adopted. */ +-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ ++/* This is to enable the ISO C11 extension. */ ++#if (defined _ISOC11_SOURCE \ ++ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) ++# define __USE_ISOC11 1 ++#endif ++ ++/* This is to enable the ISO C99 extension. */ ++#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + # define __USE_ISOC99 1 + #endif +-- +cgit v0.11.2-3-g2eb4 + diff --git a/packages/uClibc-ng/1.0.21/version.desc b/packages/uClibc-ng/1.0.21/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/uClibc-ng/1.0.21/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/uClibc-ng/1.0.22/500-no-install-D.patch b/packages/uClibc-ng/1.0.22/500-no-install-D.patch new file mode 100644 index 0000000..83d3ff6 --- /dev/null +++ b/packages/uClibc-ng/1.0.22/500-no-install-D.patch @@ -0,0 +1,30 @@ +diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in +--- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 ++++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 +@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : + install-y += utils_install + + # This installs both utils and hostutils, so doesn't depend on either. ++$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: ++ $(do_mkdir) ++ ++utils_install: $(PREFIX)$(DEVEL_PREFIX)bin ++ifeq ($(HAVE_SHARED),y) ++utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin ++endif + + utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf + ifeq ($(HAVE_SHARED),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig + endif + ifeq ($(UCLIBC_HAS_LOCALE),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv + $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale + endif + diff --git a/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch new file mode 100644 index 0000000..4338f9f --- /dev/null +++ b/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch @@ -0,0 +1,46 @@ +diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c +--- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 ++++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 +@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr + } + } + #endif ++ ++#ifdef LDSO_MULTILIB_DIR ++ /* If multilib directory is selected, search it before falling back to ++ standard lib directories. */ ++ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); ++ tpnt1 = search_for_named_library(libname, rflags, ++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" ++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, ++ rpnt, NULL); ++ if (tpnt1 != NULL) ++ return tpnt1; ++#endif ++ + #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ + /* Look for libraries wherever the shared library loader + * was installed */ +@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr + if (tpnt1 != NULL) + return tpnt1; + #endif ++ + /* Lastly, search the standard list of paths for the library. + This list must exactly match the list in uClibc/ldso/util/ldd.c */ + _dl_if_debug_dprint("\tsearching full lib path list\n"); +diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in +--- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 ++++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 +@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g + + CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" + ++# Search non-default multilib directories ++ifneq ($(MULTILIB_DIR),lib) ++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" ++endif ++ + ifeq ($(TARGET_ARCH),arc) + CFLAGS-ldso.c += -mno-long-calls + endif diff --git a/packages/uClibc-ng/1.0.22/700-features.h-c11.patch b/packages/uClibc-ng/1.0.22/700-features.h-c11.patch new file mode 100644 index 0000000..cb1d2a8 --- /dev/null +++ b/packages/uClibc-ng/1.0.22/700-features.h-c11.patch @@ -0,0 +1,61 @@ +From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sun, 7 May 2017 16:28:14 +0200 +Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation + +--- + include/features.h | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/include/features.h b/include/features.h +index e76bbba..f982079 100644 +--- a/include/features.h ++++ b/include/features.h +@@ -55,6 +55,7 @@ + These are defined by this file and are used by the + header files to decide what to declare or define: + ++ __USE_ISOC11 Define ISO C11 things. + __USE_ISOC99 Define ISO C99 things. + __USE_ISOC95 Define ISO C90 AMD1 (C95) things. + __USE_POSIX Define IEEE Std 1003.1 things. +@@ -91,6 +92,7 @@ + + + /* Undefine everything, so we get a clean slate. */ ++#undef __USE_ISOC11 + #undef __USE_ISOC99 + #undef __USE_ISOC95 + #undef __USE_POSIX +@@ -151,6 +153,8 @@ + #ifdef _GNU_SOURCE + # undef _ISOC99_SOURCE + # define _ISOC99_SOURCE 1 ++# undef _ISOC11_SOURCE ++# define _ISOC11_SOURCE 1 + # undef _POSIX_SOURCE + # define _POSIX_SOURCE 1 + # undef _POSIX_C_SOURCE +@@ -223,11 +227,14 @@ + # define _SVID_SOURCE 1 + #endif + +-/* This is to enable the ISO C99 extension. Also recognize the old macro +- which was used prior to the standard acceptance. This macro will +- eventually go away and the features enabled by default once the ISO C99 +- standard is widely adopted. */ +-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ ++/* This is to enable the ISO C11 extension. */ ++#if (defined _ISOC11_SOURCE \ ++ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) ++# define __USE_ISOC11 1 ++#endif ++ ++/* This is to enable the ISO C99 extension. */ ++#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + # define __USE_ISOC99 1 + #endif +-- +cgit v0.11.2-3-g2eb4 + diff --git a/packages/uClibc-ng/1.0.22/version.desc b/packages/uClibc-ng/1.0.22/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/uClibc-ng/1.0.23/700-features.h-c11.patch b/packages/uClibc-ng/1.0.23/700-features.h-c11.patch new file mode 100644 index 0000000..cb1d2a8 --- /dev/null +++ b/packages/uClibc-ng/1.0.23/700-features.h-c11.patch @@ -0,0 +1,61 @@ +From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sun, 7 May 2017 16:28:14 +0200 +Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation + +--- + include/features.h | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/include/features.h b/include/features.h +index e76bbba..f982079 100644 +--- a/include/features.h ++++ b/include/features.h +@@ -55,6 +55,7 @@ + These are defined by this file and are used by the + header files to decide what to declare or define: + ++ __USE_ISOC11 Define ISO C11 things. + __USE_ISOC99 Define ISO C99 things. + __USE_ISOC95 Define ISO C90 AMD1 (C95) things. + __USE_POSIX Define IEEE Std 1003.1 things. +@@ -91,6 +92,7 @@ + + + /* Undefine everything, so we get a clean slate. */ ++#undef __USE_ISOC11 + #undef __USE_ISOC99 + #undef __USE_ISOC95 + #undef __USE_POSIX +@@ -151,6 +153,8 @@ + #ifdef _GNU_SOURCE + # undef _ISOC99_SOURCE + # define _ISOC99_SOURCE 1 ++# undef _ISOC11_SOURCE ++# define _ISOC11_SOURCE 1 + # undef _POSIX_SOURCE + # define _POSIX_SOURCE 1 + # undef _POSIX_C_SOURCE +@@ -223,11 +227,14 @@ + # define _SVID_SOURCE 1 + #endif + +-/* This is to enable the ISO C99 extension. Also recognize the old macro +- which was used prior to the standard acceptance. This macro will +- eventually go away and the features enabled by default once the ISO C99 +- standard is widely adopted. */ +-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ ++/* This is to enable the ISO C11 extension. */ ++#if (defined _ISOC11_SOURCE \ ++ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) ++# define __USE_ISOC11 1 ++#endif ++ ++/* This is to enable the ISO C99 extension. */ ++#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + # define __USE_ISOC99 1 + #endif +-- +cgit v0.11.2-3-g2eb4 + diff --git a/packages/uClibc-ng/1.0.23/version.desc b/packages/uClibc-ng/1.0.23/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/uClibc-ng/1.0.24/700-features.h-c11.patch b/packages/uClibc-ng/1.0.24/700-features.h-c11.patch new file mode 100644 index 0000000..cb1d2a8 --- /dev/null +++ b/packages/uClibc-ng/1.0.24/700-features.h-c11.patch @@ -0,0 +1,61 @@ +From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sun, 7 May 2017 16:28:14 +0200 +Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation + +--- + include/features.h | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/include/features.h b/include/features.h +index e76bbba..f982079 100644 +--- a/include/features.h ++++ b/include/features.h +@@ -55,6 +55,7 @@ + These are defined by this file and are used by the + header files to decide what to declare or define: + ++ __USE_ISOC11 Define ISO C11 things. + __USE_ISOC99 Define ISO C99 things. + __USE_ISOC95 Define ISO C90 AMD1 (C95) things. + __USE_POSIX Define IEEE Std 1003.1 things. +@@ -91,6 +92,7 @@ + + + /* Undefine everything, so we get a clean slate. */ ++#undef __USE_ISOC11 + #undef __USE_ISOC99 + #undef __USE_ISOC95 + #undef __USE_POSIX +@@ -151,6 +153,8 @@ + #ifdef _GNU_SOURCE + # undef _ISOC99_SOURCE + # define _ISOC99_SOURCE 1 ++# undef _ISOC11_SOURCE ++# define _ISOC11_SOURCE 1 + # undef _POSIX_SOURCE + # define _POSIX_SOURCE 1 + # undef _POSIX_C_SOURCE +@@ -223,11 +227,14 @@ + # define _SVID_SOURCE 1 + #endif + +-/* This is to enable the ISO C99 extension. Also recognize the old macro +- which was used prior to the standard acceptance. This macro will +- eventually go away and the features enabled by default once the ISO C99 +- standard is widely adopted. */ +-#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ ++/* This is to enable the ISO C11 extension. */ ++#if (defined _ISOC11_SOURCE \ ++ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) ++# define __USE_ISOC11 1 ++#endif ++ ++/* This is to enable the ISO C99 extension. */ ++#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + # define __USE_ISOC99 1 + #endif +-- +cgit v0.11.2-3-g2eb4 + diff --git a/packages/uClibc-ng/1.0.24/version.desc b/packages/uClibc-ng/1.0.24/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/uClibc-ng/1.0.25/version.desc b/packages/uClibc-ng/1.0.25/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/uClibc-ng/package.desc b/packages/uClibc-ng/package.desc new file mode 100644 index 0000000..72cfd1a --- /dev/null +++ b/packages/uClibc-ng/package.desc @@ -0,0 +1,3 @@ +origin="uclibc-ng.org" +repository="git git://uclibc-ng.org/git/uclibc-ng" +milestones="0.9.33.2 1.0.0 1.0.15" diff --git a/packages/uClibc/0.9.33.2/100-m68k-ice.patch b/packages/uClibc/0.9.33.2/100-m68k-ice.patch new file mode 100644 index 0000000..410f8d6 --- /dev/null +++ b/packages/uClibc/0.9.33.2/100-m68k-ice.patch @@ -0,0 +1,19 @@ +diff -urN uClibc-0.9.33.2~orig/Rules.mak uClibc-0.9.33.2/Rules.mak +--- uClibc-0.9.33.2~orig/Rules.mak 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2/Rules.mak 2012-09-24 14:09:51.092953729 +0200 +@@ -226,6 +226,7 @@ + + OPTIMIZATION:= + # Use '-Os' optimization if available, else use -O2, allow Config to override ++ifneq ($(TARGET_ARCH),m68k) + $(eval $(call check-gcc-var,-Os)) + ifneq ($(CFLAG_-Os),) + OPTIMIZATION += $(CFLAG_-Os) +@@ -233,6 +234,7 @@ + $(eval $(call check-gcc-var,-O2)) + OPTIMIZATION += $(CFLAG_-O2) + endif ++endif + # Use the gcc 3.4 -funit-at-a-time optimization when available + $(eval $(call check-gcc-var,-funit-at-a-time)) + OPTIMIZATION += $(CFLAG_-funit-at-a-time) diff --git a/packages/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch b/packages/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch new file mode 100644 index 0000000..0381ba8 --- /dev/null +++ b/packages/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch @@ -0,0 +1,393 @@ +From 7fef6b983456e4c529a5239ea90715050e6f4452 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 1 Oct 2012 18:12:54 +1300 +Subject: [PATCH 4/8] libc/sysdeps: add __kernel_long and __kernel_ulong + +Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various +exported header files were updated to use these new types. Add the +definitions for __kernel_long_t and __kernel_ulong_t to the relevant +kernel_types.h headers. + +This change was automated with the following scriptlet + + git grep --name-only 'typedef.*__kernel_old_dev_t' \ + | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ + typedef long\t\t__kernel_long_t;\ + typedef unsigned long\t__kernel_ulong_t;' + +Whitespace in arm, avr32, hppa, sparc was then manually fixed up. + +Signed-off-by: Chris Packham +-- +Here's a cleaned up patch which should get the whitespace right. I'm a +bit iffy about the sparc changes they make sense to me but it's not a +platform I have access to. + +I can break this up per arch or per maintainer if requested. + + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) + +diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h +index d5574c9..cd59b9d 100644 +--- a/libc/sysdeps/linux/alpha/bits/kernel_types.h ++++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + int val[2]; +diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h +index 766a306..6b36f32 100644 +--- a/libc/sysdeps/linux/arm/bits/kernel_types.h ++++ b/libc/sysdeps/linux/arm/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h +index f7d8b52..c551d57 100644 +--- a/libc/sysdeps/linux/avr32/bits/kernel_types.h ++++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h +@@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h +index d69a875..9fec595 100644 +--- a/libc/sysdeps/linux/bfin/bits/kernel_types.h ++++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h +index 7557309..2c363a8 100644 +--- a/libc/sysdeps/linux/c6x/bits/kernel_types.h ++++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h +@@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef unsigned int __kernel_size_t; + typedef int __kernel_ssize_t; + typedef int __kernel_ptrdiff_t; +diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h +index f122c7f..5d31f7b 100644 +--- a/libc/sysdeps/linux/cris/bits/kernel_types.h ++++ b/libc/sysdeps/linux/cris/bits/kernel_types.h +@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/e1/bits/kernel_types.h b/libc/sysdeps/linux/e1/bits/kernel_types.h +index 8017d85..f55a129 100644 +--- a/libc/sysdeps/linux/e1/bits/kernel_types.h ++++ b/libc/sysdeps/linux/e1/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* +diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h +index 0570675..4cfd1bf 100644 +--- a/libc/sysdeps/linux/h8300/bits/kernel_types.h ++++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h +index 4441f9b..6b2e794 100644 +--- a/libc/sysdeps/linux/hppa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h +@@ -45,6 +45,8 @@ typedef long long __kernel_off64_t; + typedef unsigned long long __kernel_ino64_t; + + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h +index 9c07c72..59044b8 100644 +--- a/libc/sysdeps/linux/i386/bits/kernel_types.h ++++ b/libc/sysdeps/linux/i386/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h +index c8ef86d..e31dc65 100644 +--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h +@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t; + + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #endif /* _ASM_IA64_POSIX_TYPES_H */ +diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h +index 0a77a8f..176b968 100644 +--- a/libc/sysdeps/linux/m68k/bits/kernel_types.h ++++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +index 2a70575..a9f736b 100644 +--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h ++++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +@@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h +index 9fc3b96..97faeac 100644 +--- a/libc/sysdeps/linux/mips/bits/kernel_types.h ++++ b/libc/sysdeps/linux/mips/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #else + typedef unsigned int __kernel_dev_t; +@@ -68,6 +70,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h +index 8b86d79..3c030e7 100644 +--- a/libc/sysdeps/linux/nios2/bits/kernel_types.h ++++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +index 3f3b933..1167de2 100644 +--- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +@@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + #else + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_ino_t; +@@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h +index f96e9fa..ac97261 100644 +--- a/libc/sysdeps/linux/sh/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h +index 671cc83..8cc6c61 100644 +--- a/libc/sysdeps/linux/sh64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h +@@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h +index 0cc4bc2..a10e075 100644 +--- a/libc/sysdeps/linux/sparc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_gid16_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef int __kernel_suseconds_t; +@@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h +index 3e851ab..780aa8a 100644 +--- a/libc/sysdeps/linux/v850/bits/kernel_types.h ++++ b/libc/sysdeps/linux/v850/bits/kernel_types.h +@@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +index de800d7..0cae08c 100644 +--- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +index 44f1075..ed38f2e 100644 +--- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* Beginning in 2.6 kernels, which is the first version that includes the +-- +1.8.1.2 + diff --git a/packages/uClibc/0.9.33.2/300-fix-darwin-build.patch b/packages/uClibc/0.9.33.2/300-fix-darwin-build.patch new file mode 100644 index 0000000..884307d --- /dev/null +++ b/packages/uClibc/0.9.33.2/300-fix-darwin-build.patch @@ -0,0 +1,12 @@ +diff -Nrupa uClibc-0.9.33.2.orig/extra/scripts/unifdef.c uClibc-0.9.33.2/extra/scripts/unifdef.c +--- uClibc-0.9.33.2.orig/extra/scripts/unifdef.c 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2/extra/scripts/unifdef.c 2014-10-25 17:07:33.000000000 +0200 +@@ -78,8 +78,6 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/ + #define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); }) + #define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno)) + +-size_t strlcpy(char *dst, const char *src, size_t siz); +- + /* types of input lines: */ + typedef enum { + LT_TRUEI, /* a true #if with ignore flag */ diff --git a/packages/uClibc/0.9.33.2/400-arm-unwind.patch b/packages/uClibc/0.9.33.2/400-arm-unwind.patch new file mode 100644 index 0000000..d31844c --- /dev/null +++ b/packages/uClibc/0.9.33.2/400-arm-unwind.patch @@ -0,0 +1,23 @@ +commit 16884562bf54a93e76c6d2ba03edb1fb00e8b3e0 +Author: Alexey Neyman +Date: Thu Oct 1 13:22:37 2015 -0700 + + Mark libgcc_c_resume as used. + + Recent GCC releases eliminate the data that is only set and never read, + along with the code storing to that data. For assembly blocks like in + ARM unwind code, the data structures need to be declared used. + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index f9a4ffb..f0c3047 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +@@ -25,7 +25,7 @@ + #define __libc_dlclose dlclose + #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + diff --git a/packages/uClibc/0.9.33.2/500-no-install-D.patch b/packages/uClibc/0.9.33.2/500-no-install-D.patch new file mode 100644 index 0000000..f8c2cc1 --- /dev/null +++ b/packages/uClibc/0.9.33.2/500-no-install-D.patch @@ -0,0 +1,29 @@ +--- uClibc-0.9.33.2.orig/utils/Makefile.in 2012-05-15 00:20:09.000000000 -0700 ++++ uClibc-0.9.33.2/utils/Makefile.in 2017-03-01 12:17:56.000000000 -0800 +@@ -118,15 +118,22 @@ + install-y += utils_install + + # This installs both utils and hostutils, so doesn't depend on either. ++$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: ++ $(do_mkdir) ++ ++utils_install: $(PREFIX)$(DEVEL_PREFIX)bin ++ifeq ($(HAVE_SHARED),y) ++utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin ++endif + + utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf + ifeq ($(HAVE_SHARED),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig + endif + ifeq ($(UCLIBC_HAS_LOCALE),y) +- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv ++ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv + #$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale + endif + diff --git a/packages/uClibc/0.9.33.2/600-prefer-multilib.patch b/packages/uClibc/0.9.33.2/600-prefer-multilib.patch new file mode 100644 index 0000000..677c599 --- /dev/null +++ b/packages/uClibc/0.9.33.2/600-prefer-multilib.patch @@ -0,0 +1,38 @@ +diff -urpN uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c uClibc-0.9.33.2/ldso/ldso/dl-elf.c +--- uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c 2017-03-14 23:40:57.527113741 -0700 ++++ uClibc-0.9.33.2/ldso/ldso/dl-elf.c 2017-03-14 23:42:19.308005691 -0700 +@@ -284,6 +284,19 @@ struct elf_resolve *_dl_load_shared_libr + } + } + #endif ++ ++#ifdef LDSO_MULTILIB_DIR ++ /* If multilib directory is selected, search it before falling back to ++ standard lib directories. */ ++ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); ++ tpnt1 = search_for_named_library(libname, rflags, ++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" ++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, ++ rpnt); ++ if (tpnt1 != NULL) ++ return tpnt1; ++#endif ++ + #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ + /* Look for libraries wherever the shared library loader + * was installed */ +diff -urpN uClibc-0.9.33.2.orig/ldso/ldso/Makefile.in uClibc-0.9.33.2/ldso/ldso/Makefile.in +--- uClibc-0.9.33.2.orig/ldso/ldso/Makefile.in 2017-03-14 23:40:57.527113741 -0700 ++++ uClibc-0.9.33.2/ldso/ldso/Makefile.in 2017-03-14 23:41:45.215634328 -0700 +@@ -30,6 +30,11 @@ CFLAGS-ldso/ldso/$(TARGET_ARCH)/ := $(CF + + CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" $(CFLAGS-ldso) + ++# Search non-default multilib directories ++ifneq ($(MULTILIB_DIR),lib) ++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" ++endif ++ + LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1 + ifneq ($(SUPPORT_LD_DEBUG),y) + LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS) diff --git a/packages/uClibc/0.9.33.2/998-dlopen-static.patch b/packages/uClibc/0.9.33.2/998-dlopen-static.patch new file mode 100644 index 0000000..9d2fa55 --- /dev/null +++ b/packages/uClibc/0.9.33.2/998-dlopen-static.patch @@ -0,0 +1,56 @@ +From 231e4a9b4b972662a6832f714a05525a3754892d Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 9 May 2013 09:04:20 +0200 +Subject: libdl: fix dlopen implementation from statically linked application + +Calling dlopen from statically linked application is actually broken, +because _dl_find_hash enters into an infinite loop when trying to +resolve symbols. In this case it doesn't need to extend the global +scope, it is readyto be used as it is, because _dl_loaded_modules already points +to the dlopened library. + +The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was +preventing to get the actual value of the LD_LIBRARY_PATH. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +--- + ldso/libdl/libdl.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 4630a59..3a78696 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -374,7 +374,7 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + if (getenv("LD_BIND_NOW")) + now_flag = RTLD_NOW; + +-#if !defined SHARED && defined __LDSO_LIBRARY_PATH__ ++#if !defined SHARED && defined __LDSO_LD_LIBRARY_PATH__ + /* When statically linked, the _dl_library_path is not yet initialized */ + _dl_library_path = getenv("LD_LIBRARY_PATH"); + #endif +@@ -541,11 +541,18 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + * to the GOT tables. We need to do this in reverse order so that COPY + * directives work correctly */ + +- /* Get the tail of the list */ ++#ifdef SHARED ++ /* ++ * Get the tail of the list. ++ * In the static case doesn't need to extend the global scope, it is ++ * ready to be used as it is, because _dl_loaded_modules already points ++ * to the dlopened library. ++ */ + for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next); + + /* Extend the global scope by adding the local scope of the dlopened DSO. */ + ls->next = &dyn_chain->dyn->symbol_scope; ++#endif + #ifdef __mips__ + /* + * Relocation of the GOT entries for MIPS have to be done +-- +cgit v0.12 + diff --git a/packages/uClibc/0.9.33.2/999-make-olddefconfig.patch b/packages/uClibc/0.9.33.2/999-make-olddefconfig.patch new file mode 100644 index 0000000..8bc87ec --- /dev/null +++ b/packages/uClibc/0.9.33.2/999-make-olddefconfig.patch @@ -0,0 +1,41 @@ +diff -urpN uClibc-0.9.33.2.orig/extra/config/conf.c uClibc-0.9.33.2/extra/config/conf.c +--- uClibc-0.9.33.2.orig/extra/config/conf.c 2017-02-04 12:57:38.488808014 -0800 ++++ uClibc-0.9.33.2/extra/config/conf.c 2017-02-04 20:26:28.613244457 -0800 +@@ -435,6 +435,7 @@ int main(int ac, char **av) + const char *name; + const char *configname = conf_get_configname(); + struct stat tmpstat; ++ int olddefconfig = 0; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); +@@ -451,6 +452,7 @@ int main(int ac, char **av) + break; + case 'd': + input_mode = set_default; ++ olddefconfig = 1; + break; + case 'D': + input_mode = set_default; +@@ -514,7 +516,7 @@ int main(int ac, char **av) + switch (input_mode) { + case set_default: + if (!defconfig_file) +- defconfig_file = conf_get_default_confname(); ++ defconfig_file = olddefconfig ? NULL : conf_get_default_confname(); + if (conf_read(defconfig_file)) { + printf(_("***\n" + "*** Can't find default configuration \"%s\"!\n" +diff -urpN uClibc-0.9.33.2.orig/Makefile.in uClibc-0.9.33.2/Makefile.in +--- uClibc-0.9.33.2.orig/Makefile.in 2017-02-04 12:57:38.484807980 -0800 ++++ uClibc-0.9.33.2/Makefile.in 2017-02-04 12:59:34.625789324 -0800 +@@ -460,6 +460,9 @@ allyesconfig: $(conf) + allnoconfig: $(conf) + $(Q)$< -n extra/Configs/Config.in + ++olddefconfig: $(conf) ++ $(Q)$< -d extra/Configs/Config.in ++ + defconfig: $(conf) + $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in + diff --git a/packages/uClibc/0.9.33.2/version.desc b/packages/uClibc/0.9.33.2/version.desc new file mode 100644 index 0000000..026d275 --- /dev/null +++ b/packages/uClibc/0.9.33.2/version.desc @@ -0,0 +1 @@ +obsolete="yes" diff --git a/packages/uClibc/package.desc b/packages/uClibc/package.desc new file mode 100644 index 0000000..ac3a844 --- /dev/null +++ b/packages/uClibc/package.desc @@ -0,0 +1,5 @@ +# Technically, it is the other way around: uClibc-ng is a fork of uClibc. But +# uClibc is no longer maintained, so we want people to use uClibc-ng. +master="uClibc-ng" +origin="uclibc.org" +repository="git git://git.busybox.net/uClibc" diff --git a/patches/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.12.1/102-fix-signed-shift-overlow.patch b/patches/glibc/2.12.1/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.12.1/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.12.1/104-unused-variables.patch b/patches/glibc/2.12.1/104-unused-variables.patch deleted file mode 100644 index e063675..0000000 --- a/patches/glibc/2.12.1/104-unused-variables.patch +++ /dev/null @@ -1,165 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --#ifdef __STDC__ --static const float zero = 0.0; --#else --static float zero = 0.0; --#endif -- - #ifdef __STDC__ - float __ieee754_log10f(float x) - #else -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include "math.h" - #include "math_private.h" - --#ifdef __STDC__ --static const float one=1.0; --#else --static float one=1.0; --#endif -- - #ifdef __STDC__ - float __cosf(float x) - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - static long double - #endif - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.12.1/105-misleading-indentation.patch b/patches/glibc/2.12.1/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.12.1/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.12.1/106-dl-open-array-bounds.patch b/patches/glibc/2.12.1/106-dl-open-array-bounds.patch deleted file mode 100644 index bdb5c19..0000000 --- a/patches/glibc/2.12.1/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && ((nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index 530d4ff..0000000 --- a/patches/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff -urpN glibc-2.12.2.orig/configure glibc-2.12.2/configure ---- glibc-2.12.2.orig/configure 2010-12-13 02:47:26.000000000 -0800 -+++ glibc-2.12.2/configure 2017-03-08 21:18:07.000000000 -0800 -@@ -6710,7 +6710,7 @@ EOF - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - then -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff -urpN glibc-2.12.2.orig/configure.in glibc-2.12.2/configure.in ---- glibc-2.12.2.orig/configure.in 2010-12-13 02:47:26.000000000 -0800 -+++ glibc-2.12.2/configure.in 2017-03-08 21:18:17.000000000 -0800 -@@ -1671,7 +1671,7 @@ dnl cross-platform since the gcc used ca - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/patches/glibc/2.12.1/300-macos-cross-rpcgen.patch b/patches/glibc/2.12.1/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.12.1/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.12.1/900-march-i686.patch b/patches/glibc/2.12.1/900-march-i686.patch deleted file mode 100644 index 7f5b1ce..0000000 --- a/patches/glibc/2.12.1/900-march-i686.patch +++ /dev/null @@ -1,34 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - -diff -urN glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100 -+++ glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -urN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/patches/glibc/2.12.1/910-typedef-caddr.patch b/patches/glibc/2.12.1/910-typedef-caddr.patch deleted file mode 100644 index e29e810..0000000 --- a/patches/glibc/2.12.1/910-typedef-caddr.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h ---- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 -@@ -114,7 +114,10 @@ - #ifdef __USE_BSD - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif -diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h ---- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 -@@ -80,7 +80,10 @@ - #endif - #ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - #endif - diff --git a/patches/glibc/2.12.1/920-fix-rpc_parse-format.patch b/patches/glibc/2.12.1/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.12.1/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.12.1/920-make-382.patch b/patches/glibc/2.12.1/920-make-382.patch deleted file mode 100644 index 28be2fe..0000000 --- a/patches/glibc/2.12.1/920-make-382.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=blob_plain;f=source/base/glibc/make-3.82-fix.patch;hb=8217c32ecc2e14962847ba3d8a272eb64a3dba4f - ---- glibc-2.10.1.OLD/manual/Makefile -+++ glibc-2.10.1.NEW/manual/Makefile -@@ -232,7 +232,9 @@ - .PHONY: stubs - stubs: $(objpfx)stubs - endif --$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%: -+$(objpfx)stubs ../po/manual.pot: -+ touch $@ -+$(objpfx)stamp%: - $(make-target-directory) - touch $@ - diff --git a/patches/glibc/2.12.1/940-nis-bogus-conditional.patch b/patches/glibc/2.12.1/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.12.1/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.12.1/999-new-tools.patch b/patches/glibc/2.12.1/999-new-tools.patch deleted file mode 100644 index d600b58..0000000 --- a/patches/glibc/2.12.1/999-new-tools.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -urpN glibc-2.12.1.orig/configure glibc-2.12.1/configure ---- glibc-2.12.1.orig/configure 2010-07-27 04:34:39.000000000 -0700 -+++ glibc-2.12.1/configure 2017-02-08 00:37:58.117495908 -0800 -@@ -5079,7 +5079,7 @@ $as_echo_n "checking version of $CC... " - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | [4-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5142,7 +5142,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5269,7 +5269,7 @@ $as_echo_n "checking version of $MAKEINF - ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.*) -+ [4-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5329,7 +5329,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:$LINENO: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.12.1.orig/configure.in glibc-2.12.1/configure.in ---- glibc-2.12.1.orig/configure.in 2010-07-27 04:34:39.000000000 -0700 -+++ glibc-2.12.1/configure.in 2017-02-08 00:28:47.131374866 -0800 -@@ -960,11 +960,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], -@@ -972,10 +972,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg - MSGFMT=: aux_missing="$aux_missing msgfmt") - AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], -- [4.*], -+ [[4-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") - AC_CHECK_PROG_VER(SED, sed, --version, -- [GNU sed version \([0-9]*\.[0-9.]*\)], -+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") - diff --git a/patches/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index 530d4ff..0000000 --- a/patches/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff -urpN glibc-2.12.2.orig/configure glibc-2.12.2/configure ---- glibc-2.12.2.orig/configure 2010-12-13 02:47:26.000000000 -0800 -+++ glibc-2.12.2/configure 2017-03-08 21:18:07.000000000 -0800 -@@ -6710,7 +6710,7 @@ EOF - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - then -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff -urpN glibc-2.12.2.orig/configure.in glibc-2.12.2/configure.in ---- glibc-2.12.2.orig/configure.in 2010-12-13 02:47:26.000000000 -0800 -+++ glibc-2.12.2/configure.in 2017-03-08 21:18:17.000000000 -0800 -@@ -1671,7 +1671,7 @@ dnl cross-platform since the gcc used ca - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/patches/glibc/2.12.2/300-macos-cross-rpcgen.patch b/patches/glibc/2.12.2/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.12.2/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.12.2/900-march-i686.patch b/patches/glibc/2.12.2/900-march-i686.patch deleted file mode 100644 index 6030de9..0000000 --- a/patches/glibc/2.12.2/900-march-i686.patch +++ /dev/null @@ -1,34 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - -diff -urN glibc-2.12.2.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.2/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.12.2.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100 -+++ glibc-2.12.2/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -urN glibc-2.12.2.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.2/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.12.2.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100 -+++ glibc-2.12.2/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/patches/glibc/2.12.2/910-typedef-caddr.patch b/patches/glibc/2.12.2/910-typedef-caddr.patch deleted file mode 100644 index 4bc75cb..0000000 --- a/patches/glibc/2.12.2/910-typedef-caddr.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urN glibc-2.12.2-orig/posix/sys/types.h glibc-2.12.2/posix/sys/types.h ---- glibc-2.12.2-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.2/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 -@@ -114,7 +114,10 @@ - #ifdef __USE_BSD - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif -diff -urN glibc-2.12.2-orig/sunrpc/rpc/types.h glibc-2.12.2/sunrpc/rpc/types.h ---- glibc-2.12.2-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.2/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 -@@ -80,7 +80,10 @@ - #endif - #ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - #endif - diff --git a/patches/glibc/2.12.2/920-fix-rpc_parse-format.patch b/patches/glibc/2.12.2/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.12.2/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.12.2/940-nis-bogus-conditional.patch b/patches/glibc/2.12.2/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.12.2/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.12.2/999-new-tools.patch b/patches/glibc/2.12.2/999-new-tools.patch deleted file mode 100644 index e2f7b1d..0000000 --- a/patches/glibc/2.12.2/999-new-tools.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -urpN glibc-2.12.2.orig/configure glibc-2.12.2/configure ---- glibc-2.12.2.orig/configure 2010-12-13 02:47:26.000000000 -0800 -+++ glibc-2.12.2/configure 2017-02-08 00:38:10.249617723 -0800 -@@ -5189,7 +5189,7 @@ $as_echo_n "checking version of $CC... " - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | [4-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5252,7 +5252,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5379,7 +5379,7 @@ $as_echo_n "checking version of $MAKEINF - ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.*) -+ [4-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5439,7 +5439,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:$LINENO: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.12.2.orig/configure.in glibc-2.12.2/configure.in ---- glibc-2.12.2.orig/configure.in 2010-12-13 02:47:26.000000000 -0800 -+++ glibc-2.12.2/configure.in 2017-02-08 00:29:52.484183611 -0800 -@@ -1026,11 +1026,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], -@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg - MSGFMT=: aux_missing="$aux_missing msgfmt") - AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], -- [4.*], -+ [[4-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") - AC_CHECK_PROG_VER(SED, sed, --version, -- [GNU sed version \([0-9]*\.[0-9.]*\)], -+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") - diff --git a/patches/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.13/102-fix-signed-shift-overlow.patch b/patches/glibc/2.13/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.13/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.13/104-unused-variables.patch b/patches/glibc/2.13/104-unused-variables.patch deleted file mode 100644 index e063675..0000000 --- a/patches/glibc/2.13/104-unused-variables.patch +++ /dev/null @@ -1,165 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --#ifdef __STDC__ --static const float zero = 0.0; --#else --static float zero = 0.0; --#endif -- - #ifdef __STDC__ - float __ieee754_log10f(float x) - #else -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include "math.h" - #include "math_private.h" - --#ifdef __STDC__ --static const float one=1.0; --#else --static float one=1.0; --#endif -- - #ifdef __STDC__ - float __cosf(float x) - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - static long double - #endif - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.13/105-misleading-indentation.patch b/patches/glibc/2.13/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.13/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.13/106-dl-open-array-bounds.patch b/patches/glibc/2.13/106-dl-open-array-bounds.patch deleted file mode 100644 index bdb5c19..0000000 --- a/patches/glibc/2.13/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && ((nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index da21d9e..0000000 --- a/patches/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff -urpN glibc-2.13.orig/configure glibc-2.13/configure ---- glibc-2.13.orig/configure 2011-01-17 20:34:07.000000000 -0800 -+++ glibc-2.13/configure 2017-03-08 21:11:09.000000000 -0800 -@@ -6504,7 +6504,7 @@ EOF - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff -urpN glibc-2.13.orig/configure.in glibc-2.13/configure.in ---- glibc-2.13.orig/configure.in 2011-01-17 20:34:07.000000000 -0800 -+++ glibc-2.13/configure.in 2017-03-08 21:11:22.000000000 -0800 -@@ -1673,7 +1673,7 @@ dnl cross-platform since the gcc used ca - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/patches/glibc/2.13/300-macos-cross-rpcgen.patch b/patches/glibc/2.13/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.13/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.13/900-march-i686.patch b/patches/glibc/2.13/900-march-i686.patch deleted file mode 100644 index 7f5b1ce..0000000 --- a/patches/glibc/2.13/900-march-i686.patch +++ /dev/null @@ -1,34 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - -diff -urN glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100 -+++ glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -urN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/patches/glibc/2.13/910-typedef-caddr.patch b/patches/glibc/2.13/910-typedef-caddr.patch deleted file mode 100644 index e29e810..0000000 --- a/patches/glibc/2.13/910-typedef-caddr.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h ---- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 -@@ -114,7 +114,10 @@ - #ifdef __USE_BSD - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif -diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h ---- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 -@@ -80,7 +80,10 @@ - #endif - #ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - #endif - diff --git a/patches/glibc/2.13/920-fix-rpc_parse-format.patch b/patches/glibc/2.13/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.13/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.13/940-nis-bogus-conditional.patch b/patches/glibc/2.13/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.13/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.13/950-initfini-ppc64.patch b/patches/glibc/2.13/950-initfini-ppc64.patch deleted file mode 100644 index 87f8d23..0000000 --- a/patches/glibc/2.13/950-initfini-ppc64.patch +++ /dev/null @@ -1,20 +0,0 @@ -Prevent erroneous inline optimization of initfini.s on PowerPC64. - -The problem and the fix was reported there: -http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html -Git commit: -commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6 -Author: Ryan S. Arnold -Date: Tue May 3 17:26:17 2011 -0500 - ---- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800 -+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800 -@@ -31,7 +31,7 @@ - ifneq ($(elf),no) - # The initfini generation code doesn't work in the presence of -fPIC, so - # we use -fpic instead which is much better. --CFLAGS-initfini.s += -fpic -O1 -+CFLAGS-initfini.s += -fpic -O1 -fno-inline - endif - endif - diff --git a/patches/glibc/2.13/999-new-tools.patch b/patches/glibc/2.13/999-new-tools.patch deleted file mode 100644 index d2d498a..0000000 --- a/patches/glibc/2.13/999-new-tools.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -urpN glibc-2.13.orig/configure glibc-2.13/configure ---- glibc-2.13.orig/configure 2011-01-17 20:34:07.000000000 -0800 -+++ glibc-2.13/configure 2017-02-08 00:38:22.017735530 -0800 -@@ -5041,7 +5041,7 @@ $as_echo_n "checking version of $CC... " - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | [4-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5104,7 +5104,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5231,7 +5231,7 @@ $as_echo_n "checking version of $MAKEINF - ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.*) -+ [4-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5291,7 +5291,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.13.orig/configure.in glibc-2.13/configure.in ---- glibc-2.13.orig/configure.in 2011-01-17 20:34:07.000000000 -0800 -+++ glibc-2.13/configure.in 2017-02-08 00:30:01.720295526 -0800 -@@ -1026,11 +1026,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], -@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg - MSGFMT=: aux_missing="$aux_missing msgfmt") - AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], -- [4.*], -+ [[4-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") - AC_CHECK_PROG_VER(SED, sed, --version, -- [GNU sed version \([0-9]*\.[0-9.]*\)], -+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") - diff --git a/patches/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.14.1/102-fix-signed-shift-overlow.patch b/patches/glibc/2.14.1/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.14.1/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.14.1/103-dl-openat64-variadic.patch b/patches/glibc/2.14.1/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.14.1/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.14.1/104-unused-variables.patch b/patches/glibc/2.14.1/104-unused-variables.patch deleted file mode 100644 index e063675..0000000 --- a/patches/glibc/2.14.1/104-unused-variables.patch +++ /dev/null @@ -1,165 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --#ifdef __STDC__ --static const float zero = 0.0; --#else --static float zero = 0.0; --#endif -- - #ifdef __STDC__ - float __ieee754_log10f(float x) - #else -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include "math.h" - #include "math_private.h" - --#ifdef __STDC__ --static const float one=1.0; --#else --static float one=1.0; --#endif -- - #ifdef __STDC__ - float __cosf(float x) - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - static long double - #endif - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.14.1/105-misleading-indentation.patch b/patches/glibc/2.14.1/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.14.1/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.14.1/106-dl-open-array-bounds.patch b/patches/glibc/2.14.1/106-dl-open-array-bounds.patch deleted file mode 100644 index bdb5c19..0000000 --- a/patches/glibc/2.14.1/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && ((nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index d720d39..0000000 --- a/patches/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure ---- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700 -+++ glibc-2.14.1/configure 2017-03-08 21:06:36.000000000 -0800 -@@ -6377,7 +6377,7 @@ EOF - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in ---- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700 -+++ glibc-2.14.1/configure.in 2017-03-08 21:06:50.000000000 -0800 -@@ -1655,7 +1655,7 @@ dnl cross-platform since the gcc used ca - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/patches/glibc/2.14.1/300-macos-cross-rpcgen.patch b/patches/glibc/2.14.1/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.14.1/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.14.1/900-cpuid-include.patch b/patches/glibc/2.14.1/900-cpuid-include.patch deleted file mode 100644 index 0b8db71..0000000 --- a/patches/glibc/2.14.1/900-cpuid-include.patch +++ /dev/null @@ -1,628 +0,0 @@ -This patch fixes another configure test issue when bootstrapping. -sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to -test for cpuid.h, and that macro tries to include various other -standard headers (which come from the library, unlike cpuid.h which -comes from the compiler, so aren't available when bootstrapping) in -the test code it compiles. This patch changes the code to use -AC_CHECK_HEADER, with the fourth argument used to prevent any default -includes being used in the test. - -Tested x86_64 (native). - -2012-03-07 Joseph Myers - - * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no - default includes instead of AC_HEADER_CHECK. - * sysdeps/i386/configure: Regenerated. - -Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html - -diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure glibc-2.14.1/sysdeps/i386/configure ---- glibc-2.14.1.orig/sysdeps/i386/configure 2011-10-07 20:48:55.000000000 +1100 -+++ glibc-2.14.1/sysdeps/i386/configure 2012-07-25 01:23:11.799118927 +1000 -@@ -16,23 +16,6 @@ - as_fn_set_status $1 - exit $1 - } # as_fn_exit --# as_fn_arith ARG... --# ------------------ --# Perform arithmetic evaluation on the ARGs, and store the result in the --# global $as_val. Take advantage of shells that can avoid forks. The arguments --# must be portable across $(()) and expr. --if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -- eval 'as_fn_arith () -- { -- as_val=$(( $* )) -- }' --else -- as_fn_arith () -- { -- as_val=`expr "$@" || test $? -eq 1` -- } --fi # as_fn_arith -- - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -89,6 +72,10 @@ - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - -+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have -+ # already done that, so ensure we don't try to do so again and fall -+ # in an infinite loop. This has already happened in practice. -+ _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). -@@ -97,42 +84,6 @@ - exit - } - --# Factoring default headers for most tests. --ac_includes_default="\ --#include --#ifdef HAVE_SYS_TYPES_H --# include --#endif --#ifdef HAVE_SYS_STAT_H --# include --#endif --#ifdef STDC_HEADERS --# include --# include --#else --# ifdef HAVE_STDLIB_H --# include --# endif --#endif --#ifdef HAVE_STRING_H --# if !defined STDC_HEADERS && defined HAVE_MEMORY_H --# include --# endif --# include --#endif --#ifdef HAVE_STRINGS_H --# include --#endif --#ifdef HAVE_INTTYPES_H --# include --#endif --#ifdef HAVE_STDINT_H --# include --#endif --#ifdef HAVE_UNISTD_H --# include --#endif" -- - - # ac_fn_c_try_compile LINENO - # -------------------------- -@@ -167,177 +118,11 @@ - - ac_retval=1 - fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - - } # ac_fn_c_try_compile - --# ac_fn_c_try_cpp LINENO --# ---------------------- --# Try to preprocess conftest.$ac_ext, and return whether this succeeded. --ac_fn_c_try_cpp () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err -- ac_status=$? -- if test -s conftest.err; then -- grep -v '^ *+' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- mv -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then : -- ac_retval=0 --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=1 --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- as_fn_set_status $ac_retval -- --} # ac_fn_c_try_cpp -- --# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES --# ------------------------------------------------------- --# Tests whether HEADER exists, giving a warning if it cannot be compiled using --# the include files in INCLUDES and setting the cache variable VAR --# accordingly. --ac_fn_c_check_header_mongrel () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if eval "test \"\${$3+set}\"" = set; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if eval "test \"\${$3+set}\"" = set; then : -- $as_echo_n "(cached) " >&6 --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --else -- # Is the header compilable? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 --$as_echo_n "checking $2 usability... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --#include <$2> --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_header_compiler=yes --else -- ac_header_compiler=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 --$as_echo "$ac_header_compiler" >&6; } -- --# Is the header present? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 --$as_echo_n "checking $2 presence... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <$2> --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- ac_header_preproc=yes --else -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 --$as_echo "$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( -- yes:no: ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 --$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; -- no:yes:* ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 --$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 --$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 --$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 --$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; --esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if eval "test \"\${$3+set}\"" = set; then : -- $as_echo_n "(cached) " >&6 --else -- eval "$3=\$ac_header_compiler" --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- --} # ac_fn_c_check_header_mongrel -- --# ac_fn_c_try_run LINENO --# ---------------------- --# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes --# that executables *can* be run. --ac_fn_c_try_run () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' -- { { case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then : -- ac_retval=0 --else -- $as_echo "$as_me: program exited with status $ac_status" >&5 -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=$ac_status --fi -- rm -rf conftest.dSYM conftest_ipa8_conftest.oo -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- as_fn_set_status $ac_retval -- --} # ac_fn_c_try_run -- - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES - # ------------------------------------------------------- - # Tests whether HEADER exists and can be compiled using the include files in -@@ -347,7 +132,7 @@ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if eval "test \"\${$3+set}\"" = set; then : -+if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -365,275 +150,16 @@ - eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - - } # ac_fn_c_check_header_compile - # This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/i386. - - -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 --$as_echo_n "checking for grep that handles long lines and -e... " >&6; } --if test "${ac_cv_path_GREP+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if test -z "$GREP"; then -- ac_path_GREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in grep ggrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue --# Check for GNU ac_path_GREP and select it if it is found. -- # Check for GNU $ac_path_GREP --case `"$ac_path_GREP" --version 2>&1` in --*GNU*) -- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'GREP' >> "conftest.nl" -- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_GREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_GREP="$ac_path_GREP" -- ac_path_GREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -- -- $ac_path_GREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_GREP"; then -- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_GREP=$GREP --fi -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 --$as_echo "$ac_cv_path_GREP" >&6; } -- GREP="$ac_cv_path_GREP" -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 --$as_echo_n "checking for egrep... " >&6; } --if test "${ac_cv_path_EGREP+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 -- then ac_cv_path_EGREP="$GREP -E" -- else -- if test -z "$EGREP"; then -- ac_path_EGREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in egrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue --# Check for GNU ac_path_EGREP and select it if it is found. -- # Check for GNU $ac_path_EGREP --case `"$ac_path_EGREP" --version 2>&1` in --*GNU*) -- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'EGREP' >> "conftest.nl" -- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_EGREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_EGREP="$ac_path_EGREP" -- ac_path_EGREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -- -- $ac_path_EGREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_EGREP"; then -- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_EGREP=$EGREP --fi -- -- fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 --$as_echo "$ac_cv_path_EGREP" >&6; } -- EGREP="$ac_cv_path_EGREP" -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 --$as_echo_n "checking for ANSI C header files... " >&6; } --if test "${ac_cv_header_stdc+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --#include --#include --#include -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_header_stdc=yes --else -- ac_cv_header_stdc=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- --if test $ac_cv_header_stdc = yes; then -- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then : -- : --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --#include --#if ((' ' & 0x0FF) == 0x020) --# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) --#else --# define ISLOWER(c) \ -- (('a' <= (c) && (c) <= 'i') \ -- || ('j' <= (c) && (c) <= 'r') \ -- || ('s' <= (c) && (c) <= 'z')) --# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) --#endif -- --#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) --int --main () --{ -- int i; -- for (i = 0; i < 256; i++) -- if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -- return 2; -- return 0; --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 --$as_echo "$ac_cv_header_stdc" >&6; } --if test $ac_cv_header_stdc = yes; then -- --$as_echo "#define STDC_HEADERS 1" >>confdefs.h -- --fi -- --# On IRIX 5.3, sys/types and inttypes.h are conflicting. --for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ - " --if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- --ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" --if test "x$ac_cv_header_cpuid_h" = x""yes; then : -+if test "x$ac_cv_header_cpuid_h" = xyes; then : - - else - as_fn_error $? "gcc must provide the header" "$LINENO" 5 -@@ -643,7 +169,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5 - $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } --if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then : -+if ${libc_cv_cpp_asm_debuginfo+:} false; then : - $as_echo_n "(cached) " >&6 - else - cat > conftest.S <&5 - $as_echo_n "checking for SSE4 support... " >&6; } --if test "${libc_cv_cc_sse4+set}" = set; then : -+if ${libc_cv_cc_sse4+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null' -@@ -716,7 +242,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5 - $as_echo_n "checking for assembler -mtune=i686 support... " >&6; } --if test "${libc_cv_as_i686+set}" = set; then : -+if ${libc_cv_as_i686+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null' -@@ -735,7 +261,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5 - $as_echo_n "checking for AVX support... " >&6; } --if test "${libc_cv_cc_avx+set}" = set; then : -+if ${libc_cv_cc_avx+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null' -@@ -758,7 +284,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5 - $as_echo_n "checking for -mno-vzeroupper support... " >&6; } --if test "${libc_cv_cc_novzeroupper+set}" = set; then : -+if ${libc_cv_cc_novzeroupper+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null' -diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure.in glibc-2.14.1/sysdeps/i386/configure.in ---- glibc-2.14.1.orig/sysdeps/i386/configure.in 2011-10-07 20:48:55.000000000 +1100 -+++ glibc-2.14.1/sysdeps/i386/configure.in 2012-07-25 01:00:49.345025022 +1000 -@@ -1,8 +1,9 @@ - GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - # Local configure fragment for sysdeps/i386. - --AC_HEADER_CHECK([cpuid.h], , -- [AC_MSG_ERROR([gcc must provide the header])]) -+AC_CHECK_HEADER([cpuid.h], , -+ [AC_MSG_ERROR([gcc must provide the header])], -+ [/* No default includes. */]) - - AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, - libc_cv_cpp_asm_debuginfo, [dnl - diff --git a/patches/glibc/2.14.1/910-asm-i686.patch b/patches/glibc/2.14.1/910-asm-i686.patch deleted file mode 100644 index b049887..0000000 --- a/patches/glibc/2.14.1/910-asm-i686.patch +++ /dev/null @@ -1,50 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - diff --git a/patches/glibc/2.14.1/920-fix-rpc_parse-format.patch b/patches/glibc/2.14.1/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.14.1/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.14.1/940-nis-bogus-conditional.patch b/patches/glibc/2.14.1/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.14.1/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.14.1/950-initfini-ppc64.patch b/patches/glibc/2.14.1/950-initfini-ppc64.patch deleted file mode 100644 index 87f8d23..0000000 --- a/patches/glibc/2.14.1/950-initfini-ppc64.patch +++ /dev/null @@ -1,20 +0,0 @@ -Prevent erroneous inline optimization of initfini.s on PowerPC64. - -The problem and the fix was reported there: -http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html -Git commit: -commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6 -Author: Ryan S. Arnold -Date: Tue May 3 17:26:17 2011 -0500 - ---- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800 -+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800 -@@ -31,7 +31,7 @@ - ifneq ($(elf),no) - # The initfini generation code doesn't work in the presence of -fPIC, so - # we use -fpic instead which is much better. --CFLAGS-initfini.s += -fpic -O1 -+CFLAGS-initfini.s += -fpic -O1 -fno-inline - endif - endif - diff --git a/patches/glibc/2.14.1/999-new-tools.patch b/patches/glibc/2.14.1/999-new-tools.patch deleted file mode 100644 index f335a54..0000000 --- a/patches/glibc/2.14.1/999-new-tools.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure ---- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700 -+++ glibc-2.14.1/configure 2017-02-08 00:38:43.765952352 -0800 -@@ -4939,7 +4939,7 @@ $as_echo_n "checking version of $CC... " - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | [4-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5002,7 +5002,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5129,7 +5129,7 @@ $as_echo_n "checking version of $MAKEINF - ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.*) -+ [4-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5189,7 +5189,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in ---- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700 -+++ glibc-2.14.1/configure.in 2017-02-08 00:30:13.660439376 -0800 -@@ -1026,11 +1026,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], -@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg - MSGFMT=: aux_missing="$aux_missing msgfmt") - AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], -- [4.*], -+ [[4-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") - AC_CHECK_PROG_VER(SED, sed, --version, -- [GNU sed version \([0-9]*\.[0-9.]*\)], -+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") - diff --git a/patches/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.14/102-fix-signed-shift-overlow.patch b/patches/glibc/2.14/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.14/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.14/103-dl-openat64-variadic.patch b/patches/glibc/2.14/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.14/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.14/104-unused-variables.patch b/patches/glibc/2.14/104-unused-variables.patch deleted file mode 100644 index e063675..0000000 --- a/patches/glibc/2.14/104-unused-variables.patch +++ /dev/null @@ -1,165 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --#ifdef __STDC__ --static const float zero = 0.0; --#else --static float zero = 0.0; --#endif -- - #ifdef __STDC__ - float __ieee754_log10f(float x) - #else -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include "math.h" - #include "math_private.h" - --#ifdef __STDC__ --static const float one=1.0; --#else --static float one=1.0; --#endif -- - #ifdef __STDC__ - float __cosf(float x) - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - static long double - #endif - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.14/105-misleading-indentation.patch b/patches/glibc/2.14/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.14/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.14/106-dl-open-array-bounds.patch b/patches/glibc/2.14/106-dl-open-array-bounds.patch deleted file mode 100644 index bdb5c19..0000000 --- a/patches/glibc/2.14/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && ((nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index d720d39..0000000 --- a/patches/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure ---- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700 -+++ glibc-2.14.1/configure 2017-03-08 21:06:36.000000000 -0800 -@@ -6377,7 +6377,7 @@ EOF - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in ---- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700 -+++ glibc-2.14.1/configure.in 2017-03-08 21:06:50.000000000 -0800 -@@ -1655,7 +1655,7 @@ dnl cross-platform since the gcc used ca - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/patches/glibc/2.14/300-macos-cross-rpcgen.patch b/patches/glibc/2.14/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.14/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.14/900-cpuid-include.patch b/patches/glibc/2.14/900-cpuid-include.patch deleted file mode 100644 index 0b8db71..0000000 --- a/patches/glibc/2.14/900-cpuid-include.patch +++ /dev/null @@ -1,628 +0,0 @@ -This patch fixes another configure test issue when bootstrapping. -sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to -test for cpuid.h, and that macro tries to include various other -standard headers (which come from the library, unlike cpuid.h which -comes from the compiler, so aren't available when bootstrapping) in -the test code it compiles. This patch changes the code to use -AC_CHECK_HEADER, with the fourth argument used to prevent any default -includes being used in the test. - -Tested x86_64 (native). - -2012-03-07 Joseph Myers - - * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no - default includes instead of AC_HEADER_CHECK. - * sysdeps/i386/configure: Regenerated. - -Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html - -diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure glibc-2.14.1/sysdeps/i386/configure ---- glibc-2.14.1.orig/sysdeps/i386/configure 2011-10-07 20:48:55.000000000 +1100 -+++ glibc-2.14.1/sysdeps/i386/configure 2012-07-25 01:23:11.799118927 +1000 -@@ -16,23 +16,6 @@ - as_fn_set_status $1 - exit $1 - } # as_fn_exit --# as_fn_arith ARG... --# ------------------ --# Perform arithmetic evaluation on the ARGs, and store the result in the --# global $as_val. Take advantage of shells that can avoid forks. The arguments --# must be portable across $(()) and expr. --if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -- eval 'as_fn_arith () -- { -- as_val=$(( $* )) -- }' --else -- as_fn_arith () -- { -- as_val=`expr "$@" || test $? -eq 1` -- } --fi # as_fn_arith -- - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -89,6 +72,10 @@ - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - -+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have -+ # already done that, so ensure we don't try to do so again and fall -+ # in an infinite loop. This has already happened in practice. -+ _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). -@@ -97,42 +84,6 @@ - exit - } - --# Factoring default headers for most tests. --ac_includes_default="\ --#include --#ifdef HAVE_SYS_TYPES_H --# include --#endif --#ifdef HAVE_SYS_STAT_H --# include --#endif --#ifdef STDC_HEADERS --# include --# include --#else --# ifdef HAVE_STDLIB_H --# include --# endif --#endif --#ifdef HAVE_STRING_H --# if !defined STDC_HEADERS && defined HAVE_MEMORY_H --# include --# endif --# include --#endif --#ifdef HAVE_STRINGS_H --# include --#endif --#ifdef HAVE_INTTYPES_H --# include --#endif --#ifdef HAVE_STDINT_H --# include --#endif --#ifdef HAVE_UNISTD_H --# include --#endif" -- - - # ac_fn_c_try_compile LINENO - # -------------------------- -@@ -167,177 +118,11 @@ - - ac_retval=1 - fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - - } # ac_fn_c_try_compile - --# ac_fn_c_try_cpp LINENO --# ---------------------- --# Try to preprocess conftest.$ac_ext, and return whether this succeeded. --ac_fn_c_try_cpp () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err -- ac_status=$? -- if test -s conftest.err; then -- grep -v '^ *+' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- mv -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then : -- ac_retval=0 --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=1 --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- as_fn_set_status $ac_retval -- --} # ac_fn_c_try_cpp -- --# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES --# ------------------------------------------------------- --# Tests whether HEADER exists, giving a warning if it cannot be compiled using --# the include files in INCLUDES and setting the cache variable VAR --# accordingly. --ac_fn_c_check_header_mongrel () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if eval "test \"\${$3+set}\"" = set; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if eval "test \"\${$3+set}\"" = set; then : -- $as_echo_n "(cached) " >&6 --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --else -- # Is the header compilable? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 --$as_echo_n "checking $2 usability... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --#include <$2> --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_header_compiler=yes --else -- ac_header_compiler=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 --$as_echo "$ac_header_compiler" >&6; } -- --# Is the header present? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 --$as_echo_n "checking $2 presence... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <$2> --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- ac_header_preproc=yes --else -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 --$as_echo "$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( -- yes:no: ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 --$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; -- no:yes:* ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 --$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 --$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 --$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 --$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; --esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if eval "test \"\${$3+set}\"" = set; then : -- $as_echo_n "(cached) " >&6 --else -- eval "$3=\$ac_header_compiler" --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- --} # ac_fn_c_check_header_mongrel -- --# ac_fn_c_try_run LINENO --# ---------------------- --# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes --# that executables *can* be run. --ac_fn_c_try_run () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' -- { { case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then : -- ac_retval=0 --else -- $as_echo "$as_me: program exited with status $ac_status" >&5 -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=$ac_status --fi -- rm -rf conftest.dSYM conftest_ipa8_conftest.oo -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- as_fn_set_status $ac_retval -- --} # ac_fn_c_try_run -- - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES - # ------------------------------------------------------- - # Tests whether HEADER exists and can be compiled using the include files in -@@ -347,7 +132,7 @@ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if eval "test \"\${$3+set}\"" = set; then : -+if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -365,275 +150,16 @@ - eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - - } # ac_fn_c_check_header_compile - # This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/i386. - - -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 --$as_echo_n "checking for grep that handles long lines and -e... " >&6; } --if test "${ac_cv_path_GREP+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if test -z "$GREP"; then -- ac_path_GREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in grep ggrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue --# Check for GNU ac_path_GREP and select it if it is found. -- # Check for GNU $ac_path_GREP --case `"$ac_path_GREP" --version 2>&1` in --*GNU*) -- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'GREP' >> "conftest.nl" -- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_GREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_GREP="$ac_path_GREP" -- ac_path_GREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -- -- $ac_path_GREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_GREP"; then -- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_GREP=$GREP --fi -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 --$as_echo "$ac_cv_path_GREP" >&6; } -- GREP="$ac_cv_path_GREP" -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 --$as_echo_n "checking for egrep... " >&6; } --if test "${ac_cv_path_EGREP+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 -- then ac_cv_path_EGREP="$GREP -E" -- else -- if test -z "$EGREP"; then -- ac_path_EGREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in egrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue --# Check for GNU ac_path_EGREP and select it if it is found. -- # Check for GNU $ac_path_EGREP --case `"$ac_path_EGREP" --version 2>&1` in --*GNU*) -- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'EGREP' >> "conftest.nl" -- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_EGREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_EGREP="$ac_path_EGREP" -- ac_path_EGREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -- -- $ac_path_EGREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_EGREP"; then -- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_EGREP=$EGREP --fi -- -- fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 --$as_echo "$ac_cv_path_EGREP" >&6; } -- EGREP="$ac_cv_path_EGREP" -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 --$as_echo_n "checking for ANSI C header files... " >&6; } --if test "${ac_cv_header_stdc+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --#include --#include --#include -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_header_stdc=yes --else -- ac_cv_header_stdc=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- --if test $ac_cv_header_stdc = yes; then -- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then : -- : --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --#include --#if ((' ' & 0x0FF) == 0x020) --# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) --#else --# define ISLOWER(c) \ -- (('a' <= (c) && (c) <= 'i') \ -- || ('j' <= (c) && (c) <= 'r') \ -- || ('s' <= (c) && (c) <= 'z')) --# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) --#endif -- --#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) --int --main () --{ -- int i; -- for (i = 0; i < 256; i++) -- if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -- return 2; -- return 0; --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 --$as_echo "$ac_cv_header_stdc" >&6; } --if test $ac_cv_header_stdc = yes; then -- --$as_echo "#define STDC_HEADERS 1" >>confdefs.h -- --fi -- --# On IRIX 5.3, sys/types and inttypes.h are conflicting. --for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ - " --if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- --ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" --if test "x$ac_cv_header_cpuid_h" = x""yes; then : -+if test "x$ac_cv_header_cpuid_h" = xyes; then : - - else - as_fn_error $? "gcc must provide the header" "$LINENO" 5 -@@ -643,7 +169,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5 - $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } --if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then : -+if ${libc_cv_cpp_asm_debuginfo+:} false; then : - $as_echo_n "(cached) " >&6 - else - cat > conftest.S <&5 - $as_echo_n "checking for SSE4 support... " >&6; } --if test "${libc_cv_cc_sse4+set}" = set; then : -+if ${libc_cv_cc_sse4+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null' -@@ -716,7 +242,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5 - $as_echo_n "checking for assembler -mtune=i686 support... " >&6; } --if test "${libc_cv_as_i686+set}" = set; then : -+if ${libc_cv_as_i686+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null' -@@ -735,7 +261,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5 - $as_echo_n "checking for AVX support... " >&6; } --if test "${libc_cv_cc_avx+set}" = set; then : -+if ${libc_cv_cc_avx+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null' -@@ -758,7 +284,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5 - $as_echo_n "checking for -mno-vzeroupper support... " >&6; } --if test "${libc_cv_cc_novzeroupper+set}" = set; then : -+if ${libc_cv_cc_novzeroupper+:} false; then : - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null' -diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure.in glibc-2.14.1/sysdeps/i386/configure.in ---- glibc-2.14.1.orig/sysdeps/i386/configure.in 2011-10-07 20:48:55.000000000 +1100 -+++ glibc-2.14.1/sysdeps/i386/configure.in 2012-07-25 01:00:49.345025022 +1000 -@@ -1,8 +1,9 @@ - GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - # Local configure fragment for sysdeps/i386. - --AC_HEADER_CHECK([cpuid.h], , -- [AC_MSG_ERROR([gcc must provide the header])]) -+AC_CHECK_HEADER([cpuid.h], , -+ [AC_MSG_ERROR([gcc must provide the header])], -+ [/* No default includes. */]) - - AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, - libc_cv_cpp_asm_debuginfo, [dnl - diff --git a/patches/glibc/2.14/920-fix-rpc_parse-format.patch b/patches/glibc/2.14/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.14/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.14/940-nis-bogus-conditional.patch b/patches/glibc/2.14/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.14/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.14/950-initfini-ppc64.patch b/patches/glibc/2.14/950-initfini-ppc64.patch deleted file mode 100644 index 87f8d23..0000000 --- a/patches/glibc/2.14/950-initfini-ppc64.patch +++ /dev/null @@ -1,20 +0,0 @@ -Prevent erroneous inline optimization of initfini.s on PowerPC64. - -The problem and the fix was reported there: -http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html -Git commit: -commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6 -Author: Ryan S. Arnold -Date: Tue May 3 17:26:17 2011 -0500 - ---- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800 -+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800 -@@ -31,7 +31,7 @@ - ifneq ($(elf),no) - # The initfini generation code doesn't work in the presence of -fPIC, so - # we use -fpic instead which is much better. --CFLAGS-initfini.s += -fpic -O1 -+CFLAGS-initfini.s += -fpic -O1 -fno-inline - endif - endif - diff --git a/patches/glibc/2.14/999-new-tools.patch b/patches/glibc/2.14/999-new-tools.patch deleted file mode 100644 index 7d115fd..0000000 --- a/patches/glibc/2.14/999-new-tools.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -urpN glibc-2.14.orig/configure glibc-2.14/configure ---- glibc-2.14.orig/configure 2011-05-30 21:12:33.000000000 -0700 -+++ glibc-2.14/configure 2017-02-08 00:38:34.469859812 -0800 -@@ -4939,7 +4939,7 @@ $as_echo_n "checking version of $CC... " - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | [4-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5002,7 +5002,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5129,7 +5129,7 @@ $as_echo_n "checking version of $MAKEINF - ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.*) -+ [4-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5189,7 +5189,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.14.orig/configure.in glibc-2.14/configure.in ---- glibc-2.14.orig/configure.in 2011-05-30 21:12:33.000000000 -0700 -+++ glibc-2.14/configure.in 2017-02-08 00:30:32.232661325 -0800 -@@ -1026,11 +1026,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], -@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg - MSGFMT=: aux_missing="$aux_missing msgfmt") - AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], -- [4.*], -+ [[4-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") - AC_CHECK_PROG_VER(SED, sed, --version, -- [GNU sed version \([0-9]*\.[0-9.]*\)], -+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") - diff --git a/patches/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.15/102-fix-signed-shift-overlow.patch b/patches/glibc/2.15/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.15/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.15/103-dl-openat64-variadic.patch b/patches/glibc/2.15/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.15/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.15/104-unused-variables.patch b/patches/glibc/2.15/104-unused-variables.patch deleted file mode 100644 index 63e4a40..0000000 --- a/patches/glibc/2.15/104-unused-variables.patch +++ /dev/null @@ -1,161 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include "math.h" - #include "math_private.h" - --#ifdef __STDC__ --static const float one=1.0; --#else --static float one=1.0; --#endif -- - #ifdef __STDC__ - float __cosf(float x) - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - static long double - #endif - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.15/105-misleading-indentation.patch b/patches/glibc/2.15/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.15/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.15/106-dl-open-array-bounds.patch b/patches/glibc/2.15/106-dl-open-array-bounds.patch deleted file mode 100644 index bdb5c19..0000000 --- a/patches/glibc/2.15/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && ((nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index c36cdf4..0000000 --- a/patches/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff -urpN glibc-2.15.orig/configure glibc-2.15/configure ---- glibc-2.15.orig/configure 2012-03-19 07:56:58.000000000 -0700 -+++ glibc-2.15/configure 2017-03-08 21:02:21.000000000 -0800 -@@ -6566,7 +6566,7 @@ EOF - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in ---- glibc-2.15.orig/configure.in 2012-01-01 04:16:32.000000000 -0800 -+++ glibc-2.15/configure.in 2017-03-08 21:01:54.000000000 -0800 -@@ -1716,7 +1716,7 @@ dnl cross-platform since the gcc used ca - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no diff --git a/patches/glibc/2.15/300-macos-cross-rpcgen.patch b/patches/glibc/2.15/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.15/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.15/900-cpuid-include.patch b/patches/glibc/2.15/900-cpuid-include.patch deleted file mode 100644 index 29edf7b..0000000 --- a/patches/glibc/2.15/900-cpuid-include.patch +++ /dev/null @@ -1,548 +0,0 @@ -[As applied to 2.15] - -This patch fixes another configure test issue when bootstrapping. -sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to -test for cpuid.h, and that macro tries to include various other -standard headers (which come from the library, unlike cpuid.h which -comes from the compiler, so aren't available when bootstrapping) in -the test code it compiles. This patch changes the code to use -AC_CHECK_HEADER, with the fourth argument used to prevent any default -includes being used in the test. - -Tested x86_64 (native). - -2012-03-07 Joseph Myers - - * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no - default includes instead of AC_HEADER_CHECK. - * sysdeps/i386/configure: Regenerated. - -Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html - -diff -urpN '--exclude=autom4te.cache' glibc-2.15.orig/sysdeps/i386/configure glibc-2.15/sysdeps/i386/configure ---- glibc-2.15.orig/sysdeps/i386/configure 2017-02-08 14:28:19.947516097 -0800 -+++ glibc-2.15/sysdeps/i386/configure 2017-02-08 17:25:19.756462280 -0800 -@@ -16,23 +16,6 @@ as_fn_exit () - as_fn_set_status $1 - exit $1 - } # as_fn_exit --# as_fn_arith ARG... --# ------------------ --# Perform arithmetic evaluation on the ARGs, and store the result in the --# global $as_val. Take advantage of shells that can avoid forks. The arguments --# must be portable across $(()) and expr. --if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -- eval 'as_fn_arith () -- { -- as_val=$(( $* )) -- }' --else -- as_fn_arith () -- { -- as_val=`expr "$@" || test $? -eq 1` -- } --fi # as_fn_arith -- - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -97,42 +80,6 @@ $as_echo X/"$0" | - exit - } - --# Factoring default headers for most tests. --ac_includes_default="\ --#include --#ifdef HAVE_SYS_TYPES_H --# include --#endif --#ifdef HAVE_SYS_STAT_H --# include --#endif --#ifdef STDC_HEADERS --# include --# include --#else --# ifdef HAVE_STDLIB_H --# include --# endif --#endif --#ifdef HAVE_STRING_H --# if !defined STDC_HEADERS && defined HAVE_MEMORY_H --# include --# endif --# include --#endif --#ifdef HAVE_STRINGS_H --# include --#endif --#ifdef HAVE_INTTYPES_H --# include --#endif --#ifdef HAVE_STDINT_H --# include --#endif --#ifdef HAVE_UNISTD_H --# include --#endif" -- - - # ac_fn_c_try_compile LINENO - # -------------------------- -@@ -172,172 +119,6 @@ fi - - } # ac_fn_c_try_compile - --# ac_fn_c_try_cpp LINENO --# ---------------------- --# Try to preprocess conftest.$ac_ext, and return whether this succeeded. --ac_fn_c_try_cpp () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err -- ac_status=$? -- if test -s conftest.err; then -- grep -v '^ *+' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- mv -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } > conftest.i && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then : -- ac_retval=0 --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=1 --fi -- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -- as_fn_set_status $ac_retval -- --} # ac_fn_c_try_cpp -- --# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES --# ------------------------------------------------------- --# Tests whether HEADER exists, giving a warning if it cannot be compiled using --# the include files in INCLUDES and setting the cache variable VAR --# accordingly. --ac_fn_c_check_header_mongrel () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if eval \${$3+:} false; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if eval \${$3+:} false; then : -- $as_echo_n "(cached) " >&6 --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --else -- # Is the header compilable? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 --$as_echo_n "checking $2 usability... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --#include <$2> --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_header_compiler=yes --else -- ac_header_compiler=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 --$as_echo "$ac_header_compiler" >&6; } -- --# Is the header present? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 --$as_echo_n "checking $2 presence... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <$2> --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- ac_header_preproc=yes --else -- ac_header_preproc=no --fi --rm -f conftest.err conftest.i conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 --$as_echo "$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( -- yes:no: ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 --$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; -- no:yes:* ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 --$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 --$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 --$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 --$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; --esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if eval \${$3+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- eval "$3=\$ac_header_compiler" --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --fi -- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -- --} # ac_fn_c_check_header_mongrel -- --# ac_fn_c_try_run LINENO --# ---------------------- --# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes --# that executables *can* be run. --ac_fn_c_try_run () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' -- { { case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then : -- ac_retval=0 --else -- $as_echo "$as_me: program exited with status $ac_status" >&5 -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=$ac_status --fi -- rm -rf conftest.dSYM conftest_ipa8_conftest.oo -- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -- as_fn_set_status $ac_retval -- --} # ac_fn_c_try_run -- - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES - # ------------------------------------------------------- - # Tests whether HEADER exists and can be compiled using the include files in -@@ -372,267 +153,8 @@ $as_echo "$ac_res" >&6; } - # Local configure fragment for sysdeps/i386. - - -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 --$as_echo_n "checking for grep that handles long lines and -e... " >&6; } --if ${ac_cv_path_GREP+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -z "$GREP"; then -- ac_path_GREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in grep ggrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue --# Check for GNU ac_path_GREP and select it if it is found. -- # Check for GNU $ac_path_GREP --case `"$ac_path_GREP" --version 2>&1` in --*GNU*) -- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'GREP' >> "conftest.nl" -- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_GREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_GREP="$ac_path_GREP" -- ac_path_GREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -- -- $ac_path_GREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_GREP"; then -- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_GREP=$GREP --fi -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 --$as_echo "$ac_cv_path_GREP" >&6; } -- GREP="$ac_cv_path_GREP" -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 --$as_echo_n "checking for egrep... " >&6; } --if ${ac_cv_path_EGREP+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 -- then ac_cv_path_EGREP="$GREP -E" -- else -- if test -z "$EGREP"; then -- ac_path_EGREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in egrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue --# Check for GNU ac_path_EGREP and select it if it is found. -- # Check for GNU $ac_path_EGREP --case `"$ac_path_EGREP" --version 2>&1` in --*GNU*) -- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'EGREP' >> "conftest.nl" -- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_EGREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_EGREP="$ac_path_EGREP" -- ac_path_EGREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -- -- $ac_path_EGREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_EGREP"; then -- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_EGREP=$EGREP --fi -- -- fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 --$as_echo "$ac_cv_path_EGREP" >&6; } -- EGREP="$ac_cv_path_EGREP" -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 --$as_echo_n "checking for ANSI C header files... " >&6; } --if ${ac_cv_header_stdc+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --#include --#include --#include -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_header_stdc=yes --else -- ac_cv_header_stdc=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- --if test $ac_cv_header_stdc = yes; then -- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then : -- : --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --#include --#if ((' ' & 0x0FF) == 0x020) --# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) --#else --# define ISLOWER(c) \ -- (('a' <= (c) && (c) <= 'i') \ -- || ('j' <= (c) && (c) <= 'r') \ -- || ('s' <= (c) && (c) <= 'z')) --# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) --#endif -- --#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) --int --main () --{ -- int i; -- for (i = 0; i < 256; i++) -- if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -- return 2; -- return 0; --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 --$as_echo "$ac_cv_header_stdc" >&6; } --if test $ac_cv_header_stdc = yes; then -- --$as_echo "#define STDC_HEADERS 1" >>confdefs.h -- --fi -- --# On IRIX 5.3, sys/types and inttypes.h are conflicting. --for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ - " --if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- --ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default" - if test "x$ac_cv_header_cpuid_h" = xyes; then : - - else -diff -urpN '--exclude=autom4te.cache' glibc-2.15.orig/sysdeps/i386/configure.in glibc-2.15/sysdeps/i386/configure.in ---- glibc-2.15.orig/sysdeps/i386/configure.in 2017-02-08 14:28:19.951516034 -0800 -+++ glibc-2.15/sysdeps/i386/configure.in 2017-02-08 17:24:29.995973278 -0800 -@@ -1,8 +1,9 @@ - GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - # Local configure fragment for sysdeps/i386. - --AC_HEADER_CHECK([cpuid.h], , -- [AC_MSG_ERROR([gcc must provide the header])]) -+AC_CHECK_HEADER([cpuid.h], , -+ [AC_MSG_ERROR([gcc must provide the header])], -+ [/* No default includes. */]) - - AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, - libc_cv_cpp_asm_debuginfo, [dnl diff --git a/patches/glibc/2.15/910-asm-i686.patch b/patches/glibc/2.15/910-asm-i686.patch deleted file mode 100644 index b049887..0000000 --- a/patches/glibc/2.15/910-asm-i686.patch +++ /dev/null @@ -1,50 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - diff --git a/patches/glibc/2.15/920-fix-rpc_parse-format.patch b/patches/glibc/2.15/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.15/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.15/940-nis-bogus-conditional.patch b/patches/glibc/2.15/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.15/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.15/990-try-link-static.patch b/patches/glibc/2.15/990-try-link-static.patch deleted file mode 100644 index a0ffadd..0000000 --- a/patches/glibc/2.15/990-try-link-static.patch +++ /dev/null @@ -1,171 +0,0 @@ -[Patch modified to apply to 2.15] - -commit 07037eeb43ca1e0ac2802e3a1492cecf869c63c6 -Author: Joseph Myers -Date: Thu Mar 8 00:17:27 2012 +0000 - - Fix .ctors/.dtors header configure test for bootstrapping. - -diff -urpN glibc-2.15.orig/aclocal.m4 glibc-2.15/aclocal.m4 ---- glibc-2.15.orig/aclocal.m4 2017-02-08 11:27:28.445657746 -0800 -+++ glibc-2.15/aclocal.m4 2017-02-08 11:37:25.818463475 -0800 -@@ -114,3 +114,17 @@ AC_CACHE_CHECK(whether $LD is GNU ld, li - [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) - gnu_ld=$libc_cv_prog_ld_gnu - ]) -+ -+dnl Run a static link test with -nostdlib -nostartfiles. -+dnl LIBC_TRY_LINK_STATIC([code], [action-if-true], [action-if-false]) -+AC_DEFUN([LIBC_TRY_LINK_STATIC], -+[cat > conftest.c <&AS_MESSAGE_LOG_FD])], -+ [$2], [$3]) -+rm -f conftest*]) -diff -urpN glibc-2.15.orig/configure glibc-2.15/configure ---- glibc-2.15.orig/configure 2017-02-08 11:27:28.453657802 -0800 -+++ glibc-2.15/configure 2017-02-08 11:47:36.184360147 -0800 -@@ -6147,29 +6147,32 @@ $as_echo_n "checking for .preinit_array/ - if ${libc_cv_initfini_array+:} false; then : - $as_echo_n "(cached) " >&6 - else -- cat > conftest.c < conftest.c <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; } -- then -- if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then -- libc_cv_initfini_array=yes -- else -- libc_cv_initfini_array=no -- fi -+ test $ac_status = 0; }; }; then : -+ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then -+ libc_cv_initfini_array=yes - else - libc_cv_initfini_array=no - fi -- rm -f conftest* -+else -+ libc_cv_initfini_array=no -+fi -+rm -f conftest* -+ - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_initfini_array" >&5 - $as_echo "$libc_cv_initfini_array" >&6; } -@@ -6183,21 +6186,22 @@ if ${libc_cv_ctors_header+:} false; then - $as_echo_n "(cached) " >&6 - else - libc_cv_ctors_header=yes -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+ cat > conftest.c <&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then : - if $READELF -WS conftest$ac_exeext | $AWK ' - { gsub(/\[ */, "[") } - $2 == ".ctors" || $2 == ".dtors" { -@@ -6219,8 +6223,7 @@ else - as_fn_error $? "missing __attribute__ ((constructor)) support??" "$LINENO" 5 - - fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -+rm -f conftest* - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ctors_header" >&5 -diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in ---- glibc-2.15.orig/configure.in 2017-02-08 11:27:28.433657663 -0800 -+++ glibc-2.15/configure.in 2017-02-08 11:46:58.994915812 -0800 -@@ -1439,24 +1439,17 @@ EOF - - AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, - libc_cv_initfini_array, [dnl -- cat > conftest.c <&AS_MESSAGE_LOG_FD]) -- then -- if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then -- libc_cv_initfini_array=yes -- else -- libc_cv_initfini_array=no -- fi -+], -+ [if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then -+ libc_cv_initfini_array=yes - else - libc_cv_initfini_array=no -- fi -- rm -f conftest*]) -+ fi], -+ [libc_cv_initfini_array=no]) -+]) - if test $libc_cv_initfini_array != yes; then - AC_MSG_ERROR([Need linker with .init_array/.fini_array support.]) - fi -@@ -1464,9 +1457,9 @@ EOF - AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer, - libc_cv_ctors_header, [dnl - libc_cv_ctors_header=yes -- AC_TRY_LINK([], [ --__attribute__ ((constructor)) void ctor (void) { puts("ctor"); } --__attribute__ ((destructor)) void dtor (void) { puts("dtor"); } -+ LIBC_TRY_LINK_STATIC([ -+__attribute__ ((constructor)) void ctor (void) { asm (""); } -+__attribute__ ((destructor)) void dtor (void) { asm (""); } - ], - [dnl - AS_IF([$READELF -WS conftest$ac_exeext | $AWK ' diff --git a/patches/glibc/2.15/991-builtin_expect.patch b/patches/glibc/2.15/991-builtin_expect.patch deleted file mode 100644 index 8a327fa..0000000 --- a/patches/glibc/2.15/991-builtin_expect.patch +++ /dev/null @@ -1,82 +0,0 @@ -[As applied to 2.15] - -commit 3857022a761ea7251f8e5c0e45d382ebc3e34cf9 -Author: Ulrich Drepper -Date: Sun Jan 8 09:21:09 2012 -0500 - - No need for test for __builtin_expect - -diff -urpN glibc-2.15.orig/configure glibc-2.15/configure ---- glibc-2.15.orig/configure 2017-02-08 12:47:52.580858002 -0800 -+++ glibc-2.15/configure 2017-02-08 13:01:40.682870318 -0800 -@@ -7185,38 +7185,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; - fi - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 --$as_echo_n "checking for __builtin_expect... " >&6; } --if ${libc_cv_gcc_builtin_expect+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat > conftest.c <&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then -- libc_cv_gcc_builtin_expect=yes --else -- libc_cv_gcc_builtin_expect=no --fi --rm -f conftest* --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5 --$as_echo "$libc_cv_gcc_builtin_expect" >&6; } --if test "$libc_cv_gcc_builtin_expect" = no; then -- as_fn_error $? "support for __builtin_expect needed" "$LINENO" 5 --fi -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5 - $as_echo_n "checking for __builtin_memset... " >&6; } - if ${libc_cv_gcc_builtin_memset+:} false; then : -diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in ---- glibc-2.15.orig/configure.in 2017-02-08 12:47:52.580858002 -0800 -+++ glibc-2.15/configure.in 2017-02-08 13:01:17.638580410 -0800 -@@ -2098,28 +2098,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; - fi - fi - --dnl Check whether compiler understands __builtin_expect. --AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect, --[cat > conftest.c <&AS_MESSAGE_LOG_FD]); then -- libc_cv_gcc_builtin_expect=yes --else -- libc_cv_gcc_builtin_expect=no --fi --rm -f conftest*]) --if test "$libc_cv_gcc_builtin_expect" = no; then -- AC_MSG_ERROR([support for __builtin_expect needed]) --fi -- - AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl - cat > conftest.c <<\EOF - void zero (void *x) diff --git a/patches/glibc/2.15/992-gcc_s-suffix.patch b/patches/glibc/2.15/992-gcc_s-suffix.patch deleted file mode 100644 index 6dbc70f..0000000 --- a/patches/glibc/2.15/992-gcc_s-suffix.patch +++ /dev/null @@ -1,108 +0,0 @@ -[As applied to 2.15] -commit 3a533ca370725b68b516e6b74adf4727d17ed28a -Author: Joseph Myers -Date: Tue Apr 24 10:22:45 2012 +0000 - - Don't handle libgcc_s suffixes. - -diff -urpN glibc-2.15.orig/config.make.in glibc-2.15/config.make.in ---- glibc-2.15.orig/config.make.in 2017-02-08 13:24:23.338055977 -0800 -+++ glibc-2.15/config.make.in 2017-02-08 13:25:21.810625337 -0800 -@@ -50,7 +50,6 @@ have-z-execstack = @libc_cv_z_execstack@ - have-initfini = @libc_cv_have_initfini@ - have-Bgroup = @libc_cv_Bgroup@ - have-as-needed = @libc_cv_as_needed@ --libgcc_s_suffix = @libc_cv_libgcc_s_suffix@ - need-nopic-initfini = @nopic_initfini@ - with-fp = @with_fp@ - old-glibc-headers = @old_glibc_headers@ -diff -urpN glibc-2.15.orig/configure glibc-2.15/configure ---- glibc-2.15.orig/configure 2017-02-08 13:24:23.346056054 -0800 -+++ glibc-2.15/configure 2017-02-08 13:27:07.327670602 -0800 -@@ -654,7 +654,6 @@ libc_cv_z_execstack - libc_cv_z_combreloc - ASFLAGS_config - libc_cv_as_needed --libc_cv_libgcc_s_suffix - libc_cv_Bgroup - libc_cv_cc_with_libunwind - VERSIONING -@@ -6465,24 +6464,6 @@ fi - $as_echo "$libc_cv_Bgroup" >&6; } - - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcc_s suffix" >&5 --$as_echo_n "checking for libgcc_s suffix... " >&6; } --if ${libc_cv_libgcc_s_suffix+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat > conftest.c <&1 >/dev/null \ -- | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'` -- rm -f conftest* --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_libgcc_s_suffix" >&5 --$as_echo "$libc_cv_libgcc_s_suffix" >&6; } -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed option" >&5 - $as_echo_n "checking for --as-needed option... " >&6; } - if ${libc_cv_as_needed+:} false; then : -@@ -6493,7 +6474,7 @@ int main (void) { return 0; } - EOF - if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c -- -lgcc_s$libc_cv_libgcc_s_suffix -Wl,--as-needed -+ -lgcc_s -Wl,--as-needed - -nostdlib 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 -diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in ---- glibc-2.15.orig/configure.in 2017-02-08 13:24:23.346056054 -0800 -+++ glibc-2.15/configure.in 2017-02-08 13:26:44.383441535 -0800 -@@ -1639,20 +1639,6 @@ EOF - rm -f conftest*]) - AC_SUBST(libc_cv_Bgroup) - -- AC_CACHE_CHECK(for libgcc_s suffix, -- libc_cv_libgcc_s_suffix, [dnl -- cat > conftest.c <&1 >/dev/null \ -- | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'` --changequote([,])dnl -- rm -f conftest*]) -- AC_SUBST(libc_cv_libgcc_s_suffix) -- - AC_CACHE_CHECK(for --as-needed option, - libc_cv_as_needed, [dnl - cat > conftest.c <&AS_MESSAGE_LOG_FD]) - then - libc_cv_as_needed=yes -diff -urpN glibc-2.15.orig/Makeconfig glibc-2.15/Makeconfig ---- glibc-2.15.orig/Makeconfig 2017-02-08 13:24:23.338055977 -0800 -+++ glibc-2.15/Makeconfig 2017-02-08 13:24:31.262132679 -0800 -@@ -565,7 +565,7 @@ endif - ifneq ($(have-as-needed),yes) - libgcc_eh := -lgcc_eh $(libunwind) - else -- libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed -+ libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed - endif - gnulib := -lgcc $(libgcc_eh) - static-gnulib := -lgcc -lgcc_eh $(libunwind) diff --git a/patches/glibc/2.15/999-new-tools.patch b/patches/glibc/2.15/999-new-tools.patch deleted file mode 100644 index e0632a3..0000000 --- a/patches/glibc/2.15/999-new-tools.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -urpN glibc-2.15.orig/configure glibc-2.15/configure ---- glibc-2.15.orig/configure 2012-03-19 07:56:58.000000000 -0700 -+++ glibc-2.15/configure 2017-02-08 00:38:53.578049806 -0800 -@@ -4922,7 +4922,7 @@ $as_echo_n "checking version of $CC... " - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | [4-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -4985,7 +4985,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5112,7 +5112,7 @@ $as_echo_n "checking version of $MAKEINF - ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.*) -+ [4-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5172,7 +5172,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.15.orig/configure.in glibc-2.15/configure.in ---- glibc-2.15.orig/configure.in 2012-01-01 04:16:32.000000000 -0800 -+++ glibc-2.15/configure.in 2017-02-08 00:30:47.440841480 -0800 -@@ -1000,11 +1000,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], -@@ -1012,10 +1012,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg - MSGFMT=: aux_missing="$aux_missing msgfmt") - AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], -- [4.*], -+ [[4-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") - AC_CHECK_PROG_VER(SED, sed, --version, -- [GNU sed version \([0-9]*\.[0-9.]*\)], -+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") - diff --git a/patches/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.16.0/102-fix-signed-shift-overlow.patch b/patches/glibc/2.16.0/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.16.0/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.16.0/103-dl-openat64-variadic.patch b/patches/glibc/2.16.0/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.16.0/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.16.0/104-unused-variables.patch b/patches/glibc/2.16.0/104-unused-variables.patch deleted file mode 100644 index 2a85a0c..0000000 --- a/patches/glibc/2.16.0/104-unused-variables.patch +++ /dev/null @@ -1,157 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - float __cosf(float x) - { - float y[2],z=0.0; -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.16.0/105-misleading-indentation.patch b/patches/glibc/2.16.0/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.16.0/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.16.0/106-dl-open-array-bounds.patch b/patches/glibc/2.16.0/106-dl-open-array-bounds.patch deleted file mode 100644 index a8efe9a..0000000 --- a/patches/glibc/2.16.0/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index 3c34e01..0000000 --- a/patches/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.in -+++ b/configure.in -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.16.0/300-macos-cross-rpcgen.patch b/patches/glibc/2.16.0/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.16.0/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch b/patches/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch deleted file mode 100644 index 803ac6f..0000000 --- a/patches/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch +++ /dev/null @@ -1,222 +0,0 @@ -From 536ae0651b015b1f6140ec01775d4deaacf12c0c Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Mon, 21 Jan 2013 17:41:28 +0100 -Subject: [PATCH] Fix parsing of numeric hosts in gethostbyname_r - -Ported from master, fixes CVE-2015-0235. ---- - nss/Makefile | 2 - - nss/digits_dots.c | 73 +++++++++++++------------------------------------ - nss/getXXbyYY_r.c | 3 ++ - nss/test-digits-dots.c | 38 +++++++++++++++++++++++++ - 4 files changed, 62 insertions(+), 54 deletions(-) - create mode 100644 nss/test-digits-dots.c - ---- a/nss/Makefile -+++ b/nss/Makefile -@@ -38,7 +38,7 @@ install-bin := getent makedb - makedb-modules = xmalloc hash-string - extra-objs += $(makedb-modules:=.o) - --tests = test-netdb tst-nss-test1 -+tests = test-netdb tst-nss-test1 test-digits-dots - xtests = bug-erange - - include ../Makeconfig ---- a/nss/digits_dots.c -+++ b/nss/digits_dots.c -@@ -46,7 +46,10 @@ __nss_hostname_digits_dots (const char * - { - if (h_errnop) - *h_errnop = NETDB_INTERNAL; -- *result = NULL; -+ if (buffer_size == NULL) -+ *status = NSS_STATUS_TRYAGAIN; -+ else -+ *result = NULL; - return -1; - } - -@@ -83,14 +86,16 @@ __nss_hostname_digits_dots (const char * - } - - size_needed = (sizeof (*host_addr) -- + sizeof (*h_addr_ptrs) + strlen (name) + 1); -+ + sizeof (*h_addr_ptrs) -+ + sizeof (*h_alias_ptr) + strlen (name) + 1); - - if (buffer_size == NULL) - { - if (buflen < size_needed) - { -+ *status = NSS_STATUS_TRYAGAIN; - if (h_errnop != NULL) -- *h_errnop = TRY_AGAIN; -+ *h_errnop = NETDB_INTERNAL; - __set_errno (ERANGE); - goto done; - } -@@ -109,7 +114,7 @@ __nss_hostname_digits_dots (const char * - *buffer_size = 0; - __set_errno (save); - if (h_errnop != NULL) -- *h_errnop = TRY_AGAIN; -+ *h_errnop = NETDB_INTERNAL; - *result = NULL; - goto done; - } -@@ -149,7 +154,9 @@ __nss_hostname_digits_dots (const char * - if (! ok) - { - *h_errnop = HOST_NOT_FOUND; -- if (buffer_size) -+ if (buffer_size == NULL) -+ *status = NSS_STATUS_NOTFOUND; -+ else - *result = NULL; - goto done; - } -@@ -190,7 +197,7 @@ __nss_hostname_digits_dots (const char * - if (buffer_size == NULL) - *status = NSS_STATUS_SUCCESS; - else -- *result = resbuf; -+ *result = resbuf; - goto done; - } - -@@ -201,15 +208,6 @@ __nss_hostname_digits_dots (const char * - - if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':') - { -- const char *cp; -- char *hostname; -- typedef unsigned char host_addr_t[16]; -- host_addr_t *host_addr; -- typedef char *host_addr_list_t[2]; -- host_addr_list_t *h_addr_ptrs; -- size_t size_needed; -- int addr_size; -- - switch (af) - { - default: -@@ -225,7 +223,10 @@ __nss_hostname_digits_dots (const char * - /* This is not possible. We cannot represent an IPv6 address - in an `struct in_addr' variable. */ - *h_errnop = HOST_NOT_FOUND; -- *result = NULL; -+ if (buffer_size == NULL) -+ *status = NSS_STATUS_NOTFOUND; -+ else -+ *result = NULL; - goto done; - - case AF_INET6: -@@ -233,42 +234,6 @@ __nss_hostname_digits_dots (const char * - break; - } - -- size_needed = (sizeof (*host_addr) -- + sizeof (*h_addr_ptrs) + strlen (name) + 1); -- -- if (buffer_size == NULL && buflen < size_needed) -- { -- if (h_errnop != NULL) -- *h_errnop = TRY_AGAIN; -- __set_errno (ERANGE); -- goto done; -- } -- else if (buffer_size != NULL && *buffer_size < size_needed) -- { -- char *new_buf; -- *buffer_size = size_needed; -- new_buf = realloc (*buffer, *buffer_size); -- -- if (new_buf == NULL) -- { -- save = errno; -- free (*buffer); -- __set_errno (save); -- *buffer = NULL; -- *buffer_size = 0; -- *result = NULL; -- goto done; -- } -- *buffer = new_buf; -- } -- -- memset (*buffer, '\0', size_needed); -- -- host_addr = (host_addr_t *) *buffer; -- h_addr_ptrs = (host_addr_list_t *) -- ((char *) host_addr + sizeof (*host_addr)); -- hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs); -- - for (cp = name;; ++cp) - { - if (!*cp) -@@ -281,7 +246,9 @@ __nss_hostname_digits_dots (const char * - if (inet_pton (AF_INET6, name, host_addr) <= 0) - { - *h_errnop = HOST_NOT_FOUND; -- if (buffer_size) -+ if (buffer_size == NULL) -+ *status = NSS_STATUS_NOTFOUND; -+ else - *result = NULL; - goto done; - } ---- /dev/null -+++ b/nss/test-digits-dots.c -@@ -0,0 +1,38 @@ -+/* Copyright (C) 2013 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* Testcase for BZ #15014 */ -+ -+#include -+#include -+#include -+ -+static int -+do_test (void) -+{ -+ char buf[32]; -+ struct hostent *result = NULL; -+ struct hostent ret; -+ int h_err = 0; -+ int err; -+ -+ err = gethostbyname_r ("1.2.3.4", &ret, buf, sizeof (buf), &result, &h_err); -+ return err == ERANGE && h_err == NETDB_INTERNAL ? EXIT_SUCCESS : EXIT_FAILURE; -+} -+ -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" ---- a/nss/getXXbyYY_r.c -+++ b/nss/getXXbyYY_r.c -@@ -179,6 +179,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L - case -1: - return errno; - case 1: -+#ifdef NEED_H_ERRNO -+ any_service = true; -+#endif - goto done; - } - #endif diff --git a/patches/glibc/2.16.0/920-fix-rpc_parse-format.patch b/patches/glibc/2.16.0/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.16.0/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.16.0/940-nis-bogus-conditional.patch b/patches/glibc/2.16.0/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.16.0/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.16.0/999-new-tools.patch b/patches/glibc/2.16.0/999-new-tools.patch deleted file mode 100644 index e753365..0000000 --- a/patches/glibc/2.16.0/999-new-tools.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -urpN glibc-2.16.0.orig/configure glibc-2.16.0/configure ---- glibc-2.16.0.orig/configure 2012-06-30 12:12:34.000000000 -0700 -+++ glibc-2.16.0/configure 2017-02-08 00:39:03.778150878 -0800 -@@ -4845,7 +4845,7 @@ $as_echo_n "checking version of $MAKE... - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -5032,7 +5032,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 - $as_echo_n "checking version of $SED... " >&6; } -- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) -diff -urpN glibc-2.16.0.orig/configure.in glibc-2.16.0/configure.in ---- glibc-2.16.0.orig/configure.in 2012-06-30 12:12:34.000000000 -0700 -+++ glibc-2.16.0/configure.in 2017-02-08 00:14:07.996446792 -0800 -@@ -940,7 +940,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}g - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 59f95aa..0000000 --- a/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/patches/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.17/102-fix-signed-shift-overlow.patch b/patches/glibc/2.17/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.17/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.17/103-dl-openat64-variadic.patch b/patches/glibc/2.17/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.17/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.17/104-unused-variables.patch b/patches/glibc/2.17/104-unused-variables.patch deleted file mode 100644 index 80e0ff2..0000000 --- a/patches/glibc/2.17/104-unused-variables.patch +++ /dev/null @@ -1,157 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ - /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ - /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.17/105-misleading-indentation.patch b/patches/glibc/2.17/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.17/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.17/106-dl-open-array-bounds.patch b/patches/glibc/2.17/106-dl-open-array-bounds.patch deleted file mode 100644 index a8efe9a..0000000 --- a/patches/glibc/2.17/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.17/120-support-make4.patch b/patches/glibc/2.17/120-support-make4.patch deleted file mode 100644 index ca2bae0..0000000 --- a/patches/glibc/2.17/120-support-make4.patch +++ /dev/null @@ -1,38 +0,0 @@ -Original patch modified: Removed ChangeLog and NEWS sections, ajdust for configure.in -KS - -From: Marc-Antoine Perennou -Date: Thu, 31 Oct 2013 02:37:50 +0000 (+1000) -Subject: Accept make versions 4.0 and greater -X-Git-Tag: glibc-2.19~556 -X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=28d708c44bc47b56f6551ff285f78edcf61c208a;hp=a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd - -Accept make versions 4.0 and greater ---- - -diff --git a/configure b/configure -index f382138..5e61abd 100755 ---- a/configure -+++ b/configure -@@ -4761,7 +4761,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index 49b70fd..6da8efd 100644 ---- a/configure.in -+++ b/configure.in -@@ -984,7 +984,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/patches/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index 3c34e01..0000000 --- a/patches/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.in -+++ b/configure.in -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.17/300-macos-cross-rpcgen.patch b/patches/glibc/2.17/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.17/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.17/920-fix-rpc_parse-format.patch b/patches/glibc/2.17/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.17/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.17/940-nis-bogus-conditional.patch b/patches/glibc/2.17/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.17/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch b/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch deleted file mode 100644 index 40e3632..0000000 --- a/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit 4f2bcda964d4fff56855e0c66198c9bcb682ea1e -Author: Will Newton -Date: Thu Aug 29 20:10:26 2013 +0100 - - ARM: Fix clone code when built for Thumb. - - The mov lr, pc instruction will lose the Thumb bit from the return address - so use blx lr instead. - - ports/ChangeLog.arm: - - 2013-08-30 Will Newton - - [BZ #15909] - * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx - instead of mov lr, pc. - - (cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa) - -diff --git a/NEWS b/NEWS -index b023c30..f64fb82 100644 ---- a/NEWS -+++ b/NEWS -@@ -5,6 +5,12 @@ See the end for copying conditions. - Please send GNU C library bug reports via - using `glibc' in the "product" field. - -+Version 2.18.1 -+ -+* The following bugs are resolved with this release: -+ -+ 15909. -+ - Version 2.18 - - * The following bugs are resolved with this release: -diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm -index 1e7a35c..54debd7 100644 ---- a/ports/ChangeLog.arm -+++ b/ports/ChangeLog.arm -@@ -1,3 +1,9 @@ -+2013-08-30 Will Newton -+ -+ [BZ #15909] -+ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx -+ instead of mov lr, pc. -+ - 2013-07-03 Joseph Myers - - * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST): -diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S -index ce9c2a5..6e74fa7 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/clone.S -+++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S -@@ -93,8 +93,8 @@ PSEUDO_END (__clone) - mov lr, pc - bx ip - #else -- mov lr, pc -- ldr pc, [sp], #8 -+ ldr lr, [sp], #8 -+ blx lr - #endif - - @ and we are done, passing the return value through r0 diff --git a/patches/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.18/102-fix-signed-shift-overlow.patch b/patches/glibc/2.18/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.18/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.18/103-dl-openat64-variadic.patch b/patches/glibc/2.18/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.18/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.18/104-unused-variables.patch b/patches/glibc/2.18/104-unused-variables.patch deleted file mode 100644 index 642edb1..0000000 --- a/patches/glibc/2.18/104-unused-variables.patch +++ /dev/null @@ -1,157 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double diff --git a/patches/glibc/2.18/105-misleading-indentation.patch b/patches/glibc/2.18/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.18/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.18/106-dl-open-array-bounds.patch b/patches/glibc/2.18/106-dl-open-array-bounds.patch deleted file mode 100644 index 08a9076..0000000 --- a/patches/glibc/2.18/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -211,7 +211,7 @@ dl_open_worker (void *a) - struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); - - if (l) -- call_map = l; -+ call_map = l; - - if (args->nsid == __LM_ID_CALLER) - args->nsid = call_map->l_ns; -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch b/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch deleted file mode 100644 index 7ad9fdf..0000000 --- a/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch +++ /dev/null @@ -1,78 +0,0 @@ -commit 2770d15e7e880821fc586619c59eb45180628e16 -Author: Siddhesh Poyarekar -Date: Thu Oct 3 08:26:21 2013 +0530 - - Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal - - Fixes BZ #15996. - - The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead - of PTHREAD_MUTEX_ROBUST_NORMAL_NP. It has now been replaced by the - already existing convenience macro USE_REQUEUE_PI. - -diff --git a/NEWS b/NEWS -index f64fb82..fb6069d 100644 ---- a/NEWS -+++ b/NEWS -@@ -9,7 +9,7 @@ Version 2.18.1 - - * The following bugs are resolved with this release: - -- 15909. -+ 15909, 15996. - - Version 2.18 - -diff --git a/nptl/ChangeLog b/nptl/ChangeLog -index eae5079..2d78490 100644 ---- a/nptl/ChangeLog -+++ b/nptl/ChangeLog -@@ -1,3 +1,12 @@ -+2013-10-03 Siddhesh Poyarekar -+ -+ [BZ #15996] -+ * pthread_cond_broadcast.c (__pthread_cond_broadcast) -+ [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use -+ USE_REQUEUE_PI. -+ * pthread_cond_signal.c (__pthread_cond_signal) -+ [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise. -+ - 2013-07-23 David S. Miller - - * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment. -diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c -index 0702ec0..7ba9efa 100644 ---- a/nptl/pthread_cond_broadcast.c -+++ b/nptl/pthread_cond_broadcast.c -@@ -63,10 +63,7 @@ __pthread_cond_broadcast (cond) - - #if (defined lll_futex_cmp_requeue_pi \ - && defined __ASSUME_REQUEUE_PI) -- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; -- pi_flag &= mut->__data.__kind; -- -- if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP) -+ if (USE_REQUEUE_PI (mut)) - { - if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX, - &mut->__data.__lock, futex_val, -diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c -index 102d0b3..ffc35dc 100644 ---- a/nptl/pthread_cond_signal.c -+++ b/nptl/pthread_cond_signal.c -@@ -49,14 +49,9 @@ __pthread_cond_signal (cond) - - #if (defined lll_futex_cmp_requeue_pi \ - && defined __ASSUME_REQUEUE_PI) -- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; - pthread_mutex_t *mut = cond->__data.__mutex; - -- /* Do not use requeue for pshared condvars. */ -- if (mut != (void *) ~0l) -- pi_flag &= mut->__data.__kind; -- -- if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0) -+ if (USE_REQUEUE_PI (mut) - /* This can only really fail with a ENOSYS, since nobody can modify - futex while we have the cond_lock. */ - && lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0, diff --git a/patches/glibc/2.18/120-support-make4.patch b/patches/glibc/2.18/120-support-make4.patch deleted file mode 100644 index ca2bae0..0000000 --- a/patches/glibc/2.18/120-support-make4.patch +++ /dev/null @@ -1,38 +0,0 @@ -Original patch modified: Removed ChangeLog and NEWS sections, ajdust for configure.in -KS - -From: Marc-Antoine Perennou -Date: Thu, 31 Oct 2013 02:37:50 +0000 (+1000) -Subject: Accept make versions 4.0 and greater -X-Git-Tag: glibc-2.19~556 -X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=28d708c44bc47b56f6551ff285f78edcf61c208a;hp=a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd - -Accept make versions 4.0 and greater ---- - -diff --git a/configure b/configure -index f382138..5e61abd 100755 ---- a/configure -+++ b/configure -@@ -4761,7 +4761,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index 49b70fd..6da8efd 100644 ---- a/configure.in -+++ b/configure.in -@@ -984,7 +984,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/patches/glibc/2.18/130-arm-unwind.patch b/patches/glibc/2.18/130-arm-unwind.patch deleted file mode 100644 index 69cc07a..0000000 --- a/patches/glibc/2.18/130-arm-unwind.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -urN glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c ---- glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c 2016-09-15 02:30:09.199939478 +0300 -@@ -24,7 +24,7 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ---- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2016-09-15 02:29:07.096945862 +0300 -@@ -22,7 +22,7 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ---- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2016-09-15 02:29:37.352917115 +0300 -@@ -20,7 +20,7 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff -urN glibc-2.18.orig/sysdeps/gnu/unwind-resume.c glibc-2.18/sysdeps/gnu/unwind-resume.c ---- glibc-2.18.orig/sysdeps/gnu/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/sysdeps/gnu/unwind-resume.c 2016-09-15 02:29:53.376431503 +0300 -@@ -21,7 +21,7 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); diff --git a/patches/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index 3c34e01..0000000 --- a/patches/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.in -+++ b/configure.in -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.18/300-macos-cross-rpcgen.patch b/patches/glibc/2.18/300-macos-cross-rpcgen.patch deleted file mode 100644 index e654644..0000000 --- a/patches/glibc/2.18/300-macos-cross-rpcgen.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ae7080d30c68cfa0c81ce3422dca948f64a94f50 -Author: Jia Liu -Date: Sat Sep 7 00:01:08 2013 +0800 - - sunrpc/rpc/types.h: fix OS X and FreeBSD build problems - - When I build arm-linux-gcc on OS X, I find glibc will get a build error - in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK. - For FreeBSD, Add __FreeBSD__ to make it build OK, too. - - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html - URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html - Signed-off-by: Jia Liu - Signed-off-by: Mike Frysinger - -diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h -index 3dca5c4..beded52 100644 ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t; - #include - #endif - -+#if defined __APPLE_CC__ || defined __FreeBSD__ -+# define __u_char_defined -+# define __daddr_t_defined -+#endif -+ - #ifndef __u_char_defined - typedef __u_char u_char; - typedef __u_short u_short; diff --git a/patches/glibc/2.18/920-fix-rpc_parse-format.patch b/patches/glibc/2.18/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.18/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.18/940-nis-bogus-conditional.patch b/patches/glibc/2.18/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.18/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.19/102-fix-signed-shift-overlow.patch b/patches/glibc/2.19/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.19/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.19/103-dl-openat64-variadic.patch b/patches/glibc/2.19/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.19/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.19/104-unused-variables.patch b/patches/glibc/2.19/104-unused-variables.patch deleted file mode 100644 index 889c9bb..0000000 --- a/patches/glibc/2.19/104-unused-variables.patch +++ /dev/null @@ -1,178 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double -diff --git a/timezone/private.h b/timezone/private.h -index 4e8f4ae..ed19e06 100644 ---- a/timezone/private.h -+++ b/timezone/private.h -@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); - #define TYPE_SIGNED(type) (((type) -1) < 0) - #endif /* !defined TYPE_SIGNED */ - --/* The minimum and maximum finite time values. */ --static time_t const time_t_min = -- (TYPE_SIGNED(time_t) -- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) -- : 0); --static time_t const time_t_max = -- (TYPE_SIGNED(time_t) -- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) -- : -1); -- - #ifndef INT_STRLEN_MAXIMUM - /* - ** 302 / 1000 is log10(2.0) rounded up. diff --git a/patches/glibc/2.19/105-misleading-indentation.patch b/patches/glibc/2.19/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.19/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.19/106-dl-open-array-bounds.patch b/patches/glibc/2.19/106-dl-open-array-bounds.patch deleted file mode 100644 index 08a9076..0000000 --- a/patches/glibc/2.19/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -211,7 +211,7 @@ dl_open_worker (void *a) - struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); - - if (l) -- call_map = l; -+ call_map = l; - - if (args->nsid == __LM_ID_CALLER) - args->nsid = call_map->l_ns; -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.19/130-arm-unwind.patch b/patches/glibc/2.19/130-arm-unwind.patch deleted file mode 100644 index 69cc07a..0000000 --- a/patches/glibc/2.19/130-arm-unwind.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -urN glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c ---- glibc-2.18.orig/nptl/sysdeps/pthread/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/nptl/sysdeps/pthread/unwind-forcedunwind.c 2016-09-15 02:30:09.199939478 +0300 -@@ -24,7 +24,7 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ---- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c 2016-09-15 02:29:07.096945862 +0300 -@@ -22,7 +22,7 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff -urN glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ---- glibc-2.18.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c 2016-09-15 02:29:37.352917115 +0300 -@@ -20,7 +20,7 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff -urN glibc-2.18.orig/sysdeps/gnu/unwind-resume.c glibc-2.18/sysdeps/gnu/unwind-resume.c ---- glibc-2.18.orig/sysdeps/gnu/unwind-resume.c 2013-08-11 02:52:55.000000000 +0400 -+++ glibc-2.18/sysdeps/gnu/unwind-resume.c 2016-09-15 02:29:53.376431503 +0300 -@@ -21,7 +21,7 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); diff --git a/patches/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.19/910-typedef-caddr.patch b/patches/glibc/2.19/910-typedef-caddr.patch deleted file mode 100644 index e29e810..0000000 --- a/patches/glibc/2.19/910-typedef-caddr.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h ---- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 -@@ -114,7 +114,10 @@ - #ifdef __USE_BSD - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif -diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h ---- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 -+++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 -@@ -80,7 +80,10 @@ - #endif - #ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - #endif - diff --git a/patches/glibc/2.19/920-fix-rpc_parse-format.patch b/patches/glibc/2.19/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.19/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.19/930-explicit-boolean.patch b/patches/glibc/2.19/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/2.19/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/2.19/940-nis-bogus-conditional.patch b/patches/glibc/2.19/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.19/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.20/100-sparc-nptl.patch b/patches/glibc/2.20/100-sparc-nptl.patch deleted file mode 100644 index 21f0337..0000000 --- a/patches/glibc/2.20/100-sparc-nptl.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/sysdeps/sparc/sparc32/sem_trywait.c b/sysdeps/sparc/sparc32/sem_trywait.c -index 7d0fc55..ad9b4ad 100644 ---- a/sysdeps/sparc/sparc32/sem_trywait.c -+++ b/sysdeps/sparc/sparc32/sem_trywait.c -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #include - - - diff --git a/patches/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.20/102-fix-signed-shift-overlow.patch b/patches/glibc/2.20/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.20/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.20/103-dl-openat64-variadic.patch b/patches/glibc/2.20/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.20/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.20/104-unused-variables.patch b/patches/glibc/2.20/104-unused-variables.patch deleted file mode 100644 index 889c9bb..0000000 --- a/patches/glibc/2.20/104-unused-variables.patch +++ /dev/null @@ -1,178 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double -diff --git a/timezone/private.h b/timezone/private.h -index 4e8f4ae..ed19e06 100644 ---- a/timezone/private.h -+++ b/timezone/private.h -@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); - #define TYPE_SIGNED(type) (((type) -1) < 0) - #endif /* !defined TYPE_SIGNED */ - --/* The minimum and maximum finite time values. */ --static time_t const time_t_min = -- (TYPE_SIGNED(time_t) -- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) -- : 0); --static time_t const time_t_max = -- (TYPE_SIGNED(time_t) -- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) -- : -1); -- - #ifndef INT_STRLEN_MAXIMUM - /* - ** 302 / 1000 is log10(2.0) rounded up. diff --git a/patches/glibc/2.20/105-misleading-indentation.patch b/patches/glibc/2.20/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.20/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.20/106-dl-open-array-bounds.patch b/patches/glibc/2.20/106-dl-open-array-bounds.patch deleted file mode 100644 index 08a9076..0000000 --- a/patches/glibc/2.20/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -211,7 +211,7 @@ dl_open_worker (void *a) - struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); - - if (l) -- call_map = l; -+ call_map = l; - - if (args->nsid == __LM_ID_CALLER) - args->nsid = call_map->l_ns; -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.20/910-typedef-caddr.patch b/patches/glibc/2.20/910-typedef-caddr.patch deleted file mode 100644 index fc7979b..0000000 --- a/patches/glibc/2.20/910-typedef-caddr.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h ---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 -+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif - diff --git a/patches/glibc/2.20/920-fix-rpc_parse-format.patch b/patches/glibc/2.20/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.20/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.20/930-explicit-boolean.patch b/patches/glibc/2.20/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/2.20/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/2.20/940-nis-bogus-conditional.patch b/patches/glibc/2.20/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.20/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.21/102-fix-signed-shift-overlow.patch b/patches/glibc/2.21/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.21/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.21/103-dl-openat64-variadic.patch b/patches/glibc/2.21/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/2.21/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/2.21/104-unused-variables.patch b/patches/glibc/2.21/104-unused-variables.patch deleted file mode 100644 index fd4def0..0000000 --- a/patches/glibc/2.21/104-unused-variables.patch +++ /dev/null @@ -1,178 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - DIAG_POP_NEEDS_COMMENT; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = LDBL_MAX; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double -diff --git a/timezone/private.h b/timezone/private.h -index 4e8f4ae..ed19e06 100644 ---- a/timezone/private.h -+++ b/timezone/private.h -@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); - #define TYPE_SIGNED(type) (((type) -1) < 0) - #endif /* !defined TYPE_SIGNED */ - --/* The minimum and maximum finite time values. */ --static time_t const time_t_min = -- (TYPE_SIGNED(time_t) -- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) -- : 0); --static time_t const time_t_max = -- (TYPE_SIGNED(time_t) -- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) -- : -1); -- - #ifndef INT_STRLEN_MAXIMUM - /* - ** 302 / 1000 is log10(2.0) rounded up. diff --git a/patches/glibc/2.21/105-misleading-indentation.patch b/patches/glibc/2.21/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.21/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.21/106-dl-open-array-bounds.patch b/patches/glibc/2.21/106-dl-open-array-bounds.patch deleted file mode 100644 index 08a9076..0000000 --- a/patches/glibc/2.21/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -211,7 +211,7 @@ dl_open_worker (void *a) - struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); - - if (l) -- call_map = l; -+ call_map = l; - - if (args->nsid == __LM_ID_CALLER) - args->nsid = call_map->l_ns; -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.21/910-typedef-caddr.patch b/patches/glibc/2.21/910-typedef-caddr.patch deleted file mode 100644 index fc7979b..0000000 --- a/patches/glibc/2.21/910-typedef-caddr.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h ---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 -+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif - diff --git a/patches/glibc/2.21/920-fix-rpc_parse-format.patch b/patches/glibc/2.21/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.21/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.21/930-explicit-boolean.patch b/patches/glibc/2.21/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/2.21/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/2.21/940-nis-bogus-conditional.patch b/patches/glibc/2.21/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.21/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.21/950-dlclose-assert.patch b/patches/glibc/2.21/950-dlclose-assert.patch deleted file mode 100644 index 6e2fcff..0000000 --- a/patches/glibc/2.21/950-dlclose-assert.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 2bd2cad9e8a410643e80efa0b15f6f2882e1271b -Author: Roland McGrath -Date: Fri Apr 17 14:29:40 2015 -0700 - - Avoid confusing compiler with dynamically impossible statically invalid dereference in _dl_close_worker. - -diff --git a/elf/dl-close.c b/elf/dl-close.c -index cf8f9e0465..412f71d70b 100644 ---- a/elf/dl-close.c -+++ b/elf/dl-close.c -@@ -641,9 +641,16 @@ _dl_close_worker (struct link_map *map) - DL_UNMAP (imap); - - /* Finally, unlink the data structure and free it. */ -- if (imap->l_prev != NULL) -- imap->l_prev->l_next = imap->l_next; -- else -+#if DL_NNS == 1 -+ /* The assert in the (imap->l_prev == NULL) case gives -+ the compiler license to warn that NS points outside -+ the dl_ns array bounds in that case (as nsid != LM_ID_BASE -+ is tantamount to nsid >= DL_NNS). That should be impossible -+ in this configuration, so just assert about it instead. */ -+ assert (nsid == LM_ID_BASE); -+ assert (imap->l_prev != NULL); -+#else -+ if (imap->l_prev == NULL) - { - assert (nsid != LM_ID_BASE); - ns->_ns_loaded = imap->l_next; -@@ -652,6 +659,9 @@ _dl_close_worker (struct link_map *map) - we leave for debuggers to examine. */ - r->r_map = (void *) ns->_ns_loaded; - } -+ else -+#endif -+ imap->l_prev->l_next = imap->l_next; - - --ns->_ns_nloaded; - if (imap->l_next != NULL) diff --git a/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch b/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch deleted file mode 100644 index b481046..0000000 --- a/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit 3f512ca79fda7854da188df0585e71467119206e -Author: Brett Neumeier -Date: Mon Aug 31 15:27:21 2015 -0700 - - Fix non-v9 32-bit sparc build. - - [BZ #18870] - * sysdeps/sparc/sparc32/sem_open.c: Add missing #include - -diff --git a/sysdeps/sparc/sparc32/sem_open.c b/sysdeps/sparc/sparc32/sem_open.c -index 16cb9ad..59df2d7 100644 ---- a/sysdeps/sparc/sparc32/sem_open.c -+++ b/sysdeps/sparc/sparc32/sem_open.c -@@ -29,6 +29,7 @@ - #include - #include - #include "semaphoreP.h" -+#include - #include - - diff --git a/patches/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.22/102-fix-signed-shift-overlow.patch b/patches/glibc/2.22/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/2.22/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/2.22/103-dl-openat64-variadic.patch b/patches/glibc/2.22/103-dl-openat64-variadic.patch deleted file mode 100644 index 302088e..0000000 --- a/patches/glibc/2.22/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert (!__OPEN_NEEDS_MODE (oflag)); - diff --git a/patches/glibc/2.22/104-unused-variables.patch b/patches/glibc/2.22/104-unused-variables.patch deleted file mode 100644 index fd4def0..0000000 --- a/patches/glibc/2.22/104-unused-variables.patch +++ /dev/null @@ -1,178 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - DIAG_POP_NEEDS_COMMENT; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = LDBL_MAX; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double -diff --git a/timezone/private.h b/timezone/private.h -index 4e8f4ae..ed19e06 100644 ---- a/timezone/private.h -+++ b/timezone/private.h -@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); - #define TYPE_SIGNED(type) (((type) -1) < 0) - #endif /* !defined TYPE_SIGNED */ - --/* The minimum and maximum finite time values. */ --static time_t const time_t_min = -- (TYPE_SIGNED(time_t) -- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) -- : 0); --static time_t const time_t_max = -- (TYPE_SIGNED(time_t) -- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) -- : -1); -- - #ifndef INT_STRLEN_MAXIMUM - /* - ** 302 / 1000 is log10(2.0) rounded up. diff --git a/patches/glibc/2.22/105-misleading-indentation.patch b/patches/glibc/2.22/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/2.22/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch b/patches/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch deleted file mode 100644 index 257c5f2..0000000 --- a/patches/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch +++ /dev/null @@ -1,551 +0,0 @@ -diff -ruN glibc-2.22.orig/resolv/nss_dns/dns-host.c glibc-2.22/resolv/nss_dns/dns-host.c ---- glibc-2.22.orig/resolv/nss_dns/dns-host.c 2015-08-04 23:42:21.000000000 -0700 -+++ glibc-2.22/resolv/nss_dns/dns-host.c 2016-02-16 13:38:38.000000000 -0800 -@@ -1031,7 +1031,10 @@ - int h_namelen = 0; - - if (ancount == 0) -- return NSS_STATUS_NOTFOUND; -+ { -+ *h_errnop = HOST_NOT_FOUND; -+ return NSS_STATUS_NOTFOUND; -+ } - - while (ancount-- > 0 && cp < end_of_message && had_error == 0) - { -@@ -1208,7 +1211,14 @@ - /* Special case here: if the resolver sent a result but it only - contains a CNAME while we are looking for a T_A or T_AAAA record, - we fail with NOTFOUND instead of TRYAGAIN. */ -- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND; -+ if (canon != NULL) -+ { -+ *h_errnop = HOST_NOT_FOUND; -+ return NSS_STATUS_NOTFOUND; -+ } -+ -+ *h_errnop = NETDB_INTERNAL; -+ return NSS_STATUS_TRYAGAIN; - } - - -@@ -1222,11 +1232,101 @@ - - enum nss_status status = NSS_STATUS_NOTFOUND; - -+ /* Combining the NSS status of two distinct queries requires some -+ compromise and attention to symmetry (A or AAAA queries can be -+ returned in any order). What follows is a breakdown of how this -+ code is expected to work and why. We discuss only SUCCESS, -+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns -+ that apply (though RETURN and MERGE exist). We make a distinction -+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable). -+ A recoverable TRYAGAIN is almost always due to buffer size issues -+ and returns ERANGE in errno and the caller is expected to retry -+ with a larger buffer. -+ -+ Lastly, you may be tempted to make significant changes to the -+ conditions in this code to bring about symmetry between responses. -+ Please don't change anything without due consideration for -+ expected application behaviour. Some of the synthesized responses -+ aren't very well thought out and sometimes appear to imply that -+ IPv4 responses are always answer 1, and IPv6 responses are always -+ answer 2, but that's not true (see the implemetnation of send_dg -+ and send_vc to see response can arrive in any order, particlarly -+ for UDP). However, we expect it holds roughly enough of the time -+ that this code works, but certainly needs to be fixed to make this -+ a more robust implementation. -+ -+ ---------------------------------------------- -+ | Answer 1 Status / | Synthesized | Reason | -+ | Answer 2 Status | Status | | -+ |--------------------------------------------| -+ | SUCCESS/SUCCESS | SUCCESS | [1] | -+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] | -+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] | -+ | SUCCESS/NOTFOUND | SUCCESS | [1] | -+ | SUCCESS/UNAVAIL | SUCCESS | [1] | -+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] | -+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] | -+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] | -+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] | -+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] | -+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] | -+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] | -+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] | -+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] | -+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] | -+ | NOTFOUND/SUCCESS | SUCCESS | [3] | -+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] | -+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] | -+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] | -+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] | -+ | UNAVAIL/SUCCESS | UNAVAIL | [4] | -+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] | -+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] | -+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] | -+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] | -+ ---------------------------------------------- -+ -+ [1] If the first response is a success we return success. -+ This ignores the state of the second answer and in fact -+ incorrectly sets errno and h_errno to that of the second -+ answer. However because the response is a success we ignore -+ *errnop and *h_errnop (though that means you touched errno on -+ success). We are being conservative here and returning the -+ likely IPv4 response in the first answer as a success. -+ -+ [2] If the first response is a recoverable TRYAGAIN we return -+ that instead of looking at the second response. The -+ expectation here is that we have failed to get an IPv4 response -+ and should retry both queries. -+ -+ [3] If the first response was not a SUCCESS and the second -+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN, -+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the -+ result from the second response, otherwise the first responses -+ status is used. Again we have some odd side-effects when the -+ second response is NOTFOUND because we overwrite *errnop and -+ *h_errnop that means that a first answer of NOTFOUND might see -+ its *errnop and *h_errnop values altered. Whether it matters -+ in practice that a first response NOTFOUND has the wrong -+ *errnop and *h_errnop is undecided. -+ -+ [4] If the first response is UNAVAIL we return that instead of -+ looking at the second response. The expectation here is that -+ it will have failed similarly e.g. configuration failure. -+ -+ [5] Testing this code is complicated by the fact that truncated -+ second response buffers might be returned as SUCCESS if the -+ first answer is a SUCCESS. To fix this we add symmetry to -+ TRYAGAIN with the second response. If the second response -+ is a recoverable error we now return TRYAGIN even if the first -+ response was SUCCESS. */ -+ - if (anslen1 > 0) - status = gaih_getanswer_slice(answer1, anslen1, qname, - &pat, &buffer, &buflen, - errnop, h_errnop, ttlp, - &first); -+ - if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND - || (status == NSS_STATUS_TRYAGAIN - /* We want to look at the second answer in case of an -@@ -1242,8 +1342,15 @@ - &pat, &buffer, &buflen, - errnop, h_errnop, ttlp, - &first); -+ /* Use the second response status in some cases. */ - if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND) - status = status2; -+ /* Do not return a truncated second response (unless it was -+ unavoidable e.g. unrecoverable TRYAGAIN). */ -+ if (status == NSS_STATUS_SUCCESS -+ && (status2 == NSS_STATUS_TRYAGAIN -+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY)) -+ status = NSS_STATUS_TRYAGAIN; - } - - return status; -diff -ruN glibc-2.22.orig/resolv/res_query.c glibc-2.22/resolv/res_query.c ---- glibc-2.22.orig/resolv/res_query.c 2015-08-04 23:42:21.000000000 -0700 -+++ glibc-2.22/resolv/res_query.c 2016-02-16 13:38:38.000000000 -0800 -@@ -396,6 +396,7 @@ - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - } -@@ -447,6 +448,7 @@ - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - -@@ -521,6 +523,7 @@ - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - if (saved_herrno != -1) -diff -ruN glibc-2.22.orig/resolv/res_send.c glibc-2.22/resolv/res_send.c ---- glibc-2.22.orig/resolv/res_send.c 2015-08-04 23:42:21.000000000 -0700 -+++ glibc-2.22/resolv/res_send.c 2016-02-16 13:43:59.000000000 -0800 -@@ -1,3 +1,20 @@ -+/* Copyright (C) 2016 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ - /* - * Copyright (c) 1985, 1989, 1993 - * The Regents of the University of California. All rights reserved. -@@ -363,6 +380,8 @@ - #ifdef USE_HOOKS - if (__glibc_unlikely (statp->qhook || statp->rhook)) { - if (anssiz < MAXPACKET && ansp) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *buf = malloc (MAXPACKET); - if (buf == NULL) - return (-1); -@@ -638,6 +657,77 @@ - return (struct sockaddr *) (void *) &statp->nsaddr_list[n]; - } - -+/* The send_vc function is responsible for sending a DNS query over TCP -+ to the nameserver numbered NS from the res_state STATP i.e. -+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and -+ IPv6 queries at the same serially on the same socket. -+ -+ Please note that for TCP there is no way to disable sending both -+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP -+ and sends the queries serially and waits for the result after each -+ sent query. This implemetnation should be corrected to honour these -+ options. -+ -+ Please also note that for TCP we send both queries over the same -+ socket one after another. This technically violates best practice -+ since the server is allowed to read the first query, respond, and -+ then close the socket (to service another client). If the server -+ does this, then the remaining second query in the socket data buffer -+ will cause the server to send the client an RST which will arrive -+ asynchronously and the client's OS will likely tear down the socket -+ receive buffer resulting in a potentially short read and lost -+ response data. This will force the client to retry the query again, -+ and this process may repeat until all servers and connection resets -+ are exhausted and then the query will fail. It's not known if this -+ happens with any frequency in real DNS server implementations. This -+ implementation should be corrected to use two sockets by default for -+ parallel queries. -+ -+ The query stored in BUF of BUFLEN length is sent first followed by -+ the query stored in BUF2 of BUFLEN2 length. Queries are sent -+ serially on the same socket. -+ -+ Answers to the query are stored firstly in *ANSP up to a max of -+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP -+ is non-NULL (to indicate that modifying the answer buffer is allowed) -+ then malloc is used to allocate a new response buffer and ANSCP and -+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes -+ are needed but ANSCP is NULL, then as much of the response as -+ possible is read into the buffer, but the results will be truncated. -+ When truncation happens because of a small answer buffer the DNS -+ packets header feild TC will bet set to 1, indicating a truncated -+ message and the rest of the socket data will be read and discarded. -+ -+ Answers to the query are stored secondly in *ANSP2 up to a max of -+ *ANSSIZP2 bytes, with the actual response length stored in -+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 -+ is non-NULL (required for a second query) then malloc is used to -+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer -+ size and *ANSP2_MALLOCED is set to 1. -+ -+ The ANSP2_MALLOCED argument will eventually be removed as the -+ change in buffer pointer can be used to detect the buffer has -+ changed and that the caller should use free on the new buffer. -+ -+ Note that the answers may arrive in any order from the server and -+ therefore the first and second answer buffers may not correspond to -+ the first and second queries. -+ -+ It is not supported to call this function with a non-NULL ANSP2 -+ but a NULL ANSCP. Put another way, you can call send_vc with a -+ single unmodifiable buffer or two modifiable buffers, but no other -+ combination is supported. -+ -+ It is the caller's responsibility to free the malloc allocated -+ buffers by detecting that the pointers have changed from their -+ original values i.e. *ANSCP or *ANSP2 has changed. -+ -+ If errors are encountered then *TERRNO is set to an appropriate -+ errno value and a zero result is returned for a recoverable error, -+ and a less-than zero result is returned for a non-recoverable error. -+ -+ If no errors are encountered then *TERRNO is left unmodified and -+ a the length of the first response in bytes is returned. */ - static int - send_vc(res_state statp, - const u_char *buf, int buflen, const u_char *buf2, int buflen2, -@@ -647,11 +737,7 @@ - { - const HEADER *hp = (HEADER *) buf; - const HEADER *hp2 = (HEADER *) buf2; -- u_char *ans = *ansp; -- int orig_anssizp = *anssizp; -- // XXX REMOVE -- // int anssiz = *anssizp; -- HEADER *anhp = (HEADER *) ans; -+ HEADER *anhp = (HEADER *) *ansp; - struct sockaddr *nsap = get_nsaddr (statp, ns); - int truncating, connreset, n; - /* On some architectures compiler might emit a warning indicating -@@ -743,6 +829,8 @@ - * Receive length & response - */ - int recvresp1 = 0; -+ /* Skip the second response if there is no second query. -+ To do that we mark the second response as received. */ - int recvresp2 = buf2 == NULL; - uint16_t rlen16; - read_len: -@@ -779,40 +867,14 @@ - u_char **thisansp; - int *thisresplenp; - if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { -+ /* We have not received any responses -+ yet or we only have one response to -+ receive. */ - thisanssizp = anssizp; - thisansp = anscp ?: ansp; - assert (anscp != NULL || ansp2 == NULL); - thisresplenp = &resplen; - } else { -- if (*anssizp != MAXPACKET) { -- /* No buffer allocated for the first -- reply. We can try to use the rest -- of the user-provided buffer. */ --#if __GNUC_PREREQ (4, 7) -- DIAG_PUSH_NEEDS_COMMENT; -- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); --#endif --#if _STRING_ARCH_unaligned -- *anssizp2 = orig_anssizp - resplen; -- *ansp2 = *ansp + resplen; --#else -- int aligned_resplen -- = ((resplen + __alignof__ (HEADER) - 1) -- & ~(__alignof__ (HEADER) - 1)); -- *anssizp2 = orig_anssizp - aligned_resplen; -- *ansp2 = *ansp + aligned_resplen; --#endif --#if __GNUC_PREREQ (4, 7) -- DIAG_POP_NEEDS_COMMENT; --#endif -- } else { -- /* The first reply did not fit into the -- user-provided buffer. Maybe the second -- answer will. */ -- *anssizp2 = orig_anssizp; -- *ansp2 = *ansp; -- } -- - thisanssizp = anssizp2; - thisansp = ansp2; - thisresplenp = resplen2; -@@ -820,10 +882,14 @@ - anhp = (HEADER *) *thisansp; - - *thisresplenp = rlen; -- if (rlen > *thisanssizp) { -- /* Yes, we test ANSCP here. If we have two buffers -- both will be allocatable. */ -- if (__glibc_likely (anscp != NULL)) { -+ /* Is the answer buffer too small? */ -+ if (*thisanssizp < rlen) { -+ /* If the current buffer is not the the static -+ user-supplied buffer then we can reallocate -+ it. */ -+ if (thisansp != NULL && thisansp != ansp) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *newp = malloc (MAXPACKET); - if (newp == NULL) { - *terrno = ENOMEM; -@@ -835,6 +901,9 @@ - if (thisansp == ansp2) - *ansp2_malloced = 1; - anhp = (HEADER *) newp; -+ /* A uint16_t can't be larger than MAXPACKET -+ thus it's safe to allocate MAXPACKET but -+ read RLEN bytes instead. */ - len = rlen; - } else { - Dprint(statp->options & RES_DEBUG, -@@ -997,6 +1066,66 @@ - return 1; - } - -+/* The send_dg function is responsible for sending a DNS query over UDP -+ to the nameserver numbered NS from the res_state STATP i.e. -+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries -+ along with the ability to send the query in parallel for both stacks -+ (default) or serially (RES_SINGLKUP). It also supports serial lookup -+ with a close and reopen of the socket used to talk to the server -+ (RES_SNGLKUPREOP) to work around broken name servers. -+ -+ The query stored in BUF of BUFLEN length is sent first followed by -+ the query stored in BUF2 of BUFLEN2 length. Queries are sent -+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP). -+ -+ Answers to the query are stored firstly in *ANSP up to a max of -+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP -+ is non-NULL (to indicate that modifying the answer buffer is allowed) -+ then malloc is used to allocate a new response buffer and ANSCP and -+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes -+ are needed but ANSCP is NULL, then as much of the response as -+ possible is read into the buffer, but the results will be truncated. -+ When truncation happens because of a small answer buffer the DNS -+ packets header feild TC will bet set to 1, indicating a truncated -+ message, while the rest of the UDP packet is discarded. -+ -+ Answers to the query are stored secondly in *ANSP2 up to a max of -+ *ANSSIZP2 bytes, with the actual response length stored in -+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 -+ is non-NULL (required for a second query) then malloc is used to -+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer -+ size and *ANSP2_MALLOCED is set to 1. -+ -+ The ANSP2_MALLOCED argument will eventually be removed as the -+ change in buffer pointer can be used to detect the buffer has -+ changed and that the caller should use free on the new buffer. -+ -+ Note that the answers may arrive in any order from the server and -+ therefore the first and second answer buffers may not correspond to -+ the first and second queries. -+ -+ It is not supported to call this function with a non-NULL ANSP2 -+ but a NULL ANSCP. Put another way, you can call send_vc with a -+ single unmodifiable buffer or two modifiable buffers, but no other -+ combination is supported. -+ -+ It is the caller's responsibility to free the malloc allocated -+ buffers by detecting that the pointers have changed from their -+ original values i.e. *ANSCP or *ANSP2 has changed. -+ -+ If an answer is truncated because of UDP datagram DNS limits then -+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to -+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1 -+ if any progress was made reading a response from the nameserver and -+ is used by the caller to distinguish between ECONNREFUSED and -+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1). -+ -+ If errors are encountered then *TERRNO is set to an appropriate -+ errno value and a zero result is returned for a recoverable error, -+ and a less-than zero result is returned for a non-recoverable error. -+ -+ If no errors are encountered then *TERRNO is left unmodified and -+ a the length of the first response in bytes is returned. */ - static int - send_dg(res_state statp, - const u_char *buf, int buflen, const u_char *buf2, int buflen2, -@@ -1006,8 +1135,6 @@ - { - const HEADER *hp = (HEADER *) buf; - const HEADER *hp2 = (HEADER *) buf2; -- u_char *ans = *ansp; -- int orig_anssizp = *anssizp; - struct timespec now, timeout, finish; - struct pollfd pfd[1]; - int ptimeout; -@@ -1040,6 +1167,8 @@ - int need_recompute = 0; - int nwritten = 0; - int recvresp1 = 0; -+ /* Skip the second response if there is no second query. -+ To do that we mark the second response as received. */ - int recvresp2 = buf2 == NULL; - pfd[0].fd = EXT(statp).nssocks[ns]; - pfd[0].events = POLLOUT; -@@ -1203,55 +1332,56 @@ - int *thisresplenp; - - if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { -+ /* We have not received any responses -+ yet or we only have one response to -+ receive. */ - thisanssizp = anssizp; - thisansp = anscp ?: ansp; - assert (anscp != NULL || ansp2 == NULL); - thisresplenp = &resplen; - } else { -- if (*anssizp != MAXPACKET) { -- /* No buffer allocated for the first -- reply. We can try to use the rest -- of the user-provided buffer. */ --#if _STRING_ARCH_unaligned -- *anssizp2 = orig_anssizp - resplen; -- *ansp2 = *ansp + resplen; --#else -- int aligned_resplen -- = ((resplen + __alignof__ (HEADER) - 1) -- & ~(__alignof__ (HEADER) - 1)); -- *anssizp2 = orig_anssizp - aligned_resplen; -- *ansp2 = *ansp + aligned_resplen; --#endif -- } else { -- /* The first reply did not fit into the -- user-provided buffer. Maybe the second -- answer will. */ -- *anssizp2 = orig_anssizp; -- *ansp2 = *ansp; -- } -- - thisanssizp = anssizp2; - thisansp = ansp2; - thisresplenp = resplen2; - } - - if (*thisanssizp < MAXPACKET -- /* Yes, we test ANSCP here. If we have two buffers -- both will be allocatable. */ -- && anscp -+ /* If the current buffer is not the the static -+ user-supplied buffer then we can reallocate -+ it. */ -+ && (thisansp != NULL && thisansp != ansp) - #ifdef FIONREAD -+ /* Is the size too small? */ - && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 - || *thisanssizp < *thisresplenp) - #endif - ) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *newp = malloc (MAXPACKET); - if (newp != NULL) { -- *anssizp = MAXPACKET; -- *thisansp = ans = newp; -+ *thisanssizp = MAXPACKET; -+ *thisansp = newp; - if (thisansp == ansp2) - *ansp2_malloced = 1; - } - } -+ /* We could end up with truncation if anscp was NULL -+ (not allowed to change caller's buffer) and the -+ response buffer size is too small. This isn't a -+ reliable way to detect truncation because the ioctl -+ may be an inaccurate report of the UDP message size. -+ Therefore we use this only to issue debug output. -+ To do truncation accurately with UDP we need -+ MSG_TRUNC which is only available on Linux. We -+ can abstract out the Linux-specific feature in the -+ future to detect truncation. */ -+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) { -+ Dprint(statp->options & RES_DEBUG, -+ (stdout, ";; response may be truncated (UDP)\n") -+ ); -+ } -+ - HEADER *anhp = (HEADER *) *thisansp; - socklen_t fromlen = sizeof(struct sockaddr_in6); - assert (sizeof(from) <= fromlen); diff --git a/patches/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.22/910-typedef-caddr.patch b/patches/glibc/2.22/910-typedef-caddr.patch deleted file mode 100644 index fc7979b..0000000 --- a/patches/glibc/2.22/910-typedef-caddr.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h ---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 -+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif - diff --git a/patches/glibc/2.22/920-fix-rpc_parse-format.patch b/patches/glibc/2.22/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.22/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.22/930-explicit-boolean.patch b/patches/glibc/2.22/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/2.22/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/2.22/940-nis-bogus-conditional.patch b/patches/glibc/2.22/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.22/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/2.23/120-Fix-build-with-enable-static-nss.patch b/patches/glibc/2.23/120-Fix-build-with-enable-static-nss.patch deleted file mode 100644 index 59ab087..0000000 --- a/patches/glibc/2.23/120-Fix-build-with-enable-static-nss.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Tue, 24 Jan 2017 10:31:40 -0800 -Subject: [PATCH] Fix build with --enable-static-nss - -* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions - match those around use, to avoid "defined but not used" error. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - nss/nsswitch.c | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/nss/nsswitch.c b/nss/nsswitch.c -index 0a65f6a..8f31658 100644 ---- a/nss/nsswitch.c -+++ b/nss/nsswitch.c -@@ -94,7 +94,7 @@ static name_database *service_table; - static name_database_entry *defconfig_entries; - - --#ifdef USE_NSCD -+#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) - /* Nonzero if this is the nscd process. */ - static bool is_nscd; - /* The callback passed to the init functions when nscd is used. */ --- -2.9.3 - diff --git a/patches/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.23/910-typedef-caddr.patch b/patches/glibc/2.23/910-typedef-caddr.patch deleted file mode 100644 index fc7979b..0000000 --- a/patches/glibc/2.23/910-typedef-caddr.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h ---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 -+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif - diff --git a/patches/glibc/2.23/920-fix-rpc_parse-format.patch b/patches/glibc/2.23/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.23/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.23/930-explicit-boolean.patch b/patches/glibc/2.23/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/2.23/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/2.23/940-nis-bogus-conditional.patch b/patches/glibc/2.23/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.23/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.24/110-sh-fix-gcc6.patch b/patches/glibc/2.24/110-sh-fix-gcc6.patch deleted file mode 100644 index cacf390..0000000 --- a/patches/glibc/2.24/110-sh-fix-gcc6.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 279acf7a059f2d2296f690d7f2d886bd0e404f30 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 25 Jan 2017 21:46:53 -0800 -Subject: [PATCH] sh: conditional is false in dl-conflict.c - -... ifdef it out, so that it doesn't create a call to abort(). - -Signed-off-by: Alexey Neyman ---- - sysdeps/sh/dl-machine.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h -index 449deea..2b468af 100644 ---- a/sysdeps/sh/dl-machine.h -+++ b/sysdeps/sh/dl-machine.h -@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - break; - case R_SH_DIR32: - { --#ifndef RTLD_BOOTSTRAP -+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP - /* This is defined in rtld.c, but nowhere in the static - libc.a; make the reference weak so static programs can - still link. This declaration cannot be done when --- -2.9.3 - diff --git a/patches/glibc/2.24/120-Fix-build-with-enable-static-nss.patch b/patches/glibc/2.24/120-Fix-build-with-enable-static-nss.patch deleted file mode 100644 index 59ab087..0000000 --- a/patches/glibc/2.24/120-Fix-build-with-enable-static-nss.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Tue, 24 Jan 2017 10:31:40 -0800 -Subject: [PATCH] Fix build with --enable-static-nss - -* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions - match those around use, to avoid "defined but not used" error. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - nss/nsswitch.c | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/nss/nsswitch.c b/nss/nsswitch.c -index 0a65f6a..8f31658 100644 ---- a/nss/nsswitch.c -+++ b/nss/nsswitch.c -@@ -94,7 +94,7 @@ static name_database *service_table; - static name_database_entry *defconfig_entries; - - --#ifdef USE_NSCD -+#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) - /* Nonzero if this is the nscd process. */ - static bool is_nscd; - /* The callback passed to the init functions when nscd is used. */ --- -2.9.3 - diff --git a/patches/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.24/910-typedef-caddr.patch b/patches/glibc/2.24/910-typedef-caddr.patch deleted file mode 100644 index fc7979b..0000000 --- a/patches/glibc/2.24/910-typedef-caddr.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h ---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 -+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif - diff --git a/patches/glibc/2.24/920-fix-rpc_parse-format.patch b/patches/glibc/2.24/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/2.24/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/2.24/930-explicit-boolean.patch b/patches/glibc/2.24/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/2.24/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/2.24/940-nis-bogus-conditional.patch b/patches/glibc/2.24/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/2.24/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/2.25/110-sh-fix-gcc6.patch b/patches/glibc/2.25/110-sh-fix-gcc6.patch deleted file mode 100644 index cacf390..0000000 --- a/patches/glibc/2.25/110-sh-fix-gcc6.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 279acf7a059f2d2296f690d7f2d886bd0e404f30 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 25 Jan 2017 21:46:53 -0800 -Subject: [PATCH] sh: conditional is false in dl-conflict.c - -... ifdef it out, so that it doesn't create a call to abort(). - -Signed-off-by: Alexey Neyman ---- - sysdeps/sh/dl-machine.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h -index 449deea..2b468af 100644 ---- a/sysdeps/sh/dl-machine.h -+++ b/sysdeps/sh/dl-machine.h -@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - break; - case R_SH_DIR32: - { --#ifndef RTLD_BOOTSTRAP -+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP - /* This is defined in rtld.c, but nowhere in the static - libc.a; make the reference weak so static programs can - still link. This declaration cannot be done when --- -2.9.3 - diff --git a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch b/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch deleted file mode 100644 index 59ab087..0000000 --- a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3a36c1eea4fa3b6f3b3b43f7eb91152383ae4ad8 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Tue, 24 Jan 2017 10:31:40 -0800 -Subject: [PATCH] Fix build with --enable-static-nss - -* nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions - match those around use, to avoid "defined but not used" error. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - nss/nsswitch.c | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/nss/nsswitch.c b/nss/nsswitch.c -index 0a65f6a..8f31658 100644 ---- a/nss/nsswitch.c -+++ b/nss/nsswitch.c -@@ -94,7 +94,7 @@ static name_database *service_table; - static name_database_entry *defconfig_entries; - - --#ifdef USE_NSCD -+#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) - /* Nonzero if this is the nscd process. */ - static bool is_nscd; - /* The callback passed to the init functions when nscd is used. */ --- -2.9.3 - diff --git a/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/2.25/910-typedef-caddr.patch b/patches/glibc/2.25/910-typedef-caddr.patch deleted file mode 100644 index fc7979b..0000000 --- a/patches/glibc/2.25/910-typedef-caddr.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h ---- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500 -+++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500 -@@ -113,7 +113,10 @@ - #ifdef __USE_MISC - # ifndef __daddr_t_defined - typedef __daddr_t daddr_t; -+# if ! defined(caddr_t) && ! defined(__caddr_t_defined) - typedef __caddr_t caddr_t; -+# define __caddr_t_defined -+# endif - # define __daddr_t_defined - # endif - #endif - diff --git a/patches/glibc/2.25/960-sh4-trap-divdi3.patch b/patches/glibc/2.25/960-sh4-trap-divdi3.patch deleted file mode 100644 index 99fad46..0000000 --- a/patches/glibc/2.25/960-sh4-trap-divdi3.patch +++ /dev/null @@ -1,340 +0,0 @@ -commit db3d848e154b00071f4a5e729d5884efad410109 -Author: Adhemerval Zanella -Date: Wed Mar 15 15:44:59 2017 -0300 - - Build divdi3 only for architecture that required it - - As noted in [1], divdi3 object is only exported in a handful ABIs - (i386, m68k, powerpc32, s390-32, and ia64), however it is built - for all current architectures regardless. - - This patch refact the make rules for this object to so only the - aforementioned architectures that actually require it builds it. - - Also, to avoid internal PLT calls to the exported symbol from the - module, glibc uses an internal header (symbol-hacks.h) which is - unrequired (and in fact breaks the build for architectures that - intend to get symbol definitions from libgcc.a). The patch also - changes it to create its own header (divdi3-symbol-hacks.h) and - adjust the architectures that require it accordingly. - - I checked the build/check (with run-built-tests=no) on the - following architectures (which I think must cover all supported - ABI/builds) using GCC 6.3: - - aarch64-linux-gnu - alpha-linux-gnu - arm-linux-gnueabihf - hppa-linux-gnu - ia64-linux-gnu - m68k-linux-gnu - microblaze-linux-gnu - mips64-n32-linux-gnu - mips-linux-gnu - mips64-linux-gnu - nios2-linux-gnu - powerpc-linux-gnu - powerpc-linux-gnu-power4 - powerpc64-linux-gnu - powerpc64le-linux-gnu - s390x-linux-gnu - s390-linux-gnu - sh4-linux-gnu - sh4-linux-gnu-soft - sparc64-linux-gnu - sparcv9-linux-gnu - tilegx-linux-gnu - tilegx-linux-gnu-32 - tilepro-linux-gnu - x86_64-linux-gnu - x86_64-linux-gnu-x32 - i686-linux-gnu - - I only saw one regression on sparcv9-linux-gnu (extra PLT call to - .udiv) which I address in next patch in the set. It also correctly - build SH with GCC 7.0.1 (without any regression from c89721e25d). - - [1] https://sourceware.org/ml/libc-alpha/2017-03/msg00243.html - - * sysdeps/i386/symbol-hacks.h: New file. - * sysdeps/m68k/symbol-hacks.h: New file. - * sysdeps/powerpc/powerpc32/symbol-hacks.h: New file. - * sysdeps/s390/s390-32/symbol-hacks.h: New file. - * sysdeps/unix/sysv/linux/i386/Makefile - [$(subdir) = csu] (sysdep_routines): New rule: divdi3 object. - [$(subdir) = csu] (sysdep-only-routines): Likewise. - [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. - * sysdeps/unix/sysv/linux/m68k/Makefile - [$(subdir) = csu] (sysdep_routines): Likewise. - [$(subdir) = csu] (sysdep-only-routines): Likewise. - [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile - [$(subdir) = csu] (sysdep_routines): Likewise. - [$(subdir) = csu] (sysdep-only-routines): Likewise. - [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/Makefile - [$(subdir) = csu] (sysdep_routines): Likewise. - [$(subdir) = csu] (sysdep-only-routines): Likewise. - [$(subdir) = csu] (CFLAGS-divdi3.c): Likewise. - * sysdeps/wordsize-32/Makefile: Remove file. - * sysdeps/wordsize-32/symbol-hacks.h: Definitions move to ... - * sysdeps/wordsize-32/divdi3-symbol-hacks.h: ... here. - -diff --git a/sysdeps/i386/symbol-hacks.h b/sysdeps/i386/symbol-hacks.h -new file mode 100644 -index 0000000000..36a13c83f7 ---- /dev/null -+++ b/sysdeps/i386/symbol-hacks.h -@@ -0,0 +1,21 @@ -+/* Hacks needed for symbol manipulation. i386 version. -+ Copyright (C) 2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+#include_next "symbol-hacks.h" -diff --git a/sysdeps/m68k/symbol-hacks.h b/sysdeps/m68k/symbol-hacks.h -new file mode 100644 -index 0000000000..e449d29810 ---- /dev/null -+++ b/sysdeps/m68k/symbol-hacks.h -@@ -0,0 +1,21 @@ -+/* Hacks needed for symbol manipulation. m68k version. -+ Copyright (C) 2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+#include_next "symbol-hacks.h" -diff --git a/sysdeps/powerpc/powerpc32/symbol-hacks.h b/sysdeps/powerpc/powerpc32/symbol-hacks.h -new file mode 100644 -index 0000000000..dbb3141621 ---- /dev/null -+++ b/sysdeps/powerpc/powerpc32/symbol-hacks.h -@@ -0,0 +1,21 @@ -+/* Hacks needed for symbol manipulation. powerpc version. -+ Copyright (C) 2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+#include_next "symbol-hacks.h" -diff --git a/sysdeps/s390/s390-32/symbol-hacks.h b/sysdeps/s390/s390-32/symbol-hacks.h -new file mode 100644 -index 0000000000..585c42365a ---- /dev/null -+++ b/sysdeps/s390/s390-32/symbol-hacks.h -@@ -0,0 +1,21 @@ -+/* Hacks needed for symbol manipulation. s390 version. -+ Copyright (C) 2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+#include_next "symbol-hacks.h" -diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile -index 6aac0dfe15..4080b8c966 100644 ---- a/sysdeps/unix/sysv/linux/i386/Makefile -+++ b/sysdeps/unix/sysv/linux/i386/Makefile -@@ -26,6 +26,11 @@ endif - - ifeq ($(subdir),csu) - sysdep-dl-routines += sysdep -+ifeq (yes,$(build-shared)) -+sysdep_routines += divdi3 -+shared-only-routines += divdi3 -+CPPFLAGS-divdi3.c = -Din_divdi3_c -+endif - endif - - ifeq ($(subdir),nptl) -diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile -index 5c50ce6927..ce1f696a6f 100644 ---- a/sysdeps/unix/sysv/linux/m68k/Makefile -+++ b/sysdeps/unix/sysv/linux/m68k/Makefile -@@ -4,6 +4,11 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX - - ifeq ($(subdir),csu) - sysdep_routines += m68k-helpers -+ifeq (yes,$(build-shared)) -+sysdep_routines += divdi3 -+shared-only-routines += divdi3 -+CPPFLAGS-divdi3.c = -Din_divdi3_c -+endif - endif - - ifeq ($(subdir),misc) -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile -index 3d6c150582..1f45659ed1 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile -@@ -1,2 +1,10 @@ - # See Makeconfig regarding the use of default-abi. - default-abi := 32 -+ -+ifeq ($(subdir),csu) -+ifeq (yes,$(build-shared)) -+sysdep_routines += divdi3 -+shared-only-routines += divdi3 -+CPPFLAGS-divdi3.c = -Din_divdi3_c -+endif -+endif -diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile -index da3b3c76b4..fd8cf92633 100644 ---- a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile -+++ b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile -@@ -21,3 +21,11 @@ endif - ifeq ($(subdir),stdlib) - sysdep_routines += __makecontext_ret - endif -+ -+ifeq ($(subdir),csu) -+ifeq (yes,$(build-shared)) -+sysdep_routines += divdi3 -+shared-only-routines += divdi3 -+CPPFLAGS-divdi3.c = -Din_divdi3_c -+endif -+endif -diff --git a/sysdeps/wordsize-32/Makefile b/sysdeps/wordsize-32/Makefile -deleted file mode 100644 -index 82beac44ed..0000000000 ---- a/sysdeps/wordsize-32/Makefile -+++ /dev/null -@@ -1,7 +0,0 @@ --ifeq ($(subdir),csu) --ifeq (yes,$(build-shared)) --sysdep_routines += divdi3 --shared-only-routines += divdi3 --CPPFLAGS-divdi3.c = -Din_divdi3_c --endif --endif -diff --git a/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/sysdeps/wordsize-32/divdi3-symbol-hacks.h -new file mode 100644 -index 0000000000..6c90cb796d ---- /dev/null -+++ b/sysdeps/wordsize-32/divdi3-symbol-hacks.h -@@ -0,0 +1,31 @@ -+/* Hacks needed for divdi3 symbol manipulation. -+ Copyright (C) 2004-2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* A very dirty trick: gcc emits references to __divdi3, __udivdi3, -+ __moddi3, and __umoddi3. These functions are exported and -+ therefore we get PLTs. Unnecessarily so. Changing gcc is a big -+ task which might not be worth it so we play tricks with the -+ assembler. -+ Note: in_divdi3_c is only used to avoid symbol alias on divdi3 -+ build itself. */ -+#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED -+asm ("__divdi3 = __divdi3_internal"); -+asm ("__udivdi3 = __udivdi3_internal"); -+asm ("__moddi3 = __moddi3_internal"); -+asm ("__umoddi3 = __umoddi3_internal"); -+#endif -diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h -deleted file mode 100644 -index 0aec1e0b97..0000000000 ---- a/sysdeps/wordsize-32/symbol-hacks.h -+++ /dev/null -@@ -1,31 +0,0 @@ --/* Hacks needed for symbol manipulation. -- Copyright (C) 2004-2017 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- -- The GNU C Library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- The GNU C Library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public -- License along with the GNU C Library; if not, see -- . */ -- --#include_next "symbol-hacks.h" -- --/* A very dirty trick: gcc emits references to __divdi3, __udivdi3, -- __moddi3, and __umoddi3. These functions are exported and -- therefore we get PLTs. Unnecessarily so. Changing gcc is a big -- task which might not be worth it so we play tricks with the -- assembler. */ --#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED --asm ("__divdi3 = __divdi3_internal"); --asm ("__udivdi3 = __udivdi3_internal"); --asm ("__moddi3 = __moddi3_internal"); --asm ("__umoddi3 = __umoddi3_internal"); --#endif diff --git a/patches/glibc/2.25/961-sparc-extra-plt-call.patch b/patches/glibc/2.25/961-sparc-extra-plt-call.patch deleted file mode 100644 index 3781cf0..0000000 --- a/patches/glibc/2.25/961-sparc-extra-plt-call.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit bdc543e338281da051b3dc06eae96c330a485ce6 -Author: Adhemerval Zanella -Date: Thu Mar 16 09:15:57 2017 -0300 - - sparc: Fix .udiv plt on libc - - With the removal of divdi3 object from sparcv9-linux-gnu build, its - definition came from libgcc and its functions internall calls .udiv. - Since glibc also exports these symbols for compatibility reasons, it - will end up creating PLT calls internally in libc.so. - - To avoid it, this patch uses the linker option --wrap to replace all - the internal libc.so .udiv calls to the wrapper __wrap_.udiv. Along - with strong alias in the udiv implementations, it makes linker do - local calls. - - Checked on sparcv9-linux-gnu. - - * sysdeps/sparc/sparc32/Makefile (libc.so-gnulib): New rule. - * sysdeps/sparc/sparc32/sparcv8/udiv.S (.udiv): Make a strong_alias - to __wrap_.udiv. - * sysdeps/sparc/sparc32/sparcv9/udiv.S (.udiv): Likewise. - * sysdeps/sparc/sparc32/udiv.S (.udiv): Likewise. - -diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile -index da205898cf..14d6e03c6f 100644 ---- a/sysdeps/sparc/sparc32/Makefile -+++ b/sysdeps/sparc/sparc32/Makefile -@@ -47,3 +47,9 @@ $(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S): $(sysdep_dir)/sparc/sparc32/divrem. - mv -f $@-tmp $@ - - sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/sparc32/%.S) -+ -+# libgcc __divdi3 and __moddi3 uses .udiv and since it is also exported by -+# libc.so linker will create PLTs for the symbol. To avoid it we strong alias -+# the exported libc one to __wrap_.udiv and use linker option --wrap to make any -+# call to .udiv to call the wrapper symbol. -+libc.so-gnulib += -Wl,--wrap=.udiv -diff --git a/sysdeps/sparc/sparc32/sparcv8/udiv.S b/sysdeps/sparc/sparc32/sparcv8/udiv.S -index d71954351e..e9cab4e4ef 100644 ---- a/sysdeps/sparc/sparc32/sparcv8/udiv.S -+++ b/sysdeps/sparc/sparc32/sparcv8/udiv.S -@@ -13,3 +13,4 @@ ENTRY(.udiv) - udiv %o0, %o1, %o0 - - END(.udiv) -+strong_alias (.udiv, __wrap_.udiv) -diff --git a/sysdeps/sparc/sparc32/sparcv9/udiv.S b/sysdeps/sparc/sparc32/sparcv9/udiv.S -index de79899756..368f85ede2 100644 ---- a/sysdeps/sparc/sparc32/sparcv9/udiv.S -+++ b/sysdeps/sparc/sparc32/sparcv9/udiv.S -@@ -15,3 +15,4 @@ ENTRY(.udiv) - udiv %o0, %o1, %o0 - - END(.udiv) -+strong_alias (.udiv, __wrap_.udiv) -diff --git a/sysdeps/sparc/sparc32/udiv.S b/sysdeps/sparc/sparc32/udiv.S -index 8dfff66158..ade0afdf40 100644 ---- a/sysdeps/sparc/sparc32/udiv.S -+++ b/sysdeps/sparc/sparc32/udiv.S -@@ -344,3 +344,4 @@ LOC(got_result): - mov %o2, %o0 - - END(.udiv) -+strong_alias (.udiv, __wrap_.udiv) diff --git a/patches/glibc/linaro-2.20-2014.11/100-sparc-nptl.patch b/patches/glibc/linaro-2.20-2014.11/100-sparc-nptl.patch deleted file mode 100644 index 21f0337..0000000 --- a/patches/glibc/linaro-2.20-2014.11/100-sparc-nptl.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/sysdeps/sparc/sparc32/sem_trywait.c b/sysdeps/sparc/sparc32/sem_trywait.c -index 7d0fc55..ad9b4ad 100644 ---- a/sysdeps/sparc/sparc32/sem_trywait.c -+++ b/sysdeps/sparc/sparc32/sem_trywait.c -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #include - - - diff --git a/patches/glibc/linaro-2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/linaro-2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch deleted file mode 100644 index 6fd663a..0000000 --- a/patches/glibc/linaro-2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch +++ /dev/null @@ -1,84 +0,0 @@ -From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001 -From: Yvan Roux -Date: Fri, 15 Apr 2016 13:29:26 +0200 -Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with - -Wparentheses - ---- - ChangeLog | 5 +++++ - nis/nis_call.c | 20 +++++++++++--------- - stdlib/setenv.c | 26 ++++++++++++++------------ - 3 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/nis/nis_call.c b/nis/nis_call.c -index 3fa37e4..cb7839a 100644 ---- a/nis/nis_call.c -+++ b/nis/nis_call.c -@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, - /* Choose which entry should be evicted from the cache. */ - loc = &nis_server_cache[0]; - if (*loc != NULL) -- for (i = 1; i < 16; ++i) -- if (nis_server_cache[i] == NULL) -- { -+ { -+ for (i = 1; i < 16; ++i) -+ if (nis_server_cache[i] == NULL) -+ { -+ loc = &nis_server_cache[i]; -+ break; -+ } -+ else if ((*loc)->uses > nis_server_cache[i]->uses -+ || ((*loc)->uses == nis_server_cache[i]->uses -+ && (*loc)->expires > nis_server_cache[i]->expires)) - loc = &nis_server_cache[i]; -- break; -- } -- else if ((*loc)->uses > nis_server_cache[i]->uses -- || ((*loc)->uses == nis_server_cache[i]->uses -- && (*loc)->expires > nis_server_cache[i]->expires)) -- loc = &nis_server_cache[i]; -+ } - old = *loc; - *loc = new; - -diff --git a/stdlib/setenv.c b/stdlib/setenv.c -index da61ee0..e66045f 100644 ---- a/stdlib/setenv.c -+++ b/stdlib/setenv.c -@@ -278,18 +278,20 @@ unsetenv (const char *name) - ep = __environ; - if (ep != NULL) - while (*ep != NULL) -- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -- { -- /* Found it. Remove this pointer by moving later ones back. */ -- char **dp = ep; -- -- do -- dp[0] = dp[1]; -- while (*dp++); -- /* Continue the loop in case NAME appears again. */ -- } -- else -- ++ep; -+ { -+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') -+ { -+ /* Found it. Remove this pointer by moving later ones back. */ -+ char **dp = ep; -+ -+ do -+ dp[0] = dp[1]; -+ while (*dp++); -+ /* Continue the loop in case NAME appears again. */ -+ } -+ else -+ ++ep; -+ } - - UNLOCK; - --- -2.7.4 - diff --git a/patches/glibc/linaro-2.20-2014.11/102-fix-signed-shift-overlow.patch b/patches/glibc/linaro-2.20-2014.11/102-fix-signed-shift-overlow.patch deleted file mode 100644 index ef49f83..0000000 --- a/patches/glibc/linaro-2.20-2014.11/102-fix-signed-shift-overlow.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit 5542236837c5c41435f8282ec92799f480c36f18 -Author: Paul Eggert -Date: Tue Jul 21 22:50:29 2015 -0700 - - Port the 0x7efe...feff pattern to GCC 6. - - See Steve Ellcey's bug report in: - https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html - * string/memrchr.c (MEMRCHR): - * string/rawmemchr.c (RAWMEMCHR): - * string/strchr.c (strchr): - * string/strchrnul.c (STRCHRNUL): - Rewrite code to avoid issues with signed shift overflow. - -diff --git a/string/memrchr.c b/string/memrchr.c -index 0c8fd84..86cd5b9 100644 ---- a/string/memrchr.c -+++ b/string/memrchr.c -@@ -96,15 +96,8 @@ MEMRCHR - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 05b22be..228ca9d 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- -- if (sizeof (longword) != 4 && sizeof (longword) != 8) -- abort (); -- --#if LONG_MAX <= LONG_MAX_32_BITS -- magic_bits = 0x7efefeff; --#else -- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff; --#endif -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchr.c b/string/strchr.c -index 5f90075..f13b2b3 100644 ---- a/string/strchr.c -+++ b/string/strchr.c -@@ -60,13 +60,8 @@ strchr (const char *s, int c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); -diff --git a/string/strchrnul.c b/string/strchrnul.c -index 2678f1d..daf0b3f 100644 ---- a/string/strchrnul.c -+++ b/string/strchrnul.c -@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in) - - The 1-bits make sure that carries propagate to the next 0-bit. - The 0-bits provide holes for carries to fall into. */ -- switch (sizeof (longword)) -- { -- case 4: magic_bits = 0x7efefeffL; break; -- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; -- default: -- abort (); -- } -+ magic_bits = -1; -+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); diff --git a/patches/glibc/linaro-2.20-2014.11/103-dl-openat64-variadic.patch b/patches/glibc/linaro-2.20-2014.11/103-dl-openat64-variadic.patch deleted file mode 100644 index fe94b96..0000000 --- a/patches/glibc/linaro-2.20-2014.11/103-dl-openat64-variadic.patch +++ /dev/null @@ -1,195 +0,0 @@ -commit 9dd346ff431fc761f1b748bd4da8bb59f7652094 -Author: Joseph Myers -Date: Tue Oct 20 11:54:09 2015 +0000 - - Convert 113 more function definitions to prototype style (files with assertions). - - This mostly automatically-generated patch converts 113 function - definitions in glibc from old-style K&R to prototype-style. Following - my other recent such patches, this one deals with the case of function - definitions in files that either contain assertions or where grep - suggested they might contain assertions - and thus where it isn't - possible to use a simple object code comparison as a sanity check on - the correctness of the patch, because line numbers are changed. - - A few such automatically-generated changes needed to be supplemented - by manual changes for the result to compile. openat64 had a prototype - declaration with "..." but an old-style definition in - sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the - generated prototype in the definition (I've filed - for diagnosing - such cases in GCC; the old state was undefined behavior not requiring - a diagnostic, but one seems a good idea). In addition, as Florian has - noted regparm attribute mismatches between declaration and definition - are only diagnosed for prototype definitions, and five functions - needed internal_function added to their definitions (in the case of - __pthread_mutex_cond_lock, via the macro definition of - __pthread_mutex_lock) to compile on i386. - - After this patch is in, remaining old-style definitions are probably - most readily fixed manually before we can turn on - -Wold-style-definition for all builds. - - Tested for x86_64 and x86 (testsuite). - - * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style - function definition. - * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise. - * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise. - * debug/backtracesyms.c (__backtrace_symbols): Likewise. - * elf/dl-minimal.c (_itoa): Likewise. - * hurd/hurdmalloc.c (malloc): Likewise. - (free): Likewise. - (realloc): Likewise. - * inet/inet6_option.c (inet6_option_space): Likewise. - (inet6_option_init): Likewise. - (inet6_option_append): Likewise. - (inet6_option_alloc): Likewise. - (inet6_option_next): Likewise. - (inet6_option_find): Likewise. - * io/ftw.c (FTW_NAME): Likewise. - (NFTW_NAME): Likewise. - (NFTW_NEW_NAME): Likewise. - (NFTW_OLD_NAME): Likewise. - * libio/iofwide.c (_IO_fwide): Likewise. - * libio/strops.c (_IO_str_init_static_internal): Likewise. - (_IO_str_init_static): Likewise. - (_IO_str_init_readonly): Likewise. - (_IO_str_overflow): Likewise. - (_IO_str_underflow): Likewise. - (_IO_str_count): Likewise. - (_IO_str_seekoff): Likewise. - (_IO_str_pbackfail): Likewise. - (_IO_str_finish): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - (_IO_wstr_overflow): Likewise. - (_IO_wstr_underflow): Likewise. - (_IO_wstr_count): Likewise. - (_IO_wstr_seekoff): Likewise. - (_IO_wstr_pbackfail): Likewise. - (_IO_wstr_finish): Likewise. - * locale/programs/localedef.c (normalize_codeset): Likewise. - * locale/programs/locarchive.c (add_locale_to_archive): Likewise. - (add_locales_to_archive): Likewise. - (delete_locales_from_archive): Likewise. - * malloc/malloc.c (__libc_mallinfo): Likewise. - * math/gen-auto-libm-tests.c (init_fp_formats): Likewise. - * misc/tsearch.c (__tfind): Likewise. - * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise. - * nptl/pthread_attr_getdetachstate.c - (__pthread_attr_getdetachstate): Likewise. - * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize): - Likewise. - * nptl/pthread_attr_getinheritsched.c - (__pthread_attr_getinheritsched): Likewise. - * nptl/pthread_attr_getschedparam.c - (__pthread_attr_getschedparam): Likewise. - * nptl/pthread_attr_getschedpolicy.c - (__pthread_attr_getschedpolicy): Likewise. - * nptl/pthread_attr_getscope.c (__pthread_attr_getscope): - Likewise. - * nptl/pthread_attr_getstack.c (__pthread_attr_getstack): - Likewise. - * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): - Likewise. - * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize): - Likewise. - * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise. - (__pthread_attr_init_2_0): Likewise. - * nptl/pthread_attr_setdetachstate.c - (__pthread_attr_setdetachstate): Likewise. - * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize): - Likewise. - * nptl/pthread_attr_setinheritsched.c - (__pthread_attr_setinheritsched): Likewise. - * nptl/pthread_attr_setschedparam.c - (__pthread_attr_setschedparam): Likewise. - * nptl/pthread_attr_setschedpolicy.c - (__pthread_attr_setschedpolicy): Likewise. - * nptl/pthread_attr_setscope.c (__pthread_attr_setscope): - Likewise. - * nptl/pthread_attr_setstack.c (__pthread_attr_setstack): - Likewise. - * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr): - Likewise. - * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize): - Likewise. - * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock): - Likewise. - * nptl/pthread_create.c (__find_in_stack_list): Likewise. - * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise. - * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to - use internal_function. - * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to - prototype-style function definition. - * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise. - (__pthread_mutex_cond_lock_adjust): Likewise. Use - internal_function. - * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): - Convert to prototype-style function definition. - * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): - Likewise. - * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): - Likewise. - (__pthread_mutex_unlock): Likewise. - * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise. - * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise. - * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise. - * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise. - * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise. - * nss/makedb.c (process_input): Likewise. - * posix/fnmatch.c (__strchrnul): Likewise. - (__wcschrnul): Likewise. - (fnmatch): Likewise. - * posix/fnmatch_loop.c (FCT): Likewise. - * posix/glob.c (globfree): Likewise. - (__glob_pattern_type): Likewise. - (__glob_pattern_p): Likewise. - * posix/regcomp.c (re_compile_pattern): Likewise. - (re_set_syntax): Likewise. - (re_compile_fastmap): Likewise. - (regcomp): Likewise. - (regerror): Likewise. - (regfree): Likewise. - * posix/regexec.c (regexec): Likewise. - (re_match): Likewise. - (re_search): Likewise. - (re_match_2): Likewise. - (re_search_2): Likewise. - (re_search_stub): Likewise. Use internal_function - (re_copy_regs): Likewise. - (re_set_registers): Convert to prototype-style function - definition. - (prune_impossible_nodes): Likewise. Use internal_function. - * resolv/inet_net_pton.c (inet_net_pton): Convert to - prototype-style function definition. - (inet_net_pton_ipv4): Likewise. - * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise. - * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise. - * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise. - * sysdeps/pthread/timer_delete.c (timer_delete): Likewise. - * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. - Make variadic. - * time/strptime_l.c (localtime_r): Convert to prototype-style - function definition. - * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise. - -diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c -index 7d100bb..7eea0ca 100644 ---- a/sysdeps/unix/sysv/linux/dl-openat64.c -+++ b/sysdeps/unix/sysv/linux/dl-openat64.c -@@ -23,10 +23,7 @@ - - - int --openat64 (dfd, file, oflag) -- int dfd; -- const char *file; -- int oflag; -+openat64 (int dfd, const char *file, int oflag, ...) - { - assert ((oflag & O_CREAT) == 0); - diff --git a/patches/glibc/linaro-2.20-2014.11/104-unused-variables.patch b/patches/glibc/linaro-2.20-2014.11/104-unused-variables.patch deleted file mode 100644 index 889c9bb..0000000 --- a/patches/glibc/linaro-2.20-2014.11/104-unused-variables.patch +++ /dev/null @@ -1,178 +0,0 @@ -commit 6565fcb6e189d67b5a3f321453daebb805056d73 -Author: Wilco Dijkstra -Date: Fri Sep 18 20:27:20 2015 +0100 - - Fix several build failures with GCC6 due to unused static variables. - - 2015-09-18 Wilco Dijkstra - - * resolv/base64.c (rcsid): Remove unused static. - * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused - static. (tqpi1): Likewise. - * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise. - * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise. - * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise. - * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise. - * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise. - * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise. - * timezone/private.h (time_t_min): Likewise. (time_t_max): - Likewise. - -diff --git a/resolv/base64.c b/resolv/base64.c -index ea584ed..519e5d2 100644 ---- a/resolv/base64.c -+++ b/resolv/base64.c -@@ -40,10 +40,6 @@ - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - --#if !defined(LINT) && !defined(CODECENTER) --static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $"; --#endif /* not lint */ -- - #include - #include - #include -diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h -index e0d65af..82943f9 100644 ---- a/sysdeps/ieee754/dbl-64/atnat2.h -+++ b/sysdeps/ieee754/dbl-64/atnat2.h -@@ -65,10 +65,8 @@ - /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */ - /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */ - /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */ --/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */ - /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */ - /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */ - /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */ - /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */ -@@ -129,10 +127,8 @@ - /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */ - /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */ - /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */ --/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */ - /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */ - /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */ --/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */ - /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */ - /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */ - /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */ -diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h -index 6817eaf..42b21f2 100644 ---- a/sysdeps/ieee754/dbl-64/uexp.h -+++ b/sysdeps/ieee754/dbl-64/uexp.h -@@ -29,7 +29,7 @@ - - #include "mydefs.h" - --const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, -+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300, - err_0 = 1.000014, err_1 = 0.000016; - const static int4 bigint = 0x40862002, - badint = 0x40876000,smallint = 0x3C8fffff; -diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h -index c8569a9..b4911e5 100644 ---- a/sysdeps/ieee754/dbl-64/upow.h -+++ b/sysdeps/ieee754/dbl-64/upow.h -@@ -34,7 +34,6 @@ - /**/ nZERO = {{0x80000000, 0}}, /* -0.0 */ - /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */ - /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */ --/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */ - /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */ - /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */ -@@ -48,7 +47,6 @@ - /**/ nZERO = {{0, 0x80000000}}, /* -0.0 */ - /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */ - /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */ --/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */ - /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */ - /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */ - /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */ -diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c -index 96f0e81..1daeef7 100644 ---- a/sysdeps/ieee754/flt-32/e_log10f.c -+++ b/sysdeps/ieee754/flt-32/e_log10f.c -@@ -22,8 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */ - log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */ - log10_2lo = 7.9034151668e-07; /* 0x355427db */ - --static const float zero = 0.0; -- - float - __ieee754_log10f(float x) - { -diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c -index 864ab27..0affd40 100644 ---- a/sysdeps/ieee754/flt-32/s_cosf.c -+++ b/sysdeps/ieee754/flt-32/s_cosf.c -@@ -21,8 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $"; - #include - #include - --static const float one=1.0; -- - #ifndef COSF - # define COSF_FUNC __cosf - #else -diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -index 500aacc..ab5a96e 100644 ---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c -@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); - static const long double PIL = 3.1415926535897932384626433832795028841972E0L; - static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; - static const long double one = 1.0L; --static const long double zero = 0.0L; - static const long double huge = 1.0e4000L; - - /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) -diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c -index fa4609f..08c80a3 100644 ---- a/sysdeps/ieee754/ldbl-128/s_erfl.c -+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c -@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n) - - static const long double - tiny = 1e-4931L, -- half = 0.5L, - one = 1.0L, - two = 2.0L, - /* 2/sqrt(pi) - 1 */ -diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c -index ff759bc..9609550 100644 ---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c -+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c -@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L; - - static const long double sqrth = 0.7071067811865475244008443621048490392848L; - /* ln (2^16384 * (1 - 2^-113)) */ --static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; - static const long double zero = 0.0L; - - long double -diff --git a/timezone/private.h b/timezone/private.h -index 4e8f4ae..ed19e06 100644 ---- a/timezone/private.h -+++ b/timezone/private.h -@@ -326,16 +326,6 @@ const char * scheck(const char * string, const char * format); - #define TYPE_SIGNED(type) (((type) -1) < 0) - #endif /* !defined TYPE_SIGNED */ - --/* The minimum and maximum finite time values. */ --static time_t const time_t_min = -- (TYPE_SIGNED(time_t) -- ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) -- : 0); --static time_t const time_t_max = -- (TYPE_SIGNED(time_t) -- ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) -- : -1); -- - #ifndef INT_STRLEN_MAXIMUM - /* - ** 302 / 1000 is log10(2.0) rounded up. diff --git a/patches/glibc/linaro-2.20-2014.11/105-misleading-indentation.patch b/patches/glibc/linaro-2.20-2014.11/105-misleading-indentation.patch deleted file mode 100644 index 1dd8d85..0000000 --- a/patches/glibc/linaro-2.20-2014.11/105-misleading-indentation.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 976ef870542580cf5fed896c2c652b3e1a95f9da -Author: Steve Ellcey -Date: Fri Dec 11 09:19:37 2015 -0800 - - Fix indentation. - - * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): - Fix indentation. - -diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -index 0c7685c..392afdb 100644 ---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c -+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c -@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32 - - /* compute q[0],q[1],...q[jk] */ - for (i=0;i<=jk;i++) { -- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; -+ for(j=0,fw=0.0;j<=jx;j++) -+ fw += x[j]*f[jx+i-j]; -+ q[i] = fw; - } - - jz = jk; diff --git a/patches/glibc/linaro-2.20-2014.11/106-dl-open-array-bounds.patch b/patches/glibc/linaro-2.20-2014.11/106-dl-open-array-bounds.patch deleted file mode 100644 index 08a9076..0000000 --- a/patches/glibc/linaro-2.20-2014.11/106-dl-open-array-bounds.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 328c44c3670ebf6c1bd790acddce65a12998cd6c -Author: Roland McGrath -Date: Fri Apr 17 12:11:58 2015 -0700 - - Fuller check for invalid NSID in _dl_open. - -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 0dbe07f..2d0e082 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -211,7 +211,7 @@ dl_open_worker (void *a) - struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); - - if (l) -- call_map = l; -+ call_map = l; - - if (args->nsid == __LM_ID_CALLER) - args->nsid = call_map->l_ns; -@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()")); - /* Never allow loading a DSO in a namespace which is empty. Such - direct placements is only causing problems. Also don't allow - loading into a namespace used for auditing. */ -- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0) -- && (GL(dl_ns)[nsid]._ns_nloaded == 0 -+ else if (__glibc_unlikely (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER) -+ && (__glibc_unlikely (nsid < 0 || nsid >= GL(dl_nns)) -+ /* This prevents the [NSID] index expressions from being -+ evaluated, so the compiler won't think that we are -+ accessing an invalid index here in the !SHARED case where -+ DL_NNS is 1 and so any NSID != 0 is invalid. */ -+ || DL_NNS == 1 -+ || GL(dl_ns)[nsid]._ns_nloaded == 0 - || GL(dl_ns)[nsid]._ns_loaded->l_auditing)) - _dl_signal_error (EINVAL, file, NULL, - N_("invalid target namespace in dlmopen()")); diff --git a/patches/glibc/linaro-2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/linaro-2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch deleted file mode 100644 index fdc3a60..0000000 --- a/patches/glibc/linaro-2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Wed, 8 Mar 2017 14:31:10 -0800 -Subject: [PATCH] Fix combreloc test with BSD grep - -The test for "-z combreloc" fails when cross-compiling on a machine -that uses BSD grep (e.g. on macos). grep complains about empty -subexpression and exits with non-zero status, which is interpreted -by configure as "not found". As a result, support for "-z combreloc" -(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. - - * configure.ac: Avoid empty subexpression in grep. - -Signed-off-by: Alexey Neyman ---- - ChangeLog | 5 +++++ - configure | 2 +- - configure.ac | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index eecd0ac..0118bd1 100755 ---- a/configure -+++ b/configure -@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no -diff --git a/configure.ac b/configure.ac -index 4a77411..19f6d87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without - dnl introducing new options this is not easily doable. Instead use a tool - dnl which always is cross-platform: readelf. To detect whether -z combreloc - dnl look for a section named .rel.dyn. -- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then -+ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no --- -2.9.3 - diff --git a/patches/glibc/linaro-2.20-2014.11/920-fix-rpc_parse-format.patch b/patches/glibc/linaro-2.20-2014.11/920-fix-rpc_parse-format.patch deleted file mode 100644 index 37e58da..0000000 --- a/patches/glibc/linaro-2.20-2014.11/920-fix-rpc_parse-format.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 5874510faaf3cbd0bb112aaacab9f225002beed1 -Author: Joseph Myers -Date: Tue Nov 8 23:44:51 2016 +0000 - - Fix rpcgen buffer overrun (bug 20790). - - Building with GCC 7 produces an error building rpcgen: - - rpc_parse.c: In function 'get_prog_declaration': - rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=] - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ~~~~^ - rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10 - sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - That buffer overrun is for the case where the .x file declares a - program with a million arguments. The strcpy two lines above can - generate a buffer overrun much more simply for a long argument name. - - The limit on length of line read by rpcgen (MAXLINESIZE == 1024) - provides a bound on the buffer size needed, so this patch just changes - the buffer size to MAXLINESIZE to avoid both possible buffer - overruns. A testcase is added that rpcgen does not crash with a - 500-character argument name, where it previously crashed. - - It would not at all surprise me if there are many other ways of - crashing rpcgen with either valid or invalid input; fuzz testing would - likely find various such bugs, though I don't think they are that - important to fix (rpcgen is not that likely to be used with untrusted - .x files as input). (As well as fuzz-findable bugs there are probably - also issues when various int variables get overflowed on very large - input.) The test infrastructure for rpcgen-not-crashing tests would - need extending if tests are to be added for cases where rpcgen should - produce an error, as opposed to cases where it should succeed. - - Tested for x86_64 and x86. - - [BZ #20790] - * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size - to MAXLINESIZE. - * sunrpc/bug20790.x: New file. - * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New - variable. - [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests). - [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule. - -diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c -index 1a1df6d8c2..505a6554cf 100644 ---- a/sunrpc/rpc_parse.c -+++ b/sunrpc/rpc_parse.c -@@ -521,7 +521,7 @@ static void - get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ ) - { - token tok; -- char name[10]; /* argument name */ -+ char name[MAXLINESIZE]; /* argument name */ - - if (dkind == DEF_PROGRAM) - { diff --git a/patches/glibc/linaro-2.20-2014.11/930-explicit-boolean.patch b/patches/glibc/linaro-2.20-2014.11/930-explicit-boolean.patch deleted file mode 100644 index 780fae6..0000000 --- a/patches/glibc/linaro-2.20-2014.11/930-explicit-boolean.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e223d1fe72e820d96f43831412ab267a1ace04d0 -Author: steve ellcey-CA Eng-Software -Date: Fri Oct 14 12:53:27 2016 -0700 - - Fix warnings from latest GCC. - - * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly - boolean. - -diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c -index 663fa392c2..bd758b5979 100644 ---- a/sysdeps/ieee754/dbl-64/e_pow.c -+++ b/sysdeps/ieee754/dbl-64/e_pow.c -@@ -466,15 +466,15 @@ checkint (double x) - return (n & 1) ? -1 : 1; /* odd or even */ - if (k > 20) - { -- if (n << (k - 20)) -+ if (n << (k - 20) != 0) - return 0; /* if not integer */ -- return (n << (k - 21)) ? -1 : 1; -+ return (n << (k - 21) != 0) ? -1 : 1; - } - if (n) - return 0; /*if not integer */ - if (k == 20) - return (m & 1) ? -1 : 1; -- if (m << (k + 12)) -+ if (m << (k + 12) != 0) - return 0; -- return (m << (k + 11)) ? -1 : 1; -+ return (m << (k + 11) != 0) ? -1 : 1; - } diff --git a/patches/glibc/linaro-2.20-2014.11/940-nis-bogus-conditional.patch b/patches/glibc/linaro-2.20-2014.11/940-nis-bogus-conditional.patch deleted file mode 100644 index 09b38cf..0000000 --- a/patches/glibc/linaro-2.20-2014.11/940-nis-bogus-conditional.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3 -Author: Joseph Myers -Date: Wed Dec 21 23:44:01 2016 +0000 - - Fix nss_nisplus build with mainline GCC (bug 20978). - - glibc build with current mainline GCC fails because - nis/nss_nisplus/nisplus-alias.c contains code - - if (name != NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; - } - - char buf[strlen (name) + 9 + tablename_len]; - - producing an error about strlen being called on a pointer that is - always NULL (and a subsequent use of that pointer with a %s format in - snprintf). - - As Andreas noted, the bogus conditional comes from a 1997 change: - - - if (name == NULL || strlen(name) > 8) - - return NSS_STATUS_NOTFOUND; - - else - + if (name != NULL || strlen(name) <= 8) - - So the intention is clearly to return an error for NULL name. - - This patch duly inverts the sense of the conditional. It fixes the - build with GCC mainline, and passes usual glibc testsuite testing for - x86_64. However, I have not tried any actual substantive nisplus - testing, do not have an environment for such testing, and do not know - whether it is possible that strlen (name) or tablename_len might be - large so that the VLA for buf is actually a security issue. However, - if it is a security issue, there are plenty of other similar instances - in the nisplus code (that haven't been hidden by a bogus comparison - with NULL) - and nis_table.c:__create_ib_request uses strdupa on the - string passed to nis_list, so a local fix in the caller wouldn't - suffice anyway (see bug 20987). (Calls to strdupa and other such - macros that use alloca must be considered equally questionable - regarding stack overflow issues as direct calls to alloca and VLA - declarations.) - - [BZ #20978] - * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): - Compare name == NULL, not name != NULL. - -diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c -index 7f698b4e6d..cb5acce01d 100644 ---- a/nis/nss_nisplus/nisplus-alias.c -+++ b/nis/nss_nisplus/nisplus-alias.c -@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, - return status; - } - -- if (name != NULL) -+ if (name == NULL) - { - *errnop = EINVAL; - return NSS_STATUS_UNAVAIL; diff --git a/patches/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 1a632fe..0000000 --- a/patches/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/patches/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index ed022be..0000000 --- a/patches/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,25 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig ---- glibc-2.12.1.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.12.1/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/patches/glibc/ports-2.12.1/160-manual-no-perl.patch b/patches/glibc/ports-2.12.1/160-manual-no-perl.patch deleted file mode 100644 index 2eb5414..0000000 --- a/patches/glibc/ports-2.12.1/160-manual-no-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -If we're using a cvs snapshot which updates the source files, and -perl isn't installed yet, then we can't regen the docs. Not a big -deal, so just whine a little and continue on our merry way. - -http://bugs.gentoo.org/60132 - -diff -durN glibc-2.12.1.orig/manual/Makefile glibc-2.12.1/manual/Makefile ---- glibc-2.12.1.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.12.1/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 -@@ -104,9 +104,14 @@ - libm-err.texi: stamp-libm-err - stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ - $(dir)/libm-test-ulps)) -+ifneq ($(PERL),no) - pwd=`pwd`; \ - $(PERL) $< $$pwd/.. > libm-err-tmp - $(move-if-change) libm-err-tmp libm-err.texi -+else -+ echo "Unable to rebuild math docs, no perl installed" -+ touch libm-err.texi -+endif - touch $@ - - # Generate Texinfo files from the C source for the example programs. diff --git a/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch deleted file mode 100644 index fb0881d..0000000 --- a/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.12.1.orig/locale/programs/3level.h glibc-2.12.1/locale/programs/3level.h ---- glibc-2.12.1.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.12.1/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch b/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch deleted file mode 100644 index 8f74a53..0000000 --- a/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.12.1.orig/resolv/res_libc.c glibc-2.12.1/resolv/res_libc.c ---- glibc-2.12.1.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.12.1/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/patches/glibc/ports-2.12.1/190-localedef-mmap.patch b/patches/glibc/ports-2.12.1/190-localedef-mmap.patch deleted file mode 100644 index b24ed80..0000000 --- a/patches/glibc/ports-2.12.1/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.12.1.orig/locale/programs/locarchive.c glibc-2.12.1/locale/programs/locarchive.c ---- glibc-2.12.1.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.12.1/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/patches/glibc/ports-2.12.1/200-fadvise64_64.patch b/patches/glibc/ports-2.12.1/200-fadvise64_64.patch deleted file mode 100644 index a9f10cd..0000000 --- a/patches/glibc/ports-2.12.1/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/patches/glibc/ports-2.12.1/220-section-comments.patch b/patches/glibc/ports-2.12.1/220-section-comments.patch deleted file mode 100644 index 4d35535..0000000 --- a/patches/glibc/ports-2.12.1/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.12.1.orig/include/libc-symbols.h glibc-2.12.1/include/libc-symbols.h ---- glibc-2.12.1.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.12.1/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/patches/glibc/ports-2.12.1/230-no-inline-gmon.patch b/patches/glibc/ports-2.12.1/230-no-inline-gmon.patch deleted file mode 100644 index 594fb79..0000000 --- a/patches/glibc/ports-2.12.1/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.12.1.orig/sysdeps/generic/initfini.c glibc-2.12.1/sysdeps/generic/initfini.c ---- glibc-2.12.1.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.12.1/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/patches/glibc/ports-2.12.1/240-check_native-headers.patch b/patches/glibc/ports-2.12.1/240-check_native-headers.patch deleted file mode 100644 index de0cb5b..0000000 --- a/patches/glibc/ports-2.12.1/240-check_native-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -many ports hit this warning: -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' - -snipped from suse - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/patches/glibc/ports-2.12.1/250-fix-pr631.patch b/patches/glibc/ports-2.12.1/250-fix-pr631.patch deleted file mode 100644 index af5b347..0000000 --- a/patches/glibc/ports-2.12.1/250-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - -diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig ---- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -+++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -@@ -531,7 +531,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... -diff -durN glibc-2.12.1.orig/elf/Makefile glibc-2.12.1/elf/Makefile ---- glibc-2.12.1.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 -+++ glibc-2.12.1/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 -@@ -146,6 +146,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln diff --git a/patches/glibc/ports-2.12.1/260-assume-pipe2.patch b/patches/glibc/ports-2.12.1/260-assume-pipe2.patch deleted file mode 100644 index b84f882..0000000 --- a/patches/glibc/ports-2.12.1/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.12.1.orig/socket/have_sock_cloexec.c glibc-2.12.1/socket/have_sock_cloexec.c ---- glibc-2.12.1.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.12.1/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/patches/glibc/ports-2.12.1/270-china.patch b/patches/glibc/ports-2.12.1/270-china.patch deleted file mode 100644 index 4cde1cf..0000000 --- a/patches/glibc/ports-2.12.1/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.12.1.orig/localedata/locales/zh_TW glibc-2.12.1/localedata/locales/zh_TW ---- glibc-2.12.1.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.12.1/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/patches/glibc/ports-2.12.1/280-new-valencian-locale.patch b/patches/glibc/ports-2.12.1/280-new-valencian-locale.patch deleted file mode 100644 index 6b46b44..0000000 --- a/patches/glibc/ports-2.12.1/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.12.1.orig/localedata/SUPPORTED glibc-2.12.1/localedata/SUPPORTED ---- glibc-2.12.1.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.12.1/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.12.1.orig/localedata/locales/ca_ES@valencia glibc-2.12.1/localedata/locales/ca_ES@valencia ---- glibc-2.12.1.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.12.1/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/patches/glibc/ports-2.12.1/300-nscd-one-fork.patch b/patches/glibc/ports-2.12.1/300-nscd-one-fork.patch deleted file mode 100644 index 27eae51..0000000 --- a/patches/glibc/ports-2.12.1/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.12.1.orig/nscd/nscd.c glibc-2.12.1/nscd/nscd.c ---- glibc-2.12.1.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.12.1/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/patches/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch deleted file mode 100644 index 947bb58..0000000 --- a/patches/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.12.1.orig/elf/rtld.c glibc-2.12.1/elf/rtld.c ---- glibc-2.12.1.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.12.1/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -390,14 +390,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.12.1.orig/include/atomic.h glibc-2.12.1/include/atomic.h ---- glibc-2.12.1.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.12.1/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.12.1.orig/nptl/Makefile glibc-2.12.1/nptl/Makefile ---- glibc-2.12.1.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.12.1/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -264,9 +264,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -425,6 +425,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.12.1.orig/nptl/pthread_barrier_wait.c glibc-2.12.1/nptl/pthread_barrier_wait.c ---- glibc-2.12.1.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.12.1/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile glibc-2.12.1/nptl/sysdeps/pthread/Makefile ---- glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.12.1/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.12.1.orig/stdio-common/Makefile glibc-2.12.1/stdio-common/Makefile ---- glibc-2.12.1.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.12.1/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.12.1.orig/sunrpc/clnt_udp.c glibc-2.12.1/sunrpc/clnt_udp.c ---- glibc-2.12.1.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.12.1/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/patches/glibc/ports-2.12.1/330-m68k-sys-user.patch b/patches/glibc/ports-2.12.1/330-m68k-sys-user.patch deleted file mode 100644 index b441691..0000000 --- a/patches/glibc/ports-2.12.1/330-m68k-sys-user.patch +++ /dev/null @@ -1,97 +0,0 @@ -copied from kernel as it is sanitized now - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 -@@ -1,3 +1,90 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+/* Core file format: The core file is written in such a way that gdb -+ can understand it and provide useful information to the user (under -+ linux we use the 'trad-core' bfd). There are quite a number of -+ obstacles to being able to view the contents of the floating point -+ registers, and until these are solved you will not be able to view the -+ contents of them. Actually, you can read in the core file and look at -+ the contents of the user struct to find out what the floating point -+ registers contain. -+ The actual file contents are as follows: -+ UPAGE: 1 page consisting of a user struct that tells gdb what is present -+ in the file. Directly after this is a copy of the task_struct, which -+ is currently not used by gdb, but it may come in useful at some point. -+ All of the registers are stored as part of the upage. The upage should -+ always be only one page. -+ DATA: The data area is stored. We use current->end_text to -+ current->brk to pick up all of the user variables, plus any memory -+ that may have been malloced. No attempt is made to determine if a page -+ is demand-zero or if a page is totally unused, we just cover the entire -+ range. All of the addresses are rounded in such a way that an integral -+ number of pages is written. -+ STACK: We need the stack information in order to get a meaningful -+ backtrace. We need to write the data from (esp) to -+ current->start_stack, so we round each of these off in order to be able -+ to write an integer number of pages. -+ The minimum core file size is 3 pages, or 12288 bytes. -+*/ -+ -+struct user_m68kfp_struct { -+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ -+ unsigned long fpcntl[3]; /* fp control regs */ -+}; -+ -+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and -+ is still the layout used by user (the new pt_regs doesn't have -+ all registers). */ -+struct user_regs_struct { -+ long d1,d2,d3,d4,d5,d6,d7; -+ long a0,a1,a2,a3,a4,a5,a6; -+ long d0; -+ long usp; -+ long orig_d0; -+ short stkadj; -+ short sr; -+ long pc; -+ short fmtvec; -+ short __fill; -+}; -+ -+ -+/* When the kernel dumps core, it starts by dumping the user struct - -+ this will be used by gdb to figure out where the data and stack segments -+ are within the file, and what virtual addresses to use. */ -+struct user{ -+/* We start with the registers, to mimic the way that "memory" is returned -+ from the ptrace(3,...) function. */ -+ struct user_regs_struct regs; /* Where the registers are actually stored */ -+/* ptrace does not yet supply these. Someday.... */ -+ int u_fpvalid; /* True if math co-processor being used. */ -+ /* for this mess. Not yet used. */ -+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ -+/* The rest of this junk is to help gdb figure out what goes where */ -+ unsigned long int u_tsize; /* Text segment size (pages). */ -+ unsigned long int u_dsize; /* Data segment size (pages). */ -+ unsigned long int u_ssize; /* Stack segment size (pages). */ -+ unsigned long start_code; /* Starting virtual address of text. */ -+ unsigned long start_stack; /* Starting virtual address of stack area. -+ This is actually the bottom of the stack, -+ the top of the stack is always found in the -+ esp register. */ -+ long int signal; /* Signal that caused the core dump. */ -+ int reserved; /* No longer used */ -+ struct user_regs_struct *u_ar0; -+ /* Used by gdb to help find the values for */ -+ /* the registers. */ -+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ -+ unsigned long magic; /* To uniquely identify a core file */ -+ char u_comm[32]; /* User command that was responsible */ -+}; -+#define NBPG 4096 -+#define UPAGES 1 -+#define HOST_TEXT_START_ADDR (u.start_code) -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -+ -+#endif - /* Copyright (C) 2008 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/patches/glibc/ports-2.12.1/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.12.1/340-dl_execstack-PaX-support.patch deleted file mode 100644 index afdb39c..0000000 --- a/patches/glibc/ports-2.12.1/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.12.1.orig/nptl/allocatestack.c glibc-2.12.1/nptl/allocatestack.c ---- glibc-2.12.1.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.12.1/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/patches/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch deleted file mode 100644 index 3f03169..0000000 --- a/patches/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.12.1.orig/elf/elf.h glibc-2.12.1/elf/elf.h ---- glibc-2.12.1.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.12.1/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/patches/glibc/ports-2.12.1/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.12.1/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index a847cdb..0000000 --- a/patches/glibc/ports-2.12.1/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.12.1.orig/grp/tst_fgetgrent.sh glibc-2.12.1/grp/tst_fgetgrent.sh ---- glibc-2.12.1.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.12.1/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.12.1.orig/iconvdata/run-iconv-test.sh glibc-2.12.1/iconvdata/run-iconv-test.sh ---- glibc-2.12.1.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.12.1/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.12.1.orig/iconvdata/tst-table.sh glibc-2.12.1/iconvdata/tst-table.sh ---- glibc-2.12.1.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.12.1/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.12.1.orig/intl/tst-codeset.sh glibc-2.12.1/intl/tst-codeset.sh ---- glibc-2.12.1.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.12.1/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.12.1.orig/intl/tst-gettext.sh glibc-2.12.1/intl/tst-gettext.sh ---- glibc-2.12.1.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.12.1/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.12.1.orig/intl/tst-gettext2.sh glibc-2.12.1/intl/tst-gettext2.sh ---- glibc-2.12.1.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.12.1/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.12.1.orig/malloc/tst-mtrace.sh glibc-2.12.1/malloc/tst-mtrace.sh ---- glibc-2.12.1.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.12.1/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.12.1.orig/nptl/tst-tls6.sh glibc-2.12.1/nptl/tst-tls6.sh ---- glibc-2.12.1.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.12.1/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.12.1.orig/posix/globtest.sh glibc-2.12.1/posix/globtest.sh ---- glibc-2.12.1.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.12.1/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.12.1.orig/posix/tst-getconf.sh glibc-2.12.1/posix/tst-getconf.sh ---- glibc-2.12.1.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.12.1/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.12.1.orig/posix/wordexp-tst.sh glibc-2.12.1/posix/wordexp-tst.sh ---- glibc-2.12.1.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.12.1/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/patches/glibc/ports-2.12.1/370-fnmatch.patch b/patches/glibc/ports-2.12.1/370-fnmatch.patch deleted file mode 100644 index f345b35..0000000 --- a/patches/glibc/ports-2.12.1/370-fnmatch.patch +++ /dev/null @@ -1,62 +0,0 @@ -http://sourceware.org/ml/libc-hacker/2002-11/msg00071.html - -When fnmatch detects an invalid multibyte character it should fall back to -single byte matching, so that "*" has a chance to match such a string. - -Andreas. - -2005-04-12 Andreas Schwab - - * posix/fnmatch.c (fnmatch): If conversion to wide character - fails fall back to single byte matching. - -Index: posix/fnmatch.c -=================================================================== - -diff -durN glibc-2.12.1.orig/posix/fnmatch.c glibc-2.12.1/posix/fnmatch.c ---- glibc-2.12.1.orig/posix/fnmatch.c 2007-07-28 22:35:00.000000000 +0200 -+++ glibc-2.12.1/posix/fnmatch.c 2009-11-13 00:50:39.000000000 +0100 -@@ -327,6 +327,7 @@ - # if HANDLE_MULTIBYTE - if (__builtin_expect (MB_CUR_MAX, 1) != 1) - { -+ const char *orig_pattern = pattern; - mbstate_t ps; - size_t n; - const char *p; -@@ -382,10 +383,8 @@ - wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); - n = mbsrtowcs (wstring, &p, n + 1, &ps); - if (__builtin_expect (n == (size_t) -1, 0)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- return -1; -+ /* Something wrong. Fall back to single byte matching. */ -+ goto try_singlebyte; - if (p) - { - memset (&ps, '\0', sizeof (ps)); -@@ -397,10 +396,8 @@ - prepare_wstring: - n = mbsrtowcs (NULL, &string, 0, &ps); - if (__builtin_expect (n == (size_t) -1, 0)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- return -1; -+ /* Something wrong. Fall back to single byte matching. */ -+ goto try_singlebyte; - wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); - assert (mbsinit (&ps)); - (void) mbsrtowcs (wstring, &string, n + 1, &ps); -@@ -408,6 +405,9 @@ - - return internal_fnwmatch (wpattern, wstring, wstring + n, - flags & FNM_PERIOD, flags, NULL); -+ -+ try_singlebyte: -+ pattern = orig_pattern; - } - # endif /* mbstate_t and mbsrtowcs or _LIBC. */ - diff --git a/patches/glibc/ports-2.12.1/380-dont-build-timezone.patch b/patches/glibc/ports-2.12.1/380-dont-build-timezone.patch deleted file mode 100644 index 0a30436..0000000 --- a/patches/glibc/ports-2.12.1/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig ---- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/patches/glibc/ports-2.12.1/400-alpha-xstat.patch b/patches/glibc/ports-2.12.1/400-alpha-xstat.patch deleted file mode 100644 index 97bea98..0000000 --- a/patches/glibc/ports-2.12.1/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/patches/glibc/ports-2.12.1/430-alpha-creat.patch b/patches/glibc/ports-2.12.1/430-alpha-creat.patch deleted file mode 100644 index bfb72d0..0000000 --- a/patches/glibc/ports-2.12.1/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/patches/glibc/ports-2.12.1/440-alpha-cache-shape.patch b/patches/glibc/ports-2.12.1/440-alpha-cache-shape.patch deleted file mode 100644 index ea85e99..0000000 --- a/patches/glibc/ports-2.12.1/440-alpha-cache-shape.patch +++ /dev/null @@ -1,13 +0,0 @@ -older verisons of glibc would build dl-sysdep as shared-only and dl-support as -static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of -glibc build dl-sysdep as both shared and static which means we now have symbol -duplication for static builds with dl-sysdep and dl-support. since dl-sysdep -is both shared/static, there is no point in hooking dl-support anymore, so we -can punt it. - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 -@@ -1,2 +1,1 @@ --#include "dl-auxv.h" - #include diff --git a/patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch deleted file mode 100644 index 6438267..0000000 --- a/patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch +++ /dev/null @@ -1,56 +0,0 @@ -2006-05-30 Falk Hueffner - - * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture - to ev6 in assembly code. - -{standard input}: Assembler messages: -{standard input}:341: Error: macro requires $at register while noat in effect -{standard input}:374: Error: macro requires $at register while noat in effect -{standard input}:438: Error: macro requires $at register while noat in effect -{standard input}:471: Error: macro requires $at register while noat in effect -make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 - -Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. -I cannot really think of anything better than - - ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 -@@ -178,13 +178,13 @@ - static inline void - stb_mb(unsigned char val, unsigned long addr) - { -- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); - } - - static inline void - stw_mb(unsigned short val, unsigned long addr) - { -- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); - } - - static inline void -@@ -356,7 +356,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - -- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); -+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; - } - -@@ -366,7 +366,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - -- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); -+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; - } - -diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/patches/glibc/ports-2.12.1/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.12.1/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 9d35ebd..0000000 --- a/patches/glibc/ports-2.12.1/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/patches/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 621a6f3..0000000 --- a/patches/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch +++ /dev/null @@ -1,21 +0,0 @@ -2009-05-26 Aurelien Jarno - - * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). - - ports/sysdeps/alpha/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 -@@ -35,7 +35,8 @@ - - ifeq ($(subdir),elf) - # The ld.so startup code cannot use literals until it self-relocates. --CFLAGS-rtld.c = -mbuild-constants -+# It uses more than 64k for the small data area. -+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) - endif - - # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.12.1.orig/ports/sysdeps/alpha/Makefile glibc-2.12.1/ports/sysdeps/alpha/Makefile diff --git a/patches/glibc/ports-2.12.1/560-ppc-atomic.patch b/patches/glibc/ports-2.12.1/560-ppc-atomic.patch deleted file mode 100644 index 679ef18..0000000 --- a/patches/glibc/ports-2.12.1/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/bits/atomic.h ---- glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.12.1/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/patches/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch deleted file mode 100644 index fc42a92..0000000 --- a/patches/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ /dev/null @@ -1,374 +0,0 @@ -http://yann.poupet.free.fr/ep93xx/ -Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 -@@ -12,7 +12,7 @@ - /* FPA floating point units are always big-endian, irrespective of the - CPU endianness. VFP floating point units use the same endianness - as the rest of the system. */ --#ifdef __VFP_FP__ -+#if defined __VFP_FP__ || defined __MAVERICK__ - #define __FLOAT_WORD_ORDER __BYTE_ORDER - #else - #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -30,7 +30,33 @@ - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -+#ifdef __MAVERICK__ -+ cfldrd mvd4, [ip], #8 -+ nop -+ cfldrd mvd5, [ip], #8 -+ nop -+ cfldrd mvd6, [ip], #8 -+ nop -+ cfldrd mvd7, [ip], #8 -+ nop -+ cfldrd mvd8, [ip], #8 -+ nop -+ cfldrd mvd9, [ip], #8 -+ nop -+ cfldrd mvd10, [ip], #8 -+ nop -+ cfldrd mvd11, [ip], #8 -+ nop -+ cfldrd mvd12, [ip], #8 -+ nop -+ cfldrd mvd13, [ip], #8 -+ nop -+ cfldrd mvd14, [ip], #8 -+ nop -+ cfldrd mvd15, [ip], #8 -+#else - lfmfd f4, 4, [ip] ! /* load the floating point regs */ -+#endif - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) - END (__longjmp) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 -@@ -20,6 +20,45 @@ - # error "Never use directly; include instead." - #endif - -+#if defined(__MAVERICK__) -+ -+/* Define bits representing exceptions in the FPU status word. */ -+enum -+ { -+ FE_INVALID = 1, -+#define FE_INVALID FE_INVALID -+ FE_OVERFLOW = 4, -+#define FE_OVERFLOW FE_OVERFLOW -+ FE_UNDERFLOW = 8, -+#define FE_UNDERFLOW FE_UNDERFLOW -+ FE_INEXACT = 16, -+#define FE_INEXACT FE_INEXACT -+ }; -+ -+/* Amount to shift by to convert an exception to a mask bit. */ -+#define FE_EXCEPT_SHIFT 5 -+ -+/* All supported exceptions. */ -+#define FE_ALL_EXCEPT \ -+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) -+ -+/* IEEE rounding modes. */ -+enum -+ { -+ FE_TONEAREST = 0, -+#define FE_TONEAREST FE_TONEAREST -+ FE_TOWARDZERO = 0x400, -+#define FE_TOWARDZERO FE_TOWARDZERO -+ FE_DOWNWARD = 0x800, -+#define FE_DOWNWARD FE_DOWNWARD -+ FE_UPWARD = 0xc00, -+#define FE_UPWARD FE_UPWARD -+ }; -+ -+#define FE_ROUND_MASK (FE_UPWARD) -+ -+#else /* FPA */ -+ - /* Define bits representing exceptions in the FPU status word. */ - enum - { -@@ -44,6 +83,8 @@ - modes exist, but you have to encode them in the actual instruction. */ - #define FE_TONEAREST 0 - -+#endif -+ - /* Type representing exception flags. */ - typedef unsigned long int fexcept_t; - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 -@@ -28,7 +28,11 @@ - #ifndef _ASM - /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -+#ifdef __MAVERICK__ -+typedef int __jmp_buf[34]; -+#else - typedef int __jmp_buf[22]; - #endif -+#endif - - #endif -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,9 +18,21 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fegetround (void) - { -+#if defined(__MAVERICK__) -+ -+ unsigned long temp; -+ -+ _FPU_GETCW (temp); -+ return temp & FE_ROUND_MASK; -+ -+#else /* FPA */ -+ - return FE_TONEAREST; /* Easy. :-) */ -+ -+#endif - } -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,12 +18,28 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fesetround (int round) - { -+#if defined(__MAVERICK__) -+ unsigned long temp; -+ -+ if (round & ~FE_ROUND_MASK) -+ return 1; -+ -+ _FPU_GETCW (temp); -+ temp = (temp & ~FE_ROUND_MASK) | round; -+ _FPU_SETCW (temp); -+ return 0; -+ -+#else /* FPA */ -+ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -+ -+#endif - } - - libm_hidden_def (fesetround) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 -@@ -1,5 +1,6 @@ - /* FPU control word definitions. ARM version. -- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. -+ Copyright (C) 1996, 1997, 1998, 2000, 2005 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -20,6 +21,79 @@ - #ifndef _FPU_CONTROL_H - #define _FPU_CONTROL_H - -+#if defined(__MAVERICK__) -+ -+/* DSPSC register: (from EP9312 User's Guide) -+ * -+ * bits 31..29 - DAID -+ * bits 28..26 - HVID -+ * bits 25..24 - RSVD -+ * bit 23 - ISAT -+ * bit 22 - UI -+ * bit 21 - INT -+ * bit 20 - AEXC -+ * bits 19..18 - SAT -+ * bits 17..16 - FCC -+ * bit 15 - V -+ * bit 14 - FWDEN -+ * bit 13 - Invalid -+ * bit 12 - Denorm -+ * bits 11..10 - RM -+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE -+ * bits 4..0 - IX, UF, OF, RSVD, IO -+ */ -+ -+/* masking of interrupts */ -+#define _FPU_MASK_IM (1 << 5) /* invalid operation */ -+#define _FPU_MASK_ZM 0 /* divide by zero */ -+#define _FPU_MASK_OM (1 << 7) /* overflow */ -+#define _FPU_MASK_UM (1 << 8) /* underflow */ -+#define _FPU_MASK_PM (1 << 9) /* inexact */ -+#define _FPU_MASK_DM 0 /* denormalized operation */ -+ -+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ -+ -+#define _FPU_DEFAULT 0x00b00000 /* Default value. */ -+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ -+ -+/* Type of the control word. */ -+typedef unsigned int fpu_control_t; -+ -+/* Macros for accessing the hardware control word. */ -+#define _FPU_GETCW(cw) ({ \ -+ register int __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv32sc mvdx0, dspsc\n\t" \ -+ "cfmvr64l %0, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ -+ ); \ -+}) -+ -+#define _FPU_SETCW(cw) ({ \ -+ register int __t0, __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %0\n\t" \ -+ "cfmvsc32 dspsc, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ -+ : "0" (cw) \ -+ ); \ -+}) -+ -+/* Default control word set at startup. */ -+extern fpu_control_t __fpu_control; -+ -+#else /* FPA */ -+ - /* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only -@@ -99,4 +173,6 @@ - /* Default control word set at startup. */ - extern fpu_control_t __fpu_control; - -+#endif -+ - #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,4 +17,8 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define __JMP_BUF_SP 32 -+#else - #define __JMP_BUF_SP 20 -+#endif -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -24,11 +24,41 @@ - - ENTRY (__sigsetjmp) - /* Save registers */ -+#ifdef __MAVERICK__ -+ cfstrd mvd4, [r0], #8 -+ nop -+ cfstrd mvd5, [r0], #8 -+ nop -+ cfstrd mvd6, [r0], #8 -+ nop -+ cfstrd mvd7, [r0], #8 -+ nop -+ cfstrd mvd8, [r0], #8 -+ nop -+ cfstrd mvd9, [r0], #8 -+ nop -+ cfstrd mvd10, [r0], #8 -+ nop -+ cfstrd mvd11, [r0], #8 -+ nop -+ cfstrd mvd12, [r0], #8 -+ nop -+ cfstrd mvd13, [r0], #8 -+ nop -+ cfstrd mvd14, [r0], #8 -+ nop -+ cfstrd mvd15, [r0], #8 -+#else - sfmea f4, 4, [r0]! -+#endif - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ -+#ifdef __MAVERICK__ -+ sub r0, r0, #96 -+#else - sub r0, r0, #48 -+#endif - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,6 +17,10 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define FIRST_PSEUDO_REGISTER 43 -+#else - #define FIRST_PSEUDO_REGISTER 27 -+#endif - - #include -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 -@@ -29,7 +29,7 @@ - #if defined(__ARMEB__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 1 --#elif defined(__VFP_FP__) -+#elif defined(__VFP_FP__) || defined(__MAVERICK__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 0 - #else -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.12.1/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.12.1/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.12.1/ports/sysdeps/arm/gmp-mparam.h diff --git a/patches/glibc/ports-2.12.1/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.12.1/580-nptl-lowlevellock.patch deleted file mode 100644 index c243a76..0000000 --- a/patches/glibc/ports-2.12.1/580-nptl-lowlevellock.patch +++ /dev/null @@ -1,23 +0,0 @@ -fix build error on arm like on hppa: - -arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include /* Need THREAD_*, and header.*. */ - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 -diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/patches/glibc/ports-2.12.1/610-fpu-cw-mips.patch b/patches/glibc/ports-2.12.1/610-fpu-cw-mips.patch deleted file mode 100644 index 7d990de..0000000 --- a/patches/glibc/ports-2.12.1/610-fpu-cw-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html - -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 -@@ -86,7 +86,7 @@ - #define _FPU_RC_UP 0x2 - #define _FPU_RC_DOWN 0x3 - --#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ -+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ - - - /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.12.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.12.1/ports/sysdeps/mips/fpu_control.h diff --git a/patches/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch deleted file mode 100644 index f6a5eb6..0000000 --- a/patches/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.12.1.orig/elf/dl-lookup.c glibc-2.12.1/elf/dl-lookup.c ---- glibc-2.12.1.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.12.1/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/patches/glibc/ports-2.12.1/640-alpha-atfcts.patch b/patches/glibc/ports-2.12.1/640-alpha-atfcts.patch deleted file mode 100644 index 90a9d0d..0000000 --- a/patches/glibc/ports-2.12.1/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/ports-2.12.1/650-syslog.patch b/patches/glibc/ports-2.12.1/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/patches/glibc/ports-2.12.1/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/patches/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/patches/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch b/patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch deleted file mode 100644 index 3f2bc0f..0000000 --- a/patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -ur glibc-2.12.1/ports/sysdeps/arm/preconfigure glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure ---- glibc-2.12.1/ports/sysdeps/arm/preconfigure 2017-03-07 15:33:56.410265000 -0700 -+++ glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:34:42.016840000 -0700 -@@ -2,7 +2,7 @@ - arm*) - base_machine=arm - case $config_os in -- linux-gnueabi) -+ linux-gnueabi*) - machine=arm/eabi/$machine - ;; - *) -diff -ur glibc-2.12.1/ports/sysdeps/arm/shlib-versions glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions ---- glibc-2.12.1/ports/sysdeps/arm/shlib-versions 2017-03-07 15:33:56.439267000 -0700 -+++ glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:34:42.018837000 -0700 -@@ -1,4 +1,4 @@ --arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 -+arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 - --arm.*-.*-linux-gnueabi ld=ld-linux.so.3 -+arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 - arm.*-.*-linux.* ld=ld-linux.so.2 diff --git a/patches/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 1a632fe..0000000 --- a/patches/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/patches/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/patches/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/patches/glibc/ports-2.13/160-manual-no-perl.patch b/patches/glibc/ports-2.13/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/patches/glibc/ports-2.13/160-manual-no-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -If we're using a cvs snapshot which updates the source files, and -perl isn't installed yet, then we can't regen the docs. Not a big -deal, so just whine a little and continue on our merry way. - -http://bugs.gentoo.org/60132 - -diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 -@@ -104,9 +104,14 @@ - libm-err.texi: stamp-libm-err - stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ - $(dir)/libm-test-ulps)) -+ifneq ($(PERL),no) - pwd=`pwd`; \ - $(PERL) $< $$pwd/.. > libm-err-tmp - $(move-if-change) libm-err-tmp libm-err.texi -+else -+ echo "Unable to rebuild math docs, no perl installed" -+ touch libm-err.texi -+endif - touch $@ - - # Generate Texinfo files from the C source for the example programs. diff --git a/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/patches/glibc/ports-2.13/180-resolv-dynamic.patch b/patches/glibc/ports-2.13/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/patches/glibc/ports-2.13/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/patches/glibc/ports-2.13/190-localedef-mmap.patch b/patches/glibc/ports-2.13/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/patches/glibc/ports-2.13/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c ---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/patches/glibc/ports-2.13/200-fadvise64_64.patch b/patches/glibc/ports-2.13/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/patches/glibc/ports-2.13/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/patches/glibc/ports-2.13/220-section-comments.patch b/patches/glibc/ports-2.13/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/patches/glibc/ports-2.13/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/patches/glibc/ports-2.13/230-no-inline-gmon.patch b/patches/glibc/ports-2.13/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/patches/glibc/ports-2.13/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/patches/glibc/ports-2.13/240-check_native-headers.patch b/patches/glibc/ports-2.13/240-check_native-headers.patch deleted file mode 100644 index c936f71..0000000 --- a/patches/glibc/ports-2.13/240-check_native-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -many ports hit this warning: -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' - -snipped from suse - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/patches/glibc/ports-2.13/250-fix-pr631.patch b/patches/glibc/ports-2.13/250-fix-pr631.patch deleted file mode 100644 index a48912e..0000000 --- a/patches/glibc/ports-2.13/250-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -@@ -531,7 +531,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... -diff -durN glibc-2.13.orig/elf/Makefile glibc-2.13/elf/Makefile ---- glibc-2.13.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 -+++ glibc-2.13/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 -@@ -146,6 +146,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln diff --git a/patches/glibc/ports-2.13/260-assume-pipe2.patch b/patches/glibc/ports-2.13/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/patches/glibc/ports-2.13/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/patches/glibc/ports-2.13/270-china.patch b/patches/glibc/ports-2.13/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/patches/glibc/ports-2.13/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/patches/glibc/ports-2.13/280-new-valencian-locale.patch b/patches/glibc/ports-2.13/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/patches/glibc/ports-2.13/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/patches/glibc/ports-2.13/300-nscd-one-fork.patch b/patches/glibc/ports-2.13/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/patches/glibc/ports-2.13/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/patches/glibc/ports-2.13/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.13/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/patches/glibc/ports-2.13/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/patches/glibc/ports-2.13/330-m68k-sys-user.patch b/patches/glibc/ports-2.13/330-m68k-sys-user.patch deleted file mode 100644 index 191e0c6..0000000 --- a/patches/glibc/ports-2.13/330-m68k-sys-user.patch +++ /dev/null @@ -1,97 +0,0 @@ -copied from kernel as it is sanitized now - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 -@@ -1,3 +1,90 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+/* Core file format: The core file is written in such a way that gdb -+ can understand it and provide useful information to the user (under -+ linux we use the 'trad-core' bfd). There are quite a number of -+ obstacles to being able to view the contents of the floating point -+ registers, and until these are solved you will not be able to view the -+ contents of them. Actually, you can read in the core file and look at -+ the contents of the user struct to find out what the floating point -+ registers contain. -+ The actual file contents are as follows: -+ UPAGE: 1 page consisting of a user struct that tells gdb what is present -+ in the file. Directly after this is a copy of the task_struct, which -+ is currently not used by gdb, but it may come in useful at some point. -+ All of the registers are stored as part of the upage. The upage should -+ always be only one page. -+ DATA: The data area is stored. We use current->end_text to -+ current->brk to pick up all of the user variables, plus any memory -+ that may have been malloced. No attempt is made to determine if a page -+ is demand-zero or if a page is totally unused, we just cover the entire -+ range. All of the addresses are rounded in such a way that an integral -+ number of pages is written. -+ STACK: We need the stack information in order to get a meaningful -+ backtrace. We need to write the data from (esp) to -+ current->start_stack, so we round each of these off in order to be able -+ to write an integer number of pages. -+ The minimum core file size is 3 pages, or 12288 bytes. -+*/ -+ -+struct user_m68kfp_struct { -+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ -+ unsigned long fpcntl[3]; /* fp control regs */ -+}; -+ -+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and -+ is still the layout used by user (the new pt_regs doesn't have -+ all registers). */ -+struct user_regs_struct { -+ long d1,d2,d3,d4,d5,d6,d7; -+ long a0,a1,a2,a3,a4,a5,a6; -+ long d0; -+ long usp; -+ long orig_d0; -+ short stkadj; -+ short sr; -+ long pc; -+ short fmtvec; -+ short __fill; -+}; -+ -+ -+/* When the kernel dumps core, it starts by dumping the user struct - -+ this will be used by gdb to figure out where the data and stack segments -+ are within the file, and what virtual addresses to use. */ -+struct user{ -+/* We start with the registers, to mimic the way that "memory" is returned -+ from the ptrace(3,...) function. */ -+ struct user_regs_struct regs; /* Where the registers are actually stored */ -+/* ptrace does not yet supply these. Someday.... */ -+ int u_fpvalid; /* True if math co-processor being used. */ -+ /* for this mess. Not yet used. */ -+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ -+/* The rest of this junk is to help gdb figure out what goes where */ -+ unsigned long int u_tsize; /* Text segment size (pages). */ -+ unsigned long int u_dsize; /* Data segment size (pages). */ -+ unsigned long int u_ssize; /* Stack segment size (pages). */ -+ unsigned long start_code; /* Starting virtual address of text. */ -+ unsigned long start_stack; /* Starting virtual address of stack area. -+ This is actually the bottom of the stack, -+ the top of the stack is always found in the -+ esp register. */ -+ long int signal; /* Signal that caused the core dump. */ -+ int reserved; /* No longer used */ -+ struct user_regs_struct *u_ar0; -+ /* Used by gdb to help find the values for */ -+ /* the registers. */ -+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ -+ unsigned long magic; /* To uniquely identify a core file */ -+ char u_comm[32]; /* User command that was responsible */ -+}; -+#define NBPG 4096 -+#define UPAGES 1 -+#define HOST_TEXT_START_ADDR (u.start_code) -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -+ -+#endif - /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/patches/glibc/ports-2.13/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.13/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/patches/glibc/ports-2.13/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/patches/glibc/ports-2.13/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.13/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/patches/glibc/ports-2.13/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/patches/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/patches/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/patches/glibc/ports-2.13/380-dont-build-timezone.patch b/patches/glibc/ports-2.13/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/patches/glibc/ports-2.13/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/patches/glibc/ports-2.13/400-alpha-xstat.patch b/patches/glibc/ports-2.13/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/patches/glibc/ports-2.13/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch b/patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch deleted file mode 100644 index fd55537..0000000 --- a/patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch +++ /dev/null @@ -1,19 +0,0 @@ -2011-02-28 Aurelien Jarno - - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ, - F_GETPIPE_SZ): Define. - -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h -index 860e9ac..e5e726b 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h -@@ -97,6 +97,8 @@ - # define F_SETLEASE 1024 /* Set a lease. */ - # define F_GETLEASE 1025 /* Enquire what lease is active. */ - # define F_NOTIFY 1026 /* Request notfications on a directory. */ -+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ -+# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ - #endif - #ifdef __USE_XOPEN2K8 - # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with - diff --git a/patches/glibc/ports-2.13/420-alpha-statfs.patch b/patches/glibc/ports-2.13/420-alpha-statfs.patch deleted file mode 100644 index 65c925a..0000000 --- a/patches/glibc/ports-2.13/420-alpha-statfs.patch +++ /dev/null @@ -1,29 +0,0 @@ -2011-02-28 Aurelien Jarno - - * sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs, - struct statfs64): Add f_flags field. - -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h -index d838e6b..157591d 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h -@@ -42,7 +42,8 @@ struct statfs - __fsid_t f_fsid; - int f_namelen; - int f_frsize; -- int f_spare[5]; -+ int f_flags; -+ int f_spare[4]; - }; - - #ifdef __USE_LARGEFILE64 -@@ -58,7 +59,8 @@ struct statfs64 - __fsid_t f_fsid; - int f_namelen; - int f_frsize; -- int f_spare[5]; -+ int f_flags; -+ int f_spare[4]; - }; - #endif - diff --git a/patches/glibc/ports-2.13/430-alpha-creat.patch b/patches/glibc/ports-2.13/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/patches/glibc/ports-2.13/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/patches/glibc/ports-2.13/440-alpha-cache-shape.patch b/patches/glibc/ports-2.13/440-alpha-cache-shape.patch deleted file mode 100644 index 62ade7b..0000000 --- a/patches/glibc/ports-2.13/440-alpha-cache-shape.patch +++ /dev/null @@ -1,13 +0,0 @@ -older verisons of glibc would build dl-sysdep as shared-only and dl-support as -static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of -glibc build dl-sysdep as both shared and static which means we now have symbol -duplication for static builds with dl-sysdep and dl-support. since dl-sysdep -is both shared/static, there is no point in hooking dl-support anymore, so we -can punt it. - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 -@@ -1,2 +1,1 @@ --#include "dl-auxv.h" - #include diff --git a/patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch b/patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch deleted file mode 100644 index ac3ea9a..0000000 --- a/patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch +++ /dev/null @@ -1,23 +0,0 @@ -2011-02-28 Aurelien Jarno - - * sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. - -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h -index 0a281bd..d9dbc35 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h -@@ -22,7 +22,13 @@ - #ifndef _STACKINFO_H - #define _STACKINFO_H 1 - -+#include -+ - /* On Alpha the stack grows down. */ - #define _STACK_GROWS_DOWN 1 - -+/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is -+ * present, but it is presumed absent. */ -+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) -+ - #endif /* stackinfo.h */ - diff --git a/patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch deleted file mode 100644 index 313e0e0..0000000 --- a/patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch +++ /dev/null @@ -1,56 +0,0 @@ -2006-05-30 Falk Hueffner - - * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture - to ev6 in assembly code. - -{standard input}: Assembler messages: -{standard input}:341: Error: macro requires $at register while noat in effect -{standard input}:374: Error: macro requires $at register while noat in effect -{standard input}:438: Error: macro requires $at register while noat in effect -{standard input}:471: Error: macro requires $at register while noat in effect -make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 - -Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. -I cannot really think of anything better than - - ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 -@@ -178,13 +178,13 @@ - static inline void - stb_mb(unsigned char val, unsigned long addr) - { -- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); - } - - static inline void - stw_mb(unsigned short val, unsigned long addr) - { -- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); - } - - static inline void -@@ -356,7 +356,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - -- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); -+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; - } - -@@ -366,7 +366,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - -- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); -+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; - } - -diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/patches/glibc/ports-2.13/470-alpha-feupdateenv.patch b/patches/glibc/ports-2.13/470-alpha-feupdateenv.patch deleted file mode 100644 index 45a7051..0000000 --- a/patches/glibc/ports-2.13/470-alpha-feupdateenv.patch +++ /dev/null @@ -1,26 +0,0 @@ -2011-03-01 Aurelien Jarno - - * sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add - libm_hidden_def. - * sysdeps/alpha/fpu/ftestexcept.c (fetestexcept): Likewise. - -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c -index c798070..9abbf11 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c -@@ -46,4 +46,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) - compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); - #endif - -+libm_hidden_ver (__feupdateenv, feupdateenv) - versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c -index a4b3081..34d8113 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c -@@ -30,3 +30,4 @@ fetestexcept (int excepts) - - return tmp & excepts & SWCR_STATUS_MASK; - } -+libm_hidden_def (fetestexcept) - diff --git a/patches/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 372f34c..0000000 --- a/patches/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/patches/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index b2ae9b5..0000000 --- a/patches/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch +++ /dev/null @@ -1,21 +0,0 @@ -2009-05-26 Aurelien Jarno - - * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). - - ports/sysdeps/alpha/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 -@@ -35,7 +35,8 @@ - - ifeq ($(subdir),elf) - # The ld.so startup code cannot use literals until it self-relocates. --CFLAGS-rtld.c = -mbuild-constants -+# It uses more than 64k for the small data area. -+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) - endif - - # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.13.orig/ports/sysdeps/alpha/Makefile glibc-2.13/ports/sysdeps/alpha/Makefile diff --git a/patches/glibc/ports-2.13/560-ppc-atomic.patch b/patches/glibc/ports-2.13/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/patches/glibc/ports-2.13/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/patches/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch deleted file mode 100644 index 4f4dbec..0000000 --- a/patches/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ /dev/null @@ -1,374 +0,0 @@ -http://yann.poupet.free.fr/ep93xx/ -Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 -@@ -12,7 +12,7 @@ - /* FPA floating point units are always big-endian, irrespective of the - CPU endianness. VFP floating point units use the same endianness - as the rest of the system. */ --#ifdef __VFP_FP__ -+#if defined __VFP_FP__ || defined __MAVERICK__ - #define __FLOAT_WORD_ORDER __BYTE_ORDER - #else - #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -30,7 +30,33 @@ - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -+#ifdef __MAVERICK__ -+ cfldrd mvd4, [ip], #8 -+ nop -+ cfldrd mvd5, [ip], #8 -+ nop -+ cfldrd mvd6, [ip], #8 -+ nop -+ cfldrd mvd7, [ip], #8 -+ nop -+ cfldrd mvd8, [ip], #8 -+ nop -+ cfldrd mvd9, [ip], #8 -+ nop -+ cfldrd mvd10, [ip], #8 -+ nop -+ cfldrd mvd11, [ip], #8 -+ nop -+ cfldrd mvd12, [ip], #8 -+ nop -+ cfldrd mvd13, [ip], #8 -+ nop -+ cfldrd mvd14, [ip], #8 -+ nop -+ cfldrd mvd15, [ip], #8 -+#else - lfmfd f4, 4, [ip] ! /* load the floating point regs */ -+#endif - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) - END (__longjmp) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 -@@ -20,6 +20,45 @@ - # error "Never use directly; include instead." - #endif - -+#if defined(__MAVERICK__) -+ -+/* Define bits representing exceptions in the FPU status word. */ -+enum -+ { -+ FE_INVALID = 1, -+#define FE_INVALID FE_INVALID -+ FE_OVERFLOW = 4, -+#define FE_OVERFLOW FE_OVERFLOW -+ FE_UNDERFLOW = 8, -+#define FE_UNDERFLOW FE_UNDERFLOW -+ FE_INEXACT = 16, -+#define FE_INEXACT FE_INEXACT -+ }; -+ -+/* Amount to shift by to convert an exception to a mask bit. */ -+#define FE_EXCEPT_SHIFT 5 -+ -+/* All supported exceptions. */ -+#define FE_ALL_EXCEPT \ -+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) -+ -+/* IEEE rounding modes. */ -+enum -+ { -+ FE_TONEAREST = 0, -+#define FE_TONEAREST FE_TONEAREST -+ FE_TOWARDZERO = 0x400, -+#define FE_TOWARDZERO FE_TOWARDZERO -+ FE_DOWNWARD = 0x800, -+#define FE_DOWNWARD FE_DOWNWARD -+ FE_UPWARD = 0xc00, -+#define FE_UPWARD FE_UPWARD -+ }; -+ -+#define FE_ROUND_MASK (FE_UPWARD) -+ -+#else /* FPA */ -+ - /* Define bits representing exceptions in the FPU status word. */ - enum - { -@@ -44,6 +83,8 @@ - modes exist, but you have to encode them in the actual instruction. */ - #define FE_TONEAREST 0 - -+#endif -+ - /* Type representing exception flags. */ - typedef unsigned long int fexcept_t; - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 -@@ -28,7 +28,11 @@ - #ifndef _ASM - /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -+#ifdef __MAVERICK__ -+typedef int __jmp_buf[34]; -+#else - typedef int __jmp_buf[22]; - #endif -+#endif - - #endif -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,9 +18,21 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fegetround (void) - { -+#if defined(__MAVERICK__) -+ -+ unsigned long temp; -+ -+ _FPU_GETCW (temp); -+ return temp & FE_ROUND_MASK; -+ -+#else /* FPA */ -+ - return FE_TONEAREST; /* Easy. :-) */ -+ -+#endif - } -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,12 +18,28 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fesetround (int round) - { -+#if defined(__MAVERICK__) -+ unsigned long temp; -+ -+ if (round & ~FE_ROUND_MASK) -+ return 1; -+ -+ _FPU_GETCW (temp); -+ temp = (temp & ~FE_ROUND_MASK) | round; -+ _FPU_SETCW (temp); -+ return 0; -+ -+#else /* FPA */ -+ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -+ -+#endif - } - - libm_hidden_def (fesetround) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 -@@ -1,5 +1,6 @@ - /* FPU control word definitions. ARM version. -- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. -+ Copyright (C) 1996, 1997, 1998, 2000, 2005 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -20,6 +21,79 @@ - #ifndef _FPU_CONTROL_H - #define _FPU_CONTROL_H - -+#if defined(__MAVERICK__) -+ -+/* DSPSC register: (from EP9312 User's Guide) -+ * -+ * bits 31..29 - DAID -+ * bits 28..26 - HVID -+ * bits 25..24 - RSVD -+ * bit 23 - ISAT -+ * bit 22 - UI -+ * bit 21 - INT -+ * bit 20 - AEXC -+ * bits 19..18 - SAT -+ * bits 17..16 - FCC -+ * bit 15 - V -+ * bit 14 - FWDEN -+ * bit 13 - Invalid -+ * bit 12 - Denorm -+ * bits 11..10 - RM -+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE -+ * bits 4..0 - IX, UF, OF, RSVD, IO -+ */ -+ -+/* masking of interrupts */ -+#define _FPU_MASK_IM (1 << 5) /* invalid operation */ -+#define _FPU_MASK_ZM 0 /* divide by zero */ -+#define _FPU_MASK_OM (1 << 7) /* overflow */ -+#define _FPU_MASK_UM (1 << 8) /* underflow */ -+#define _FPU_MASK_PM (1 << 9) /* inexact */ -+#define _FPU_MASK_DM 0 /* denormalized operation */ -+ -+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ -+ -+#define _FPU_DEFAULT 0x00b00000 /* Default value. */ -+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ -+ -+/* Type of the control word. */ -+typedef unsigned int fpu_control_t; -+ -+/* Macros for accessing the hardware control word. */ -+#define _FPU_GETCW(cw) ({ \ -+ register int __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv32sc mvdx0, dspsc\n\t" \ -+ "cfmvr64l %0, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ -+ ); \ -+}) -+ -+#define _FPU_SETCW(cw) ({ \ -+ register int __t0, __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %0\n\t" \ -+ "cfmvsc32 dspsc, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ -+ : "0" (cw) \ -+ ); \ -+}) -+ -+/* Default control word set at startup. */ -+extern fpu_control_t __fpu_control; -+ -+#else /* FPA */ -+ - /* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only -@@ -99,4 +173,6 @@ - /* Default control word set at startup. */ - extern fpu_control_t __fpu_control; - -+#endif -+ - #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,4 +17,8 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define __JMP_BUF_SP 32 -+#else - #define __JMP_BUF_SP 20 -+#endif -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -24,11 +24,41 @@ - - ENTRY (__sigsetjmp) - /* Save registers */ -+#ifdef __MAVERICK__ -+ cfstrd mvd4, [r0], #8 -+ nop -+ cfstrd mvd5, [r0], #8 -+ nop -+ cfstrd mvd6, [r0], #8 -+ nop -+ cfstrd mvd7, [r0], #8 -+ nop -+ cfstrd mvd8, [r0], #8 -+ nop -+ cfstrd mvd9, [r0], #8 -+ nop -+ cfstrd mvd10, [r0], #8 -+ nop -+ cfstrd mvd11, [r0], #8 -+ nop -+ cfstrd mvd12, [r0], #8 -+ nop -+ cfstrd mvd13, [r0], #8 -+ nop -+ cfstrd mvd14, [r0], #8 -+ nop -+ cfstrd mvd15, [r0], #8 -+#else - sfmea f4, 4, [r0]! -+#endif - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ -+#ifdef __MAVERICK__ -+ sub r0, r0, #96 -+#else - sub r0, r0, #48 -+#endif - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,6 +17,10 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define FIRST_PSEUDO_REGISTER 43 -+#else - #define FIRST_PSEUDO_REGISTER 27 -+#endif - - #include -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 -@@ -29,7 +29,7 @@ - #if defined(__ARMEB__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 1 --#elif defined(__VFP_FP__) -+#elif defined(__VFP_FP__) || defined(__MAVERICK__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 0 - #else -diff -durN glibc-2.13.orig/ports/sysdeps/arm/bits/endian.h glibc-2.13/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.13/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.13/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.13/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.13/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.13/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.13.orig/ports/sysdeps/arm/gccframe.h glibc-2.13/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.13/ports/sysdeps/arm/gmp-mparam.h diff --git a/patches/glibc/ports-2.13/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.13/580-nptl-lowlevellock.patch deleted file mode 100644 index 08518e9..0000000 --- a/patches/glibc/ports-2.13/580-nptl-lowlevellock.patch +++ /dev/null @@ -1,23 +0,0 @@ -fix build error on arm like on hppa: - -arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include /* Need THREAD_*, and header.*. */ - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 -diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/patches/glibc/ports-2.13/610-fpu-cw-mips.patch b/patches/glibc/ports-2.13/610-fpu-cw-mips.patch deleted file mode 100644 index cd2b4d9..0000000 --- a/patches/glibc/ports-2.13/610-fpu-cw-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html - -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 -@@ -86,7 +86,7 @@ - #define _FPU_RC_UP 0x2 - #define _FPU_RC_DOWN 0x3 - --#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ -+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ - - - /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.13.orig/ports/sysdeps/mips/fpu_control.h glibc-2.13/ports/sysdeps/mips/fpu_control.h diff --git a/patches/glibc/ports-2.13/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.13/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/patches/glibc/ports-2.13/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/patches/glibc/ports-2.13/640-alpha-atfcts.patch b/patches/glibc/ports-2.13/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/patches/glibc/ports-2.13/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/ports-2.13/650-syslog.patch b/patches/glibc/ports-2.13/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/patches/glibc/ports-2.13/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/patches/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/patches/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/patches/glibc/ports-2.13/670-support-hard-float-eabi.patch b/patches/glibc/ports-2.13/670-support-hard-float-eabi.patch deleted file mode 100644 index 589f11e..0000000 --- a/patches/glibc/ports-2.13/670-support-hard-float-eabi.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -ur glibc-2.13/ports/sysdeps/arm/preconfigure glibc-2.13-patched/ports/sysdeps/arm/preconfigure ---- glibc-2.13/ports/sysdeps/arm/preconfigure 2011-01-25 14:00:16.000000000 -0700 -+++ glibc-2.13-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:36:50.310454000 -0700 -@@ -2,7 +2,7 @@ - arm*) - base_machine=arm - case $config_os in -- linux-gnueabi) -+ linux-gnueabi*) - machine=arm/eabi/$machine - if [ "${CFLAGS+set}" != "set" ]; then - CFLAGS="-g -O2" -diff -ur glibc-2.13/ports/sysdeps/arm/shlib-versions glibc-2.13-patched/ports/sysdeps/arm/shlib-versions ---- glibc-2.13/ports/sysdeps/arm/shlib-versions 2011-01-25 14:00:16.000000000 -0700 -+++ glibc-2.13-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:36:50.312457000 -0700 -@@ -1,4 +1,4 @@ --arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 -+arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 - --arm.*-.*-linux-gnueabi ld=ld-linux.so.3 -+arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 - arm.*-.*-linux.* ld=ld-linux.so.2 diff --git a/patches/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 1a632fe..0000000 --- a/patches/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/patches/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/patches/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/patches/glibc/ports-2.14.1/160-manual-no-perl.patch b/patches/glibc/ports-2.14.1/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/patches/glibc/ports-2.14.1/160-manual-no-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -If we're using a cvs snapshot which updates the source files, and -perl isn't installed yet, then we can't regen the docs. Not a big -deal, so just whine a little and continue on our merry way. - -http://bugs.gentoo.org/60132 - -diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 -@@ -104,9 +104,14 @@ - libm-err.texi: stamp-libm-err - stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ - $(dir)/libm-test-ulps)) -+ifneq ($(PERL),no) - pwd=`pwd`; \ - $(PERL) $< $$pwd/.. > libm-err-tmp - $(move-if-change) libm-err-tmp libm-err.texi -+else -+ echo "Unable to rebuild math docs, no perl installed" -+ touch libm-err.texi -+endif - touch $@ - - # Generate Texinfo files from the C source for the example programs. diff --git a/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/patches/glibc/ports-2.14.1/180-resolv-dynamic.patch b/patches/glibc/ports-2.14.1/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/patches/glibc/ports-2.14.1/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/patches/glibc/ports-2.14.1/190-localedef-mmap.patch b/patches/glibc/ports-2.14.1/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/patches/glibc/ports-2.14.1/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c ---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/patches/glibc/ports-2.14.1/200-fadvise64_64.patch b/patches/glibc/ports-2.14.1/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/patches/glibc/ports-2.14.1/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/patches/glibc/ports-2.14.1/220-section-comments.patch b/patches/glibc/ports-2.14.1/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/patches/glibc/ports-2.14.1/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/patches/glibc/ports-2.14.1/230-no-inline-gmon.patch b/patches/glibc/ports-2.14.1/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/patches/glibc/ports-2.14.1/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/patches/glibc/ports-2.14.1/260-assume-pipe2.patch b/patches/glibc/ports-2.14.1/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/patches/glibc/ports-2.14.1/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/patches/glibc/ports-2.14.1/270-china.patch b/patches/glibc/ports-2.14.1/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/patches/glibc/ports-2.14.1/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/patches/glibc/ports-2.14.1/280-new-valencian-locale.patch b/patches/glibc/ports-2.14.1/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/patches/glibc/ports-2.14.1/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/patches/glibc/ports-2.14.1/300-nscd-one-fork.patch b/patches/glibc/ports-2.14.1/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/patches/glibc/ports-2.14.1/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/patches/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/patches/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/patches/glibc/ports-2.14.1/330-m68k-sys-user.patch b/patches/glibc/ports-2.14.1/330-m68k-sys-user.patch deleted file mode 100644 index 8fbe2e5..0000000 --- a/patches/glibc/ports-2.14.1/330-m68k-sys-user.patch +++ /dev/null @@ -1,97 +0,0 @@ -copied from kernel as it is sanitized now - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 -@@ -1,3 +1,90 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+/* Core file format: The core file is written in such a way that gdb -+ can understand it and provide useful information to the user (under -+ linux we use the 'trad-core' bfd). There are quite a number of -+ obstacles to being able to view the contents of the floating point -+ registers, and until these are solved you will not be able to view the -+ contents of them. Actually, you can read in the core file and look at -+ the contents of the user struct to find out what the floating point -+ registers contain. -+ The actual file contents are as follows: -+ UPAGE: 1 page consisting of a user struct that tells gdb what is present -+ in the file. Directly after this is a copy of the task_struct, which -+ is currently not used by gdb, but it may come in useful at some point. -+ All of the registers are stored as part of the upage. The upage should -+ always be only one page. -+ DATA: The data area is stored. We use current->end_text to -+ current->brk to pick up all of the user variables, plus any memory -+ that may have been malloced. No attempt is made to determine if a page -+ is demand-zero or if a page is totally unused, we just cover the entire -+ range. All of the addresses are rounded in such a way that an integral -+ number of pages is written. -+ STACK: We need the stack information in order to get a meaningful -+ backtrace. We need to write the data from (esp) to -+ current->start_stack, so we round each of these off in order to be able -+ to write an integer number of pages. -+ The minimum core file size is 3 pages, or 12288 bytes. -+*/ -+ -+struct user_m68kfp_struct { -+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ -+ unsigned long fpcntl[3]; /* fp control regs */ -+}; -+ -+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and -+ is still the layout used by user (the new pt_regs doesn't have -+ all registers). */ -+struct user_regs_struct { -+ long d1,d2,d3,d4,d5,d6,d7; -+ long a0,a1,a2,a3,a4,a5,a6; -+ long d0; -+ long usp; -+ long orig_d0; -+ short stkadj; -+ short sr; -+ long pc; -+ short fmtvec; -+ short __fill; -+}; -+ -+ -+/* When the kernel dumps core, it starts by dumping the user struct - -+ this will be used by gdb to figure out where the data and stack segments -+ are within the file, and what virtual addresses to use. */ -+struct user{ -+/* We start with the registers, to mimic the way that "memory" is returned -+ from the ptrace(3,...) function. */ -+ struct user_regs_struct regs; /* Where the registers are actually stored */ -+/* ptrace does not yet supply these. Someday.... */ -+ int u_fpvalid; /* True if math co-processor being used. */ -+ /* for this mess. Not yet used. */ -+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ -+/* The rest of this junk is to help gdb figure out what goes where */ -+ unsigned long int u_tsize; /* Text segment size (pages). */ -+ unsigned long int u_dsize; /* Data segment size (pages). */ -+ unsigned long int u_ssize; /* Stack segment size (pages). */ -+ unsigned long start_code; /* Starting virtual address of text. */ -+ unsigned long start_stack; /* Starting virtual address of stack area. -+ This is actually the bottom of the stack, -+ the top of the stack is always found in the -+ esp register. */ -+ long int signal; /* Signal that caused the core dump. */ -+ int reserved; /* No longer used */ -+ struct user_regs_struct *u_ar0; -+ /* Used by gdb to help find the values for */ -+ /* the registers. */ -+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ -+ unsigned long magic; /* To uniquely identify a core file */ -+ char u_comm[32]; /* User command that was responsible */ -+}; -+#define NBPG 4096 -+#define UPAGES 1 -+#define HOST_TEXT_START_ADDR (u.start_code) -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -+ -+#endif - /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/patches/glibc/ports-2.14.1/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.14.1/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/patches/glibc/ports-2.14.1/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/patches/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/patches/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/patches/glibc/ports-2.14.1/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.14.1/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/patches/glibc/ports-2.14.1/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/patches/glibc/ports-2.14.1/380-dont-build-timezone.patch b/patches/glibc/ports-2.14.1/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/patches/glibc/ports-2.14.1/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/patches/glibc/ports-2.14.1/400-alpha-xstat.patch b/patches/glibc/ports-2.14.1/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/patches/glibc/ports-2.14.1/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/patches/glibc/ports-2.14.1/430-alpha-creat.patch b/patches/glibc/ports-2.14.1/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/patches/glibc/ports-2.14.1/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/patches/glibc/ports-2.14.1/440-alpha-cache-shape.patch b/patches/glibc/ports-2.14.1/440-alpha-cache-shape.patch deleted file mode 100644 index 8ca0bd6..0000000 --- a/patches/glibc/ports-2.14.1/440-alpha-cache-shape.patch +++ /dev/null @@ -1,13 +0,0 @@ -older verisons of glibc would build dl-sysdep as shared-only and dl-support as -static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of -glibc build dl-sysdep as both shared and static which means we now have symbol -duplication for static builds with dl-sysdep and dl-support. since dl-sysdep -is both shared/static, there is no point in hooking dl-support anymore, so we -can punt it. - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 -@@ -1,2 +1,1 @@ --#include "dl-auxv.h" - #include diff --git a/patches/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch deleted file mode 100644 index c3e59f4..0000000 --- a/patches/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch +++ /dev/null @@ -1,56 +0,0 @@ -2006-05-30 Falk Hueffner - - * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture - to ev6 in assembly code. - -{standard input}: Assembler messages: -{standard input}:341: Error: macro requires $at register while noat in effect -{standard input}:374: Error: macro requires $at register while noat in effect -{standard input}:438: Error: macro requires $at register while noat in effect -{standard input}:471: Error: macro requires $at register while noat in effect -make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 - -Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. -I cannot really think of anything better than - - ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 -@@ -178,13 +178,13 @@ - static inline void - stb_mb(unsigned char val, unsigned long addr) - { -- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); - } - - static inline void - stw_mb(unsigned short val, unsigned long addr) - { -- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); - } - - static inline void -@@ -356,7 +356,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - -- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); -+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; - } - -@@ -366,7 +366,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - -- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); -+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; - } - -diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/patches/glibc/ports-2.14.1/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.14.1/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 372f34c..0000000 --- a/patches/glibc/ports-2.14.1/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/patches/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 2691a99..0000000 --- a/patches/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch +++ /dev/null @@ -1,21 +0,0 @@ -2009-05-26 Aurelien Jarno - - * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). - - ports/sysdeps/alpha/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 -@@ -35,7 +35,8 @@ - - ifeq ($(subdir),elf) - # The ld.so startup code cannot use literals until it self-relocates. --CFLAGS-rtld.c = -mbuild-constants -+# It uses more than 64k for the small data area. -+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) - endif - - # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.14.1.orig/ports/sysdeps/alpha/Makefile glibc-2.14.1/ports/sysdeps/alpha/Makefile diff --git a/patches/glibc/ports-2.14.1/560-ppc-atomic.patch b/patches/glibc/ports-2.14.1/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/patches/glibc/ports-2.14.1/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/patches/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch deleted file mode 100644 index 5e45682..0000000 --- a/patches/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ /dev/null @@ -1,374 +0,0 @@ -http://yann.poupet.free.fr/ep93xx/ -Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 -@@ -12,7 +12,7 @@ - /* FPA floating point units are always big-endian, irrespective of the - CPU endianness. VFP floating point units use the same endianness - as the rest of the system. */ --#ifdef __VFP_FP__ -+#if defined __VFP_FP__ || defined __MAVERICK__ - #define __FLOAT_WORD_ORDER __BYTE_ORDER - #else - #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -30,7 +30,33 @@ - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -+#ifdef __MAVERICK__ -+ cfldrd mvd4, [ip], #8 -+ nop -+ cfldrd mvd5, [ip], #8 -+ nop -+ cfldrd mvd6, [ip], #8 -+ nop -+ cfldrd mvd7, [ip], #8 -+ nop -+ cfldrd mvd8, [ip], #8 -+ nop -+ cfldrd mvd9, [ip], #8 -+ nop -+ cfldrd mvd10, [ip], #8 -+ nop -+ cfldrd mvd11, [ip], #8 -+ nop -+ cfldrd mvd12, [ip], #8 -+ nop -+ cfldrd mvd13, [ip], #8 -+ nop -+ cfldrd mvd14, [ip], #8 -+ nop -+ cfldrd mvd15, [ip], #8 -+#else - lfmfd f4, 4, [ip] ! /* load the floating point regs */ -+#endif - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) - END (__longjmp) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 -@@ -20,6 +20,45 @@ - # error "Never use directly; include instead." - #endif - -+#if defined(__MAVERICK__) -+ -+/* Define bits representing exceptions in the FPU status word. */ -+enum -+ { -+ FE_INVALID = 1, -+#define FE_INVALID FE_INVALID -+ FE_OVERFLOW = 4, -+#define FE_OVERFLOW FE_OVERFLOW -+ FE_UNDERFLOW = 8, -+#define FE_UNDERFLOW FE_UNDERFLOW -+ FE_INEXACT = 16, -+#define FE_INEXACT FE_INEXACT -+ }; -+ -+/* Amount to shift by to convert an exception to a mask bit. */ -+#define FE_EXCEPT_SHIFT 5 -+ -+/* All supported exceptions. */ -+#define FE_ALL_EXCEPT \ -+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) -+ -+/* IEEE rounding modes. */ -+enum -+ { -+ FE_TONEAREST = 0, -+#define FE_TONEAREST FE_TONEAREST -+ FE_TOWARDZERO = 0x400, -+#define FE_TOWARDZERO FE_TOWARDZERO -+ FE_DOWNWARD = 0x800, -+#define FE_DOWNWARD FE_DOWNWARD -+ FE_UPWARD = 0xc00, -+#define FE_UPWARD FE_UPWARD -+ }; -+ -+#define FE_ROUND_MASK (FE_UPWARD) -+ -+#else /* FPA */ -+ - /* Define bits representing exceptions in the FPU status word. */ - enum - { -@@ -44,6 +83,8 @@ - modes exist, but you have to encode them in the actual instruction. */ - #define FE_TONEAREST 0 - -+#endif -+ - /* Type representing exception flags. */ - typedef unsigned long int fexcept_t; - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 -@@ -28,7 +28,11 @@ - #ifndef _ASM - /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -+#ifdef __MAVERICK__ -+typedef int __jmp_buf[34]; -+#else - typedef int __jmp_buf[22]; - #endif -+#endif - - #endif -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,9 +18,21 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fegetround (void) - { -+#if defined(__MAVERICK__) -+ -+ unsigned long temp; -+ -+ _FPU_GETCW (temp); -+ return temp & FE_ROUND_MASK; -+ -+#else /* FPA */ -+ - return FE_TONEAREST; /* Easy. :-) */ -+ -+#endif - } -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,12 +18,28 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fesetround (int round) - { -+#if defined(__MAVERICK__) -+ unsigned long temp; -+ -+ if (round & ~FE_ROUND_MASK) -+ return 1; -+ -+ _FPU_GETCW (temp); -+ temp = (temp & ~FE_ROUND_MASK) | round; -+ _FPU_SETCW (temp); -+ return 0; -+ -+#else /* FPA */ -+ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -+ -+#endif - } - - libm_hidden_def (fesetround) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 -@@ -1,5 +1,6 @@ - /* FPU control word definitions. ARM version. -- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. -+ Copyright (C) 1996, 1997, 1998, 2000, 2005 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -20,6 +21,79 @@ - #ifndef _FPU_CONTROL_H - #define _FPU_CONTROL_H - -+#if defined(__MAVERICK__) -+ -+/* DSPSC register: (from EP9312 User's Guide) -+ * -+ * bits 31..29 - DAID -+ * bits 28..26 - HVID -+ * bits 25..24 - RSVD -+ * bit 23 - ISAT -+ * bit 22 - UI -+ * bit 21 - INT -+ * bit 20 - AEXC -+ * bits 19..18 - SAT -+ * bits 17..16 - FCC -+ * bit 15 - V -+ * bit 14 - FWDEN -+ * bit 13 - Invalid -+ * bit 12 - Denorm -+ * bits 11..10 - RM -+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE -+ * bits 4..0 - IX, UF, OF, RSVD, IO -+ */ -+ -+/* masking of interrupts */ -+#define _FPU_MASK_IM (1 << 5) /* invalid operation */ -+#define _FPU_MASK_ZM 0 /* divide by zero */ -+#define _FPU_MASK_OM (1 << 7) /* overflow */ -+#define _FPU_MASK_UM (1 << 8) /* underflow */ -+#define _FPU_MASK_PM (1 << 9) /* inexact */ -+#define _FPU_MASK_DM 0 /* denormalized operation */ -+ -+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ -+ -+#define _FPU_DEFAULT 0x00b00000 /* Default value. */ -+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ -+ -+/* Type of the control word. */ -+typedef unsigned int fpu_control_t; -+ -+/* Macros for accessing the hardware control word. */ -+#define _FPU_GETCW(cw) ({ \ -+ register int __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv32sc mvdx0, dspsc\n\t" \ -+ "cfmvr64l %0, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ -+ ); \ -+}) -+ -+#define _FPU_SETCW(cw) ({ \ -+ register int __t0, __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %0\n\t" \ -+ "cfmvsc32 dspsc, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ -+ : "0" (cw) \ -+ ); \ -+}) -+ -+/* Default control word set at startup. */ -+extern fpu_control_t __fpu_control; -+ -+#else /* FPA */ -+ - /* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only -@@ -99,4 +173,6 @@ - /* Default control word set at startup. */ - extern fpu_control_t __fpu_control; - -+#endif -+ - #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,4 +17,8 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define __JMP_BUF_SP 32 -+#else - #define __JMP_BUF_SP 20 -+#endif -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -24,11 +24,41 @@ - - ENTRY (__sigsetjmp) - /* Save registers */ -+#ifdef __MAVERICK__ -+ cfstrd mvd4, [r0], #8 -+ nop -+ cfstrd mvd5, [r0], #8 -+ nop -+ cfstrd mvd6, [r0], #8 -+ nop -+ cfstrd mvd7, [r0], #8 -+ nop -+ cfstrd mvd8, [r0], #8 -+ nop -+ cfstrd mvd9, [r0], #8 -+ nop -+ cfstrd mvd10, [r0], #8 -+ nop -+ cfstrd mvd11, [r0], #8 -+ nop -+ cfstrd mvd12, [r0], #8 -+ nop -+ cfstrd mvd13, [r0], #8 -+ nop -+ cfstrd mvd14, [r0], #8 -+ nop -+ cfstrd mvd15, [r0], #8 -+#else - sfmea f4, 4, [r0]! -+#endif - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ -+#ifdef __MAVERICK__ -+ sub r0, r0, #96 -+#else - sub r0, r0, #48 -+#endif - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,6 +17,10 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define FIRST_PSEUDO_REGISTER 43 -+#else - #define FIRST_PSEUDO_REGISTER 27 -+#endif - - #include -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 -@@ -29,7 +29,7 @@ - #if defined(__ARMEB__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 1 --#elif defined(__VFP_FP__) -+#elif defined(__VFP_FP__) || defined(__MAVERICK__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 0 - #else -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14.1/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.14.1/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14.1/ports/sysdeps/arm/gmp-mparam.h diff --git a/patches/glibc/ports-2.14.1/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.14.1/580-nptl-lowlevellock.patch deleted file mode 100644 index 6bf5250..0000000 --- a/patches/glibc/ports-2.14.1/580-nptl-lowlevellock.patch +++ /dev/null @@ -1,23 +0,0 @@ -fix build error on arm like on hppa: - -arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include /* Need THREAD_*, and header.*. */ - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 -diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/patches/glibc/ports-2.14.1/610-fpu-cw-mips.patch b/patches/glibc/ports-2.14.1/610-fpu-cw-mips.patch deleted file mode 100644 index e53ac78..0000000 --- a/patches/glibc/ports-2.14.1/610-fpu-cw-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html - -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 -@@ -86,7 +86,7 @@ - #define _FPU_RC_UP 0x2 - #define _FPU_RC_DOWN 0x3 - --#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ -+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ - - - /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.14.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14.1/ports/sysdeps/mips/fpu_control.h diff --git a/patches/glibc/ports-2.14.1/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.14.1/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/patches/glibc/ports-2.14.1/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/patches/glibc/ports-2.14.1/640-alpha-atfcts.patch b/patches/glibc/ports-2.14.1/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/patches/glibc/ports-2.14.1/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/ports-2.14.1/650-syslog.patch b/patches/glibc/ports-2.14.1/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/patches/glibc/ports-2.14.1/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/patches/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/patches/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/patches/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 1a632fe..0000000 --- a/patches/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/patches/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/patches/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/patches/glibc/ports-2.14/160-manual-no-perl.patch b/patches/glibc/ports-2.14/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/patches/glibc/ports-2.14/160-manual-no-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -If we're using a cvs snapshot which updates the source files, and -perl isn't installed yet, then we can't regen the docs. Not a big -deal, so just whine a little and continue on our merry way. - -http://bugs.gentoo.org/60132 - -diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 -@@ -104,9 +104,14 @@ - libm-err.texi: stamp-libm-err - stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ - $(dir)/libm-test-ulps)) -+ifneq ($(PERL),no) - pwd=`pwd`; \ - $(PERL) $< $$pwd/.. > libm-err-tmp - $(move-if-change) libm-err-tmp libm-err.texi -+else -+ echo "Unable to rebuild math docs, no perl installed" -+ touch libm-err.texi -+endif - touch $@ - - # Generate Texinfo files from the C source for the example programs. diff --git a/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/patches/glibc/ports-2.14/180-resolv-dynamic.patch b/patches/glibc/ports-2.14/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/patches/glibc/ports-2.14/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/patches/glibc/ports-2.14/190-localedef-mmap.patch b/patches/glibc/ports-2.14/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/patches/glibc/ports-2.14/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c ---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/patches/glibc/ports-2.14/200-fadvise64_64.patch b/patches/glibc/ports-2.14/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/patches/glibc/ports-2.14/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/patches/glibc/ports-2.14/220-section-comments.patch b/patches/glibc/ports-2.14/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/patches/glibc/ports-2.14/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/patches/glibc/ports-2.14/230-no-inline-gmon.patch b/patches/glibc/ports-2.14/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/patches/glibc/ports-2.14/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/patches/glibc/ports-2.14/240-check_native-headers.patch b/patches/glibc/ports-2.14/240-check_native-headers.patch deleted file mode 100644 index c936f71..0000000 --- a/patches/glibc/ports-2.14/240-check_native-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -many ports hit this warning: -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' - -snipped from suse - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/patches/glibc/ports-2.14/260-assume-pipe2.patch b/patches/glibc/ports-2.14/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/patches/glibc/ports-2.14/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/patches/glibc/ports-2.14/270-china.patch b/patches/glibc/ports-2.14/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/patches/glibc/ports-2.14/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/patches/glibc/ports-2.14/280-new-valencian-locale.patch b/patches/glibc/ports-2.14/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/patches/glibc/ports-2.14/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/patches/glibc/ports-2.14/300-nscd-one-fork.patch b/patches/glibc/ports-2.14/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/patches/glibc/ports-2.14/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/patches/glibc/ports-2.14/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.14/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/patches/glibc/ports-2.14/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/patches/glibc/ports-2.14/330-m68k-sys-user.patch b/patches/glibc/ports-2.14/330-m68k-sys-user.patch deleted file mode 100644 index 28bcb11..0000000 --- a/patches/glibc/ports-2.14/330-m68k-sys-user.patch +++ /dev/null @@ -1,97 +0,0 @@ -copied from kernel as it is sanitized now - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 -@@ -1,3 +1,90 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+/* Core file format: The core file is written in such a way that gdb -+ can understand it and provide useful information to the user (under -+ linux we use the 'trad-core' bfd). There are quite a number of -+ obstacles to being able to view the contents of the floating point -+ registers, and until these are solved you will not be able to view the -+ contents of them. Actually, you can read in the core file and look at -+ the contents of the user struct to find out what the floating point -+ registers contain. -+ The actual file contents are as follows: -+ UPAGE: 1 page consisting of a user struct that tells gdb what is present -+ in the file. Directly after this is a copy of the task_struct, which -+ is currently not used by gdb, but it may come in useful at some point. -+ All of the registers are stored as part of the upage. The upage should -+ always be only one page. -+ DATA: The data area is stored. We use current->end_text to -+ current->brk to pick up all of the user variables, plus any memory -+ that may have been malloced. No attempt is made to determine if a page -+ is demand-zero or if a page is totally unused, we just cover the entire -+ range. All of the addresses are rounded in such a way that an integral -+ number of pages is written. -+ STACK: We need the stack information in order to get a meaningful -+ backtrace. We need to write the data from (esp) to -+ current->start_stack, so we round each of these off in order to be able -+ to write an integer number of pages. -+ The minimum core file size is 3 pages, or 12288 bytes. -+*/ -+ -+struct user_m68kfp_struct { -+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ -+ unsigned long fpcntl[3]; /* fp control regs */ -+}; -+ -+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and -+ is still the layout used by user (the new pt_regs doesn't have -+ all registers). */ -+struct user_regs_struct { -+ long d1,d2,d3,d4,d5,d6,d7; -+ long a0,a1,a2,a3,a4,a5,a6; -+ long d0; -+ long usp; -+ long orig_d0; -+ short stkadj; -+ short sr; -+ long pc; -+ short fmtvec; -+ short __fill; -+}; -+ -+ -+/* When the kernel dumps core, it starts by dumping the user struct - -+ this will be used by gdb to figure out where the data and stack segments -+ are within the file, and what virtual addresses to use. */ -+struct user{ -+/* We start with the registers, to mimic the way that "memory" is returned -+ from the ptrace(3,...) function. */ -+ struct user_regs_struct regs; /* Where the registers are actually stored */ -+/* ptrace does not yet supply these. Someday.... */ -+ int u_fpvalid; /* True if math co-processor being used. */ -+ /* for this mess. Not yet used. */ -+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ -+/* The rest of this junk is to help gdb figure out what goes where */ -+ unsigned long int u_tsize; /* Text segment size (pages). */ -+ unsigned long int u_dsize; /* Data segment size (pages). */ -+ unsigned long int u_ssize; /* Stack segment size (pages). */ -+ unsigned long start_code; /* Starting virtual address of text. */ -+ unsigned long start_stack; /* Starting virtual address of stack area. -+ This is actually the bottom of the stack, -+ the top of the stack is always found in the -+ esp register. */ -+ long int signal; /* Signal that caused the core dump. */ -+ int reserved; /* No longer used */ -+ struct user_regs_struct *u_ar0; -+ /* Used by gdb to help find the values for */ -+ /* the registers. */ -+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ -+ unsigned long magic; /* To uniquely identify a core file */ -+ char u_comm[32]; /* User command that was responsible */ -+}; -+#define NBPG 4096 -+#define UPAGES 1 -+#define HOST_TEXT_START_ADDR (u.start_code) -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -+ -+#endif - /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/patches/glibc/ports-2.14/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.14/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/patches/glibc/ports-2.14/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/patches/glibc/ports-2.14/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.14/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/patches/glibc/ports-2.14/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/patches/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/patches/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/patches/glibc/ports-2.14/380-dont-build-timezone.patch b/patches/glibc/ports-2.14/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/patches/glibc/ports-2.14/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/patches/glibc/ports-2.14/400-alpha-xstat.patch b/patches/glibc/ports-2.14/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/patches/glibc/ports-2.14/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/patches/glibc/ports-2.14/430-alpha-creat.patch b/patches/glibc/ports-2.14/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/patches/glibc/ports-2.14/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/patches/glibc/ports-2.14/440-alpha-cache-shape.patch b/patches/glibc/ports-2.14/440-alpha-cache-shape.patch deleted file mode 100644 index def0181..0000000 --- a/patches/glibc/ports-2.14/440-alpha-cache-shape.patch +++ /dev/null @@ -1,13 +0,0 @@ -older verisons of glibc would build dl-sysdep as shared-only and dl-support as -static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of -glibc build dl-sysdep as both shared and static which means we now have symbol -duplication for static builds with dl-sysdep and dl-support. since dl-sysdep -is both shared/static, there is no point in hooking dl-support anymore, so we -can punt it. - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 -@@ -1,2 +1,1 @@ --#include "dl-auxv.h" - #include diff --git a/patches/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch deleted file mode 100644 index 1569ce4..0000000 --- a/patches/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch +++ /dev/null @@ -1,56 +0,0 @@ -2006-05-30 Falk Hueffner - - * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture - to ev6 in assembly code. - -{standard input}: Assembler messages: -{standard input}:341: Error: macro requires $at register while noat in effect -{standard input}:374: Error: macro requires $at register while noat in effect -{standard input}:438: Error: macro requires $at register while noat in effect -{standard input}:471: Error: macro requires $at register while noat in effect -make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 - -Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. -I cannot really think of anything better than - - ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 -@@ -178,13 +178,13 @@ - static inline void - stb_mb(unsigned char val, unsigned long addr) - { -- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); - } - - static inline void - stw_mb(unsigned short val, unsigned long addr) - { -- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); - } - - static inline void -@@ -356,7 +356,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - -- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); -+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; - } - -@@ -366,7 +366,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - -- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); -+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; - } - -diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/patches/glibc/ports-2.14/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.14/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 372f34c..0000000 --- a/patches/glibc/ports-2.14/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/patches/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 3560e2a..0000000 --- a/patches/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch +++ /dev/null @@ -1,21 +0,0 @@ -2009-05-26 Aurelien Jarno - - * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). - - ports/sysdeps/alpha/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 -@@ -35,7 +35,8 @@ - - ifeq ($(subdir),elf) - # The ld.so startup code cannot use literals until it self-relocates. --CFLAGS-rtld.c = -mbuild-constants -+# It uses more than 64k for the small data area. -+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) - endif - - # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.14.orig/ports/sysdeps/alpha/Makefile glibc-2.14/ports/sysdeps/alpha/Makefile diff --git a/patches/glibc/ports-2.14/560-ppc-atomic.patch b/patches/glibc/ports-2.14/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/patches/glibc/ports-2.14/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/patches/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch deleted file mode 100644 index b297ff0..0000000 --- a/patches/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ /dev/null @@ -1,374 +0,0 @@ -http://yann.poupet.free.fr/ep93xx/ -Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 -@@ -12,7 +12,7 @@ - /* FPA floating point units are always big-endian, irrespective of the - CPU endianness. VFP floating point units use the same endianness - as the rest of the system. */ --#ifdef __VFP_FP__ -+#if defined __VFP_FP__ || defined __MAVERICK__ - #define __FLOAT_WORD_ORDER __BYTE_ORDER - #else - #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -30,7 +30,33 @@ - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -+#ifdef __MAVERICK__ -+ cfldrd mvd4, [ip], #8 -+ nop -+ cfldrd mvd5, [ip], #8 -+ nop -+ cfldrd mvd6, [ip], #8 -+ nop -+ cfldrd mvd7, [ip], #8 -+ nop -+ cfldrd mvd8, [ip], #8 -+ nop -+ cfldrd mvd9, [ip], #8 -+ nop -+ cfldrd mvd10, [ip], #8 -+ nop -+ cfldrd mvd11, [ip], #8 -+ nop -+ cfldrd mvd12, [ip], #8 -+ nop -+ cfldrd mvd13, [ip], #8 -+ nop -+ cfldrd mvd14, [ip], #8 -+ nop -+ cfldrd mvd15, [ip], #8 -+#else - lfmfd f4, 4, [ip] ! /* load the floating point regs */ -+#endif - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) - END (__longjmp) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 -@@ -20,6 +20,45 @@ - # error "Never use directly; include instead." - #endif - -+#if defined(__MAVERICK__) -+ -+/* Define bits representing exceptions in the FPU status word. */ -+enum -+ { -+ FE_INVALID = 1, -+#define FE_INVALID FE_INVALID -+ FE_OVERFLOW = 4, -+#define FE_OVERFLOW FE_OVERFLOW -+ FE_UNDERFLOW = 8, -+#define FE_UNDERFLOW FE_UNDERFLOW -+ FE_INEXACT = 16, -+#define FE_INEXACT FE_INEXACT -+ }; -+ -+/* Amount to shift by to convert an exception to a mask bit. */ -+#define FE_EXCEPT_SHIFT 5 -+ -+/* All supported exceptions. */ -+#define FE_ALL_EXCEPT \ -+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) -+ -+/* IEEE rounding modes. */ -+enum -+ { -+ FE_TONEAREST = 0, -+#define FE_TONEAREST FE_TONEAREST -+ FE_TOWARDZERO = 0x400, -+#define FE_TOWARDZERO FE_TOWARDZERO -+ FE_DOWNWARD = 0x800, -+#define FE_DOWNWARD FE_DOWNWARD -+ FE_UPWARD = 0xc00, -+#define FE_UPWARD FE_UPWARD -+ }; -+ -+#define FE_ROUND_MASK (FE_UPWARD) -+ -+#else /* FPA */ -+ - /* Define bits representing exceptions in the FPU status word. */ - enum - { -@@ -44,6 +83,8 @@ - modes exist, but you have to encode them in the actual instruction. */ - #define FE_TONEAREST 0 - -+#endif -+ - /* Type representing exception flags. */ - typedef unsigned long int fexcept_t; - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 -@@ -28,7 +28,11 @@ - #ifndef _ASM - /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -+#ifdef __MAVERICK__ -+typedef int __jmp_buf[34]; -+#else - typedef int __jmp_buf[22]; - #endif -+#endif - - #endif -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,9 +18,21 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fegetround (void) - { -+#if defined(__MAVERICK__) -+ -+ unsigned long temp; -+ -+ _FPU_GETCW (temp); -+ return temp & FE_ROUND_MASK; -+ -+#else /* FPA */ -+ - return FE_TONEAREST; /* Easy. :-) */ -+ -+#endif - } -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,12 +18,28 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fesetround (int round) - { -+#if defined(__MAVERICK__) -+ unsigned long temp; -+ -+ if (round & ~FE_ROUND_MASK) -+ return 1; -+ -+ _FPU_GETCW (temp); -+ temp = (temp & ~FE_ROUND_MASK) | round; -+ _FPU_SETCW (temp); -+ return 0; -+ -+#else /* FPA */ -+ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -+ -+#endif - } - - libm_hidden_def (fesetround) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 -@@ -1,5 +1,6 @@ - /* FPU control word definitions. ARM version. -- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. -+ Copyright (C) 1996, 1997, 1998, 2000, 2005 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -20,6 +21,79 @@ - #ifndef _FPU_CONTROL_H - #define _FPU_CONTROL_H - -+#if defined(__MAVERICK__) -+ -+/* DSPSC register: (from EP9312 User's Guide) -+ * -+ * bits 31..29 - DAID -+ * bits 28..26 - HVID -+ * bits 25..24 - RSVD -+ * bit 23 - ISAT -+ * bit 22 - UI -+ * bit 21 - INT -+ * bit 20 - AEXC -+ * bits 19..18 - SAT -+ * bits 17..16 - FCC -+ * bit 15 - V -+ * bit 14 - FWDEN -+ * bit 13 - Invalid -+ * bit 12 - Denorm -+ * bits 11..10 - RM -+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE -+ * bits 4..0 - IX, UF, OF, RSVD, IO -+ */ -+ -+/* masking of interrupts */ -+#define _FPU_MASK_IM (1 << 5) /* invalid operation */ -+#define _FPU_MASK_ZM 0 /* divide by zero */ -+#define _FPU_MASK_OM (1 << 7) /* overflow */ -+#define _FPU_MASK_UM (1 << 8) /* underflow */ -+#define _FPU_MASK_PM (1 << 9) /* inexact */ -+#define _FPU_MASK_DM 0 /* denormalized operation */ -+ -+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ -+ -+#define _FPU_DEFAULT 0x00b00000 /* Default value. */ -+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ -+ -+/* Type of the control word. */ -+typedef unsigned int fpu_control_t; -+ -+/* Macros for accessing the hardware control word. */ -+#define _FPU_GETCW(cw) ({ \ -+ register int __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv32sc mvdx0, dspsc\n\t" \ -+ "cfmvr64l %0, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ -+ ); \ -+}) -+ -+#define _FPU_SETCW(cw) ({ \ -+ register int __t0, __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %0\n\t" \ -+ "cfmvsc32 dspsc, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ -+ : "0" (cw) \ -+ ); \ -+}) -+ -+/* Default control word set at startup. */ -+extern fpu_control_t __fpu_control; -+ -+#else /* FPA */ -+ - /* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only -@@ -99,4 +173,6 @@ - /* Default control word set at startup. */ - extern fpu_control_t __fpu_control; - -+#endif -+ - #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,4 +17,8 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define __JMP_BUF_SP 32 -+#else - #define __JMP_BUF_SP 20 -+#endif -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -24,11 +24,41 @@ - - ENTRY (__sigsetjmp) - /* Save registers */ -+#ifdef __MAVERICK__ -+ cfstrd mvd4, [r0], #8 -+ nop -+ cfstrd mvd5, [r0], #8 -+ nop -+ cfstrd mvd6, [r0], #8 -+ nop -+ cfstrd mvd7, [r0], #8 -+ nop -+ cfstrd mvd8, [r0], #8 -+ nop -+ cfstrd mvd9, [r0], #8 -+ nop -+ cfstrd mvd10, [r0], #8 -+ nop -+ cfstrd mvd11, [r0], #8 -+ nop -+ cfstrd mvd12, [r0], #8 -+ nop -+ cfstrd mvd13, [r0], #8 -+ nop -+ cfstrd mvd14, [r0], #8 -+ nop -+ cfstrd mvd15, [r0], #8 -+#else - sfmea f4, 4, [r0]! -+#endif - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ -+#ifdef __MAVERICK__ -+ sub r0, r0, #96 -+#else - sub r0, r0, #48 -+#endif - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,6 +17,10 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define FIRST_PSEUDO_REGISTER 43 -+#else - #define FIRST_PSEUDO_REGISTER 27 -+#endif - - #include -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 -@@ -29,7 +29,7 @@ - #if defined(__ARMEB__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 1 --#elif defined(__VFP_FP__) -+#elif defined(__VFP_FP__) || defined(__MAVERICK__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 0 - #else -diff -durN glibc-2.14.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.14.orig/ports/sysdeps/arm/gccframe.h glibc-2.14/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14/ports/sysdeps/arm/gmp-mparam.h diff --git a/patches/glibc/ports-2.14/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.14/580-nptl-lowlevellock.patch deleted file mode 100644 index a2a141c..0000000 --- a/patches/glibc/ports-2.14/580-nptl-lowlevellock.patch +++ /dev/null @@ -1,23 +0,0 @@ -fix build error on arm like on hppa: - -arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include /* Need THREAD_*, and header.*. */ - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 -diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/patches/glibc/ports-2.14/610-fpu-cw-mips.patch b/patches/glibc/ports-2.14/610-fpu-cw-mips.patch deleted file mode 100644 index c624565..0000000 --- a/patches/glibc/ports-2.14/610-fpu-cw-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html - -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 -@@ -86,7 +86,7 @@ - #define _FPU_RC_UP 0x2 - #define _FPU_RC_DOWN 0x3 - --#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ -+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ - - - /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.14.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14/ports/sysdeps/mips/fpu_control.h diff --git a/patches/glibc/ports-2.14/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.14/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/patches/glibc/ports-2.14/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/patches/glibc/ports-2.14/640-alpha-atfcts.patch b/patches/glibc/ports-2.14/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/patches/glibc/ports-2.14/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/ports-2.14/650-syslog.patch b/patches/glibc/ports-2.14/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/patches/glibc/ports-2.14/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/patches/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/patches/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/patches/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 1a632fe..0000000 --- a/patches/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -@@ -23,7 +23,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -@@ -21,7 +21,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); diff --git a/patches/glibc/ports-2.15/091-libmemusage-link-failure.patch b/patches/glibc/ports-2.15/091-libmemusage-link-failure.patch deleted file mode 100644 index 9f9887c..0000000 --- a/patches/glibc/ports-2.15/091-libmemusage-link-failure.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 2d80bda39073a35af4b904d27fa1511cd309b26f -Author: Nathan Sidwell -Date: Fri Jan 6 20:14:44 2012 +0000 - - Add ARM dependency of libmemusage.so on libc_nonshared.a. - -diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile -index 5651161..1a88430 100644 ---- a/ports/sysdeps/arm/Makefile -+++ b/ports/sysdeps/arm/Makefile -@@ -7,3 +7,8 @@ endif - ifeq ($(subdir),csu) - gen-as-const-headers += tlsdesc.sym - endif -+ -+# to pull in __aeabi_read_tp, needed for tls -+ifeq ($(subdir),malloc) -+$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a -+endif diff --git a/patches/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/patches/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/patches/glibc/ports-2.15/160-manual-no-perl.patch b/patches/glibc/ports-2.15/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/patches/glibc/ports-2.15/160-manual-no-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -If we're using a cvs snapshot which updates the source files, and -perl isn't installed yet, then we can't regen the docs. Not a big -deal, so just whine a little and continue on our merry way. - -http://bugs.gentoo.org/60132 - -diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100 -@@ -104,9 +104,14 @@ - libm-err.texi: stamp-libm-err - stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ - $(dir)/libm-test-ulps)) -+ifneq ($(PERL),no) - pwd=`pwd`; \ - $(PERL) $< $$pwd/.. > libm-err-tmp - $(move-if-change) libm-err-tmp libm-err.texi -+else -+ echo "Unable to rebuild math docs, no perl installed" -+ touch libm-err.texi -+endif - touch $@ - - # Generate Texinfo files from the C source for the example programs. diff --git a/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/patches/glibc/ports-2.15/180-resolv-dynamic.patch b/patches/glibc/ports-2.15/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/patches/glibc/ports-2.15/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/patches/glibc/ports-2.15/200-fadvise64_64.patch b/patches/glibc/ports-2.15/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/patches/glibc/ports-2.15/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/patches/glibc/ports-2.15/220-section-comments.patch b/patches/glibc/ports-2.15/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/patches/glibc/ports-2.15/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/patches/glibc/ports-2.15/230-no-inline-gmon.patch b/patches/glibc/ports-2.15/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/patches/glibc/ports-2.15/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/patches/glibc/ports-2.15/260-assume-pipe2.patch b/patches/glibc/ports-2.15/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/patches/glibc/ports-2.15/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/patches/glibc/ports-2.15/270-china.patch b/patches/glibc/ports-2.15/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/patches/glibc/ports-2.15/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/patches/glibc/ports-2.15/280-new-valencian-locale.patch b/patches/glibc/ports-2.15/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/patches/glibc/ports-2.15/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/patches/glibc/ports-2.15/300-nscd-one-fork.patch b/patches/glibc/ports-2.15/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/patches/glibc/ports-2.15/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/patches/glibc/ports-2.15/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.15/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/patches/glibc/ports-2.15/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/patches/glibc/ports-2.15/330-m68k-sys-user.patch b/patches/glibc/ports-2.15/330-m68k-sys-user.patch deleted file mode 100644 index faee18f..0000000 --- a/patches/glibc/ports-2.15/330-m68k-sys-user.patch +++ /dev/null @@ -1,97 +0,0 @@ -copied from kernel as it is sanitized now - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 -@@ -1,3 +1,90 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+/* Core file format: The core file is written in such a way that gdb -+ can understand it and provide useful information to the user (under -+ linux we use the 'trad-core' bfd). There are quite a number of -+ obstacles to being able to view the contents of the floating point -+ registers, and until these are solved you will not be able to view the -+ contents of them. Actually, you can read in the core file and look at -+ the contents of the user struct to find out what the floating point -+ registers contain. -+ The actual file contents are as follows: -+ UPAGE: 1 page consisting of a user struct that tells gdb what is present -+ in the file. Directly after this is a copy of the task_struct, which -+ is currently not used by gdb, but it may come in useful at some point. -+ All of the registers are stored as part of the upage. The upage should -+ always be only one page. -+ DATA: The data area is stored. We use current->end_text to -+ current->brk to pick up all of the user variables, plus any memory -+ that may have been malloced. No attempt is made to determine if a page -+ is demand-zero or if a page is totally unused, we just cover the entire -+ range. All of the addresses are rounded in such a way that an integral -+ number of pages is written. -+ STACK: We need the stack information in order to get a meaningful -+ backtrace. We need to write the data from (esp) to -+ current->start_stack, so we round each of these off in order to be able -+ to write an integer number of pages. -+ The minimum core file size is 3 pages, or 12288 bytes. -+*/ -+ -+struct user_m68kfp_struct { -+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ -+ unsigned long fpcntl[3]; /* fp control regs */ -+}; -+ -+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and -+ is still the layout used by user (the new pt_regs doesn't have -+ all registers). */ -+struct user_regs_struct { -+ long d1,d2,d3,d4,d5,d6,d7; -+ long a0,a1,a2,a3,a4,a5,a6; -+ long d0; -+ long usp; -+ long orig_d0; -+ short stkadj; -+ short sr; -+ long pc; -+ short fmtvec; -+ short __fill; -+}; -+ -+ -+/* When the kernel dumps core, it starts by dumping the user struct - -+ this will be used by gdb to figure out where the data and stack segments -+ are within the file, and what virtual addresses to use. */ -+struct user{ -+/* We start with the registers, to mimic the way that "memory" is returned -+ from the ptrace(3,...) function. */ -+ struct user_regs_struct regs; /* Where the registers are actually stored */ -+/* ptrace does not yet supply these. Someday.... */ -+ int u_fpvalid; /* True if math co-processor being used. */ -+ /* for this mess. Not yet used. */ -+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ -+/* The rest of this junk is to help gdb figure out what goes where */ -+ unsigned long int u_tsize; /* Text segment size (pages). */ -+ unsigned long int u_dsize; /* Data segment size (pages). */ -+ unsigned long int u_ssize; /* Stack segment size (pages). */ -+ unsigned long start_code; /* Starting virtual address of text. */ -+ unsigned long start_stack; /* Starting virtual address of stack area. -+ This is actually the bottom of the stack, -+ the top of the stack is always found in the -+ esp register. */ -+ long int signal; /* Signal that caused the core dump. */ -+ int reserved; /* No longer used */ -+ struct user_regs_struct *u_ar0; -+ /* Used by gdb to help find the values for */ -+ /* the registers. */ -+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ -+ unsigned long magic; /* To uniquely identify a core file */ -+ char u_comm[32]; /* User command that was responsible */ -+}; -+#define NBPG 4096 -+#define UPAGES 1 -+#define HOST_TEXT_START_ADDR (u.start_code) -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -+ -+#endif - /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/patches/glibc/ports-2.15/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.15/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/patches/glibc/ports-2.15/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/patches/glibc/ports-2.15/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.15/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/patches/glibc/ports-2.15/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/patches/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/patches/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/patches/glibc/ports-2.15/380-dont-build-timezone.patch b/patches/glibc/ports-2.15/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/patches/glibc/ports-2.15/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/patches/glibc/ports-2.15/400-alpha-xstat.patch b/patches/glibc/ports-2.15/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/patches/glibc/ports-2.15/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/patches/glibc/ports-2.15/430-alpha-creat.patch b/patches/glibc/ports-2.15/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/patches/glibc/ports-2.15/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/patches/glibc/ports-2.15/440-alpha-cache-shape.patch b/patches/glibc/ports-2.15/440-alpha-cache-shape.patch deleted file mode 100644 index b3158da..0000000 --- a/patches/glibc/ports-2.15/440-alpha-cache-shape.patch +++ /dev/null @@ -1,13 +0,0 @@ -older verisons of glibc would build dl-sysdep as shared-only and dl-support as -static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of -glibc build dl-sysdep as both shared and static which means we now have symbol -duplication for static builds with dl-sysdep and dl-support. since dl-sysdep -is both shared/static, there is no point in hooking dl-support anymore, so we -can punt it. - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 -@@ -1,2 +1,1 @@ --#include "dl-auxv.h" - #include diff --git a/patches/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch deleted file mode 100644 index a54d823..0000000 --- a/patches/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch +++ /dev/null @@ -1,56 +0,0 @@ -2006-05-30 Falk Hueffner - - * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture - to ev6 in assembly code. - -{standard input}: Assembler messages: -{standard input}:341: Error: macro requires $at register while noat in effect -{standard input}:374: Error: macro requires $at register while noat in effect -{standard input}:438: Error: macro requires $at register while noat in effect -{standard input}:471: Error: macro requires $at register while noat in effect -make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 - -Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. -I cannot really think of anything better than - - ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 -@@ -178,13 +178,13 @@ - static inline void - stb_mb(unsigned char val, unsigned long addr) - { -- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); - } - - static inline void - stw_mb(unsigned short val, unsigned long addr) - { -- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); - } - - static inline void -@@ -356,7 +356,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - -- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); -+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; - } - -@@ -366,7 +366,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - -- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); -+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; - } - -diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/patches/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index acf250d..0000000 --- a/patches/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -21,6 +21,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/patches/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 800a789..0000000 --- a/patches/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch +++ /dev/null @@ -1,21 +0,0 @@ -2009-05-26 Aurelien Jarno - - * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). - - ports/sysdeps/alpha/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 -@@ -35,7 +35,8 @@ - - ifeq ($(subdir),elf) - # The ld.so startup code cannot use literals until it self-relocates. --CFLAGS-rtld.c = -mbuild-constants -+# It uses more than 64k for the small data area. -+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) - endif - - # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.15.orig/ports/sysdeps/alpha/Makefile glibc-2.15/ports/sysdeps/alpha/Makefile diff --git a/patches/glibc/ports-2.15/560-ppc-atomic.patch b/patches/glibc/ports-2.15/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/patches/glibc/ports-2.15/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/patches/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch deleted file mode 100644 index 8a05574..0000000 --- a/patches/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ /dev/null @@ -1,374 +0,0 @@ -http://yann.poupet.free.fr/ep93xx/ -Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 -@@ -12,7 +12,7 @@ - /* FPA floating point units are always big-endian, irrespective of the - CPU endianness. VFP floating point units use the same endianness - as the rest of the system. */ --#ifdef __VFP_FP__ -+#if defined __VFP_FP__ || defined __MAVERICK__ - #define __FLOAT_WORD_ORDER __BYTE_ORDER - #else - #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -30,7 +30,33 @@ - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -+#ifdef __MAVERICK__ -+ cfldrd mvd4, [ip], #8 -+ nop -+ cfldrd mvd5, [ip], #8 -+ nop -+ cfldrd mvd6, [ip], #8 -+ nop -+ cfldrd mvd7, [ip], #8 -+ nop -+ cfldrd mvd8, [ip], #8 -+ nop -+ cfldrd mvd9, [ip], #8 -+ nop -+ cfldrd mvd10, [ip], #8 -+ nop -+ cfldrd mvd11, [ip], #8 -+ nop -+ cfldrd mvd12, [ip], #8 -+ nop -+ cfldrd mvd13, [ip], #8 -+ nop -+ cfldrd mvd14, [ip], #8 -+ nop -+ cfldrd mvd15, [ip], #8 -+#else - lfmfd f4, 4, [ip] ! /* load the floating point regs */ -+#endif - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) - END (__longjmp) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 -@@ -20,6 +20,45 @@ - # error "Never use directly; include instead." - #endif - -+#if defined(__MAVERICK__) -+ -+/* Define bits representing exceptions in the FPU status word. */ -+enum -+ { -+ FE_INVALID = 1, -+#define FE_INVALID FE_INVALID -+ FE_OVERFLOW = 4, -+#define FE_OVERFLOW FE_OVERFLOW -+ FE_UNDERFLOW = 8, -+#define FE_UNDERFLOW FE_UNDERFLOW -+ FE_INEXACT = 16, -+#define FE_INEXACT FE_INEXACT -+ }; -+ -+/* Amount to shift by to convert an exception to a mask bit. */ -+#define FE_EXCEPT_SHIFT 5 -+ -+/* All supported exceptions. */ -+#define FE_ALL_EXCEPT \ -+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) -+ -+/* IEEE rounding modes. */ -+enum -+ { -+ FE_TONEAREST = 0, -+#define FE_TONEAREST FE_TONEAREST -+ FE_TOWARDZERO = 0x400, -+#define FE_TOWARDZERO FE_TOWARDZERO -+ FE_DOWNWARD = 0x800, -+#define FE_DOWNWARD FE_DOWNWARD -+ FE_UPWARD = 0xc00, -+#define FE_UPWARD FE_UPWARD -+ }; -+ -+#define FE_ROUND_MASK (FE_UPWARD) -+ -+#else /* FPA */ -+ - /* Define bits representing exceptions in the FPU status word. */ - enum - { -@@ -44,6 +83,8 @@ - modes exist, but you have to encode them in the actual instruction. */ - #define FE_TONEAREST 0 - -+#endif -+ - /* Type representing exception flags. */ - typedef unsigned long int fexcept_t; - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 -@@ -28,7 +28,11 @@ - #ifndef _ASM - /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -+#ifdef __MAVERICK__ -+typedef int __jmp_buf[34]; -+#else - typedef int __jmp_buf[22]; - #endif -+#endif - - #endif -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,9 +18,21 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fegetround (void) - { -+#if defined(__MAVERICK__) -+ -+ unsigned long temp; -+ -+ _FPU_GETCW (temp); -+ return temp & FE_ROUND_MASK; -+ -+#else /* FPA */ -+ - return FE_TONEAREST; /* Easy. :-) */ -+ -+#endif - } -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 -@@ -18,12 +18,28 @@ - 02111-1307 USA. */ - - #include -+#include - - int - fesetround (int round) - { -+#if defined(__MAVERICK__) -+ unsigned long temp; -+ -+ if (round & ~FE_ROUND_MASK) -+ return 1; -+ -+ _FPU_GETCW (temp); -+ temp = (temp & ~FE_ROUND_MASK) | round; -+ _FPU_SETCW (temp); -+ return 0; -+ -+#else /* FPA */ -+ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -+ -+#endif - } - - libm_hidden_def (fesetround) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 -@@ -1,5 +1,6 @@ - /* FPU control word definitions. ARM version. -- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. -+ Copyright (C) 1996, 1997, 1998, 2000, 2005 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -20,6 +21,79 @@ - #ifndef _FPU_CONTROL_H - #define _FPU_CONTROL_H - -+#if defined(__MAVERICK__) -+ -+/* DSPSC register: (from EP9312 User's Guide) -+ * -+ * bits 31..29 - DAID -+ * bits 28..26 - HVID -+ * bits 25..24 - RSVD -+ * bit 23 - ISAT -+ * bit 22 - UI -+ * bit 21 - INT -+ * bit 20 - AEXC -+ * bits 19..18 - SAT -+ * bits 17..16 - FCC -+ * bit 15 - V -+ * bit 14 - FWDEN -+ * bit 13 - Invalid -+ * bit 12 - Denorm -+ * bits 11..10 - RM -+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE -+ * bits 4..0 - IX, UF, OF, RSVD, IO -+ */ -+ -+/* masking of interrupts */ -+#define _FPU_MASK_IM (1 << 5) /* invalid operation */ -+#define _FPU_MASK_ZM 0 /* divide by zero */ -+#define _FPU_MASK_OM (1 << 7) /* overflow */ -+#define _FPU_MASK_UM (1 << 8) /* underflow */ -+#define _FPU_MASK_PM (1 << 9) /* inexact */ -+#define _FPU_MASK_DM 0 /* denormalized operation */ -+ -+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ -+ -+#define _FPU_DEFAULT 0x00b00000 /* Default value. */ -+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ -+ -+/* Type of the control word. */ -+typedef unsigned int fpu_control_t; -+ -+/* Macros for accessing the hardware control word. */ -+#define _FPU_GETCW(cw) ({ \ -+ register int __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv32sc mvdx0, dspsc\n\t" \ -+ "cfmvr64l %0, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ -+ ); \ -+}) -+ -+#define _FPU_SETCW(cw) ({ \ -+ register int __t0, __t1, __t2; \ -+ \ -+ __asm__ volatile ( \ -+ "cfmvr64l %1, mvdx0\n\t" \ -+ "cfmvr64h %2, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %0\n\t" \ -+ "cfmvsc32 dspsc, mvdx0\n\t" \ -+ "cfmv64lr mvdx0, %1\n\t" \ -+ "cfmv64hr mvdx0, %2" \ -+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ -+ : "0" (cw) \ -+ ); \ -+}) -+ -+/* Default control word set at startup. */ -+extern fpu_control_t __fpu_control; -+ -+#else /* FPA */ -+ - /* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only -@@ -99,4 +173,6 @@ - /* Default control word set at startup. */ - extern fpu_control_t __fpu_control; - -+#endif -+ - #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,4 +17,8 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define __JMP_BUF_SP 32 -+#else - #define __JMP_BUF_SP 20 -+#endif -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 -@@ -24,11 +24,41 @@ - - ENTRY (__sigsetjmp) - /* Save registers */ -+#ifdef __MAVERICK__ -+ cfstrd mvd4, [r0], #8 -+ nop -+ cfstrd mvd5, [r0], #8 -+ nop -+ cfstrd mvd6, [r0], #8 -+ nop -+ cfstrd mvd7, [r0], #8 -+ nop -+ cfstrd mvd8, [r0], #8 -+ nop -+ cfstrd mvd9, [r0], #8 -+ nop -+ cfstrd mvd10, [r0], #8 -+ nop -+ cfstrd mvd11, [r0], #8 -+ nop -+ cfstrd mvd12, [r0], #8 -+ nop -+ cfstrd mvd13, [r0], #8 -+ nop -+ cfstrd mvd14, [r0], #8 -+ nop -+ cfstrd mvd15, [r0], #8 -+#else - sfmea f4, 4, [r0]! -+#endif - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ -+#ifdef __MAVERICK__ -+ sub r0, r0, #96 -+#else - sub r0, r0, #48 -+#endif - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 -@@ -17,6 +17,10 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#ifdef __MAVERICK__ -+#define FIRST_PSEUDO_REGISTER 43 -+#else - #define FIRST_PSEUDO_REGISTER 27 -+#endif - - #include -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 -@@ -29,7 +29,7 @@ - #if defined(__ARMEB__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 1 --#elif defined(__VFP_FP__) -+#elif defined(__VFP_FP__) || defined(__MAVERICK__) - # define IEEE_DOUBLE_MIXED_ENDIAN 0 - # define IEEE_DOUBLE_BIG_ENDIAN 0 - #else -diff -durN glibc-2.15.orig/ports/sysdeps/arm/bits/endian.h glibc-2.15/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.15/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.15/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.15/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.15/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.15/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.15.orig/ports/sysdeps/arm/gccframe.h glibc-2.15/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.15/ports/sysdeps/arm/gmp-mparam.h diff --git a/patches/glibc/ports-2.15/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.15/580-nptl-lowlevellock.patch deleted file mode 100644 index a39e463..0000000 --- a/patches/glibc/ports-2.15/580-nptl-lowlevellock.patch +++ /dev/null @@ -1,23 +0,0 @@ -fix build error on arm like on hppa: - -arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include /* Need THREAD_*, and header.*. */ - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 -diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/patches/glibc/ports-2.15/610-fpu-cw-mips.patch b/patches/glibc/ports-2.15/610-fpu-cw-mips.patch deleted file mode 100644 index 8692a1f..0000000 --- a/patches/glibc/ports-2.15/610-fpu-cw-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html - -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 -@@ -86,7 +86,7 @@ - #define _FPU_RC_UP 0x2 - #define _FPU_RC_DOWN 0x3 - --#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ -+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ - - - /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.15.orig/ports/sysdeps/mips/fpu_control.h glibc-2.15/ports/sysdeps/mips/fpu_control.h diff --git a/patches/glibc/ports-2.15/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.15/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/patches/glibc/ports-2.15/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/patches/glibc/ports-2.15/640-alpha-atfcts.patch b/patches/glibc/ports-2.15/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/patches/glibc/ports-2.15/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/ports-2.15/650-syslog.patch b/patches/glibc/ports-2.15/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/patches/glibc/ports-2.15/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/patches/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/patches/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch deleted file mode 100644 index 59f95aa..0000000 --- a/patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/patches/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index dce491c..0000000 --- a/patches/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -668,6 +668,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/patches/glibc/ports-2.16.0/180-resolv-dynamic.patch b/patches/glibc/ports-2.16.0/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/patches/glibc/ports-2.16.0/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/patches/glibc/ports-2.16.0/200-fadvise64_64.patch b/patches/glibc/ports-2.16.0/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/patches/glibc/ports-2.16.0/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/patches/glibc/ports-2.16.0/260-assume-pipe2.patch b/patches/glibc/ports-2.16.0/260-assume-pipe2.patch deleted file mode 100644 index 54f0382..0000000 --- a/patches/glibc/ports-2.16.0/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.16.0.orig/socket/have_sock_cloexec.c glibc-2.16.0/socket/have_sock_cloexec.c ---- glibc-2.16.0.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.16.0/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -15,9 +15,14 @@ - License along with the GNU C Library; if not, see - . */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/patches/glibc/ports-2.16.0/270-china.patch b/patches/glibc/ports-2.16.0/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/patches/glibc/ports-2.16.0/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/patches/glibc/ports-2.16.0/280-new-valencian-locale.patch b/patches/glibc/ports-2.16.0/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/patches/glibc/ports-2.16.0/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/patches/glibc/ports-2.16.0/300-nscd-one-fork.patch b/patches/glibc/ports-2.16.0/300-nscd-one-fork.patch deleted file mode 100644 index 13b2861..0000000 --- a/patches/glibc/ports-2.16.0/300-nscd-one-fork.patch +++ /dev/null @@ -1,43 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -203,6 +203,9 @@ - exit (0); - } - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -252,15 +255,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- if (run_mode == RUN_DAEMONIZE) -- { -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- } -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/patches/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch deleted file mode 100644 index 11e8a65..0000000 --- a/patches/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -266,9 +266,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - gen-as-const-headers = pthread-errnos.sym - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/patches/glibc/ports-2.16.0/330-m68k-sys-user.patch b/patches/glibc/ports-2.16.0/330-m68k-sys-user.patch deleted file mode 100644 index f113996..0000000 --- a/patches/glibc/ports-2.16.0/330-m68k-sys-user.patch +++ /dev/null @@ -1,97 +0,0 @@ -copied from kernel as it is sanitized now - -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 -@@ -1,3 +1,90 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+/* Core file format: The core file is written in such a way that gdb -+ can understand it and provide useful information to the user (under -+ linux we use the 'trad-core' bfd). There are quite a number of -+ obstacles to being able to view the contents of the floating point -+ registers, and until these are solved you will not be able to view the -+ contents of them. Actually, you can read in the core file and look at -+ the contents of the user struct to find out what the floating point -+ registers contain. -+ The actual file contents are as follows: -+ UPAGE: 1 page consisting of a user struct that tells gdb what is present -+ in the file. Directly after this is a copy of the task_struct, which -+ is currently not used by gdb, but it may come in useful at some point. -+ All of the registers are stored as part of the upage. The upage should -+ always be only one page. -+ DATA: The data area is stored. We use current->end_text to -+ current->brk to pick up all of the user variables, plus any memory -+ that may have been malloced. No attempt is made to determine if a page -+ is demand-zero or if a page is totally unused, we just cover the entire -+ range. All of the addresses are rounded in such a way that an integral -+ number of pages is written. -+ STACK: We need the stack information in order to get a meaningful -+ backtrace. We need to write the data from (esp) to -+ current->start_stack, so we round each of these off in order to be able -+ to write an integer number of pages. -+ The minimum core file size is 3 pages, or 12288 bytes. -+*/ -+ -+struct user_m68kfp_struct { -+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ -+ unsigned long fpcntl[3]; /* fp control regs */ -+}; -+ -+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and -+ is still the layout used by user (the new pt_regs doesn't have -+ all registers). */ -+struct user_regs_struct { -+ long d1,d2,d3,d4,d5,d6,d7; -+ long a0,a1,a2,a3,a4,a5,a6; -+ long d0; -+ long usp; -+ long orig_d0; -+ short stkadj; -+ short sr; -+ long pc; -+ short fmtvec; -+ short __fill; -+}; -+ -+ -+/* When the kernel dumps core, it starts by dumping the user struct - -+ this will be used by gdb to figure out where the data and stack segments -+ are within the file, and what virtual addresses to use. */ -+struct user{ -+/* We start with the registers, to mimic the way that "memory" is returned -+ from the ptrace(3,...) function. */ -+ struct user_regs_struct regs; /* Where the registers are actually stored */ -+/* ptrace does not yet supply these. Someday.... */ -+ int u_fpvalid; /* True if math co-processor being used. */ -+ /* for this mess. Not yet used. */ -+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ -+/* The rest of this junk is to help gdb figure out what goes where */ -+ unsigned long int u_tsize; /* Text segment size (pages). */ -+ unsigned long int u_dsize; /* Data segment size (pages). */ -+ unsigned long int u_ssize; /* Stack segment size (pages). */ -+ unsigned long start_code; /* Starting virtual address of text. */ -+ unsigned long start_stack; /* Starting virtual address of stack area. -+ This is actually the bottom of the stack, -+ the top of the stack is always found in the -+ esp register. */ -+ long int signal; /* Signal that caused the core dump. */ -+ int reserved; /* No longer used */ -+ struct user_regs_struct *u_ar0; -+ /* Used by gdb to help find the values for */ -+ /* the registers. */ -+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ -+ unsigned long magic; /* To uniquely identify a core file */ -+ char u_comm[32]; /* User command that was responsible */ -+}; -+#define NBPG 4096 -+#define UPAGES 1 -+#define HOST_TEXT_START_ADDR (u.start_code) -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -+ -+#endif - /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/patches/glibc/ports-2.16.0/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.16.0/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/patches/glibc/ports-2.16.0/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/patches/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/patches/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/patches/glibc/ports-2.16.0/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.16.0/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/patches/glibc/ports-2.16.0/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/patches/glibc/ports-2.16.0/380-dont-build-timezone.patch b/patches/glibc/ports-2.16.0/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/patches/glibc/ports-2.16.0/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/patches/glibc/ports-2.16.0/400-alpha-xstat.patch b/patches/glibc/ports-2.16.0/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/patches/glibc/ports-2.16.0/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/patches/glibc/ports-2.16.0/430-alpha-creat.patch b/patches/glibc/ports-2.16.0/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/patches/glibc/ports-2.16.0/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/patches/glibc/ports-2.16.0/440-alpha-cache-shape.patch b/patches/glibc/ports-2.16.0/440-alpha-cache-shape.patch deleted file mode 100644 index 5b1a298..0000000 --- a/patches/glibc/ports-2.16.0/440-alpha-cache-shape.patch +++ /dev/null @@ -1,13 +0,0 @@ -older verisons of glibc would build dl-sysdep as shared-only and dl-support as -static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of -glibc build dl-sysdep as both shared and static which means we now have symbol -duplication for static builds with dl-sysdep and dl-support. since dl-sysdep -is both shared/static, there is no point in hooking dl-support anymore, so we -can punt it. - -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 -@@ -1,2 +1,1 @@ --#include "dl-auxv.h" - #include diff --git a/patches/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch deleted file mode 100644 index f2ff04f..0000000 --- a/patches/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch +++ /dev/null @@ -1,56 +0,0 @@ -2006-05-30 Falk Hueffner - - * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture - to ev6 in assembly code. - -{standard input}: Assembler messages: -{standard input}:341: Error: macro requires $at register while noat in effect -{standard input}:374: Error: macro requires $at register while noat in effect -{standard input}:438: Error: macro requires $at register while noat in effect -{standard input}:471: Error: macro requires $at register while noat in effect -make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 - -Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. -I cannot really think of anything better than - - ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 -@@ -178,13 +178,13 @@ - static inline void - stb_mb(unsigned char val, unsigned long addr) - { -- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); - } - - static inline void - stw_mb(unsigned short val, unsigned long addr) - { -- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); - } - - static inline void -@@ -356,7 +356,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - -- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); -+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; - } - -@@ -366,7 +366,7 @@ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - -- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); -+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; - } - -diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/patches/glibc/ports-2.16.0/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.16.0/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index acf250d..0000000 --- a/patches/glibc/ports-2.16.0/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -21,6 +21,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/patches/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 42faaa5..0000000 --- a/patches/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch +++ /dev/null @@ -1,21 +0,0 @@ -2009-05-26 Aurelien Jarno - - * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). - - ports/sysdeps/alpha/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 -@@ -35,7 +35,8 @@ - - ifeq ($(subdir),elf) - # The ld.so startup code cannot use literals until it self-relocates. --CFLAGS-rtld.c = -mbuild-constants -+# It uses more than 64k for the small data area. -+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag) - endif - - # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.16.0.orig/ports/sysdeps/alpha/Makefile glibc-2.16.0/ports/sysdeps/alpha/Makefile diff --git a/patches/glibc/ports-2.16.0/560-ppc-atomic.patch b/patches/glibc/ports-2.16.0/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/patches/glibc/ports-2.16.0/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/patches/glibc/ports-2.16.0/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.16.0/580-nptl-lowlevellock.patch deleted file mode 100644 index 185331c..0000000 --- a/patches/glibc/ports-2.16.0/580-nptl-lowlevellock.patch +++ /dev/null @@ -1,23 +0,0 @@ -fix build error on arm like on hppa: - -arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1 -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) - -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include /* Need THREAD_*, and header.*. */ - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 -diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/patches/glibc/ports-2.16.0/610-fpu-cw-mips.patch b/patches/glibc/ports-2.16.0/610-fpu-cw-mips.patch deleted file mode 100644 index 0c0daf3..0000000 --- a/patches/glibc/ports-2.16.0/610-fpu-cw-mips.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html - -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 -@@ -86,7 +86,7 @@ - #define _FPU_RC_UP 0x2 - #define _FPU_RC_DOWN 0x3 - --#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ -+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ - - - /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.16.0.orig/ports/sysdeps/mips/fpu_control.h glibc-2.16.0/ports/sysdeps/mips/fpu_control.h diff --git a/patches/glibc/ports-2.16.0/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.16.0/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/patches/glibc/ports-2.16.0/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/patches/glibc/ports-2.16.0/640-alpha-atfcts.patch b/patches/glibc/ports-2.16.0/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/patches/glibc/ports-2.16.0/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/ports-2.16.0/650-syslog.patch b/patches/glibc/ports-2.16.0/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/patches/glibc/ports-2.16.0/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/patches/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/patches/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/patches/linux/2.6.32.27/100-unifdef-strclpy.patch b/patches/linux/2.6.32.27/100-unifdef-strclpy.patch deleted file mode 100644 index 072fac6..0000000 --- a/patches/linux/2.6.32.27/100-unifdef-strclpy.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- linux-2.6.32.27/scripts/unifdef.c.orig 2017-03-08 21:42:27.000000000 -0800 -+++ linux-2.6.32.27/scripts/unifdef.c 2017-03-08 21:42:44.000000000 -0800 -@@ -72,8 +72,6 @@ - #include - #include - --size_t strlcpy(char *dst, const char *src, size_t siz); -- - /* types of input lines: */ - typedef enum { - LT_TRUEI, /* a true #if with ignore flag */ diff --git a/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch deleted file mode 100644 index 3d05b63..0000000 --- a/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 -@@ -12,9 +12,8 @@ - #define PATHTOOLS_H - - #include --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 -@@ -8,9 +8,8 @@ - .email: . - */ - --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include diff --git a/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch deleted file mode 100644 index 3d05b63..0000000 --- a/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 -@@ -12,9 +12,8 @@ - #define PATHTOOLS_H - - #include --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 -@@ -8,9 +8,8 @@ - .email: . - */ - --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include diff --git a/patches/mingw-w64/v5.0.2/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.2/100-mingw64-malloc.patch deleted file mode 100644 index 3d05b63..0000000 --- a/patches/mingw-w64/v5.0.2/100-mingw64-malloc.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 -@@ -12,9 +12,8 @@ - #define PATHTOOLS_H - - #include --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 -@@ -8,9 +8,8 @@ - .email: . - */ - --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include diff --git a/patches/newlib/1.17.0/110-fix-eabihf.patch b/patches/newlib/1.17.0/110-fix-eabihf.patch deleted file mode 100644 index d896ad0..0000000 --- a/patches/newlib/1.17.0/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-1.17.0.orig/libgloss/arm/configure newlib-1.17.0/libgloss/arm/configure ---- newlib-1.17.0.orig/libgloss/arm/configure 2017-04-11 00:41:23.720866007 -0700 -+++ newlib-1.17.0/libgloss/arm/configure 2017-04-11 00:43:12.265788484 -0700 -@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-1.17.0.orig/libgloss/arm/configure.in newlib-1.17.0/libgloss/arm/configure.in ---- newlib-1.17.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:23.720866007 -0700 -+++ newlib-1.17.0/libgloss/arm/configure.in 2017-04-11 00:43:12.265788484 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/1.17.0/200-fix-mt-cflags.patch b/patches/newlib/1.17.0/200-fix-mt-cflags.patch deleted file mode 100644 index f97ba15..0000000 --- a/patches/newlib/1.17.0/200-fix-mt-cflags.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -urpN newlib-1.17.0.orig/config/mt-d30v newlib-1.17.0/config/mt-d30v ---- newlib-1.17.0.orig/config/mt-d30v 2017-04-11 00:51:26.572757941 -0700 -+++ newlib-1.17.0/config/mt-d30v 2017-04-11 00:55:51.110626527 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-1.17.0.orig/config/mt-gnu newlib-1.17.0/config/mt-gnu ---- newlib-1.17.0.orig/config/mt-gnu 2017-04-11 00:51:26.572757941 -0700 -+++ newlib-1.17.0/config/mt-gnu 2017-04-11 00:55:51.110626527 -0700 -@@ -1,2 +1,2 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \ -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \ - $(DEBUG_PREFIX_CFLAGS_FOR_TARGET) -D_GNU_SOURCE -diff -urpN newlib-1.17.0.orig/config/mt-ospace newlib-1.17.0/config/mt-ospace ---- newlib-1.17.0.orig/config/mt-ospace 2017-04-11 00:51:26.572757941 -0700 -+++ newlib-1.17.0/config/mt-ospace 2017-04-11 00:55:51.110626527 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/1.17.0/999-fix-arm-build.patch b/patches/newlib/1.17.0/999-fix-arm-build.patch deleted file mode 100644 index 154a92f..0000000 --- a/patches/newlib/1.17.0/999-fix-arm-build.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -urpN newlib-1.17.0.orig/libgloss/arm/linux-syscalls0.S newlib-1.17.0/libgloss/arm/linux-syscalls0.S ---- newlib-1.17.0.orig/libgloss/arm/linux-syscalls0.S 2017-04-10 23:18:30.559142019 -0700 -+++ newlib-1.17.0/libgloss/arm/linux-syscalls0.S 2017-04-10 23:35:06.422568832 -0700 -@@ -19,47 +19,6 @@ - #define GLOBAL(name) .global name; FUNC(name) - #define SIZE(name) .size name, .-name - --#if __thumb__ -- --# define SYSCALL0(name) \ -- GLOBAL(_ ## name); \ -- mov r12, r7; \ -- mov r7, #SYS_ ## name; \ -- swi; \ -- mov r7, r12; \ -- b _set_errno; \ -- SIZE(_ ## name) -- --/* static int _syscall3(int a, int b, int c, int number); */ --FUNC(_syscall3) -- push { r7 } -- mov r7, r3 -- swi -- pop { r7 } -- b _set_errno -- SIZE(_syscall3) -- --# define SYSCALL3(name) \ -- GLOBAL(_ ## name); \ -- mov r3, #SYS_ ## name; \ -- b _syscall3; \ -- SIZE(_ ## name) -- --# define SYSCALL6(name) \ -- GLOBAL(_ ## name); \ -- push { r4 - r5, r7 }; \ -- ldr r4, [sp, #12]; \ -- ldr r5, [sp, #16]; \ -- mov r7, #SYS_ ## name; \ -- swi; \ -- pop { r4 - r5, r7 }; \ -- b _set_errno; \ -- SIZE(_ ## name) -- --# define SYSCALL4(name) SYSCALL6(name) -- --#else /* __thumb__ */ -- - # define SYSCALL4(name) \ - GLOBAL(_ ## name); \ - swi #SYS_ ## name; \ -@@ -78,9 +37,6 @@ FUNC(_syscall3) - - #define SYSCALL0(name) SYSCALL3(name) - #define SYSCALL3(name) SYSCALL4(name) -- --#endif /* __thumb__ */ -- - #define SYSCALL1(name) SYSCALL3(name) - #define SYSCALL2(name) SYSCALL3(name) - #define SYSCALL5(name) SYSCALL6(name) -Binary files newlib-1.17.0.orig/libgloss/arm/.linux-syscalls0.S.swp and newlib-1.17.0/libgloss/arm/.linux-syscalls0.S.swp differ diff --git a/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 6214ee5..0000000 --- a/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,23 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.18.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mcpu32__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/1.18.0/110-fix-eabihf.patch b/patches/newlib/1.18.0/110-fix-eabihf.patch deleted file mode 100644 index c2868b9..0000000 --- a/patches/newlib/1.18.0/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-1.18.0.orig/libgloss/arm/configure newlib-1.18.0/libgloss/arm/configure ---- newlib-1.18.0.orig/libgloss/arm/configure 2017-04-11 00:41:23.864867229 -0700 -+++ newlib-1.18.0/libgloss/arm/configure 2017-04-11 00:43:12.273788551 -0700 -@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-1.18.0.orig/libgloss/arm/configure.in newlib-1.18.0/libgloss/arm/configure.in ---- newlib-1.18.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:23.864867229 -0700 -+++ newlib-1.18.0/libgloss/arm/configure.in 2017-04-11 00:43:12.273788551 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/1.18.0/200-fix-mt-cflags.patch b/patches/newlib/1.18.0/200-fix-mt-cflags.patch deleted file mode 100644 index 718e0c9..0000000 --- a/patches/newlib/1.18.0/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-1.18.0.orig/config/mt-d30v newlib-1.18.0/config/mt-d30v ---- newlib-1.18.0.orig/config/mt-d30v 2017-04-11 00:51:26.740759083 -0700 -+++ newlib-1.18.0/config/mt-d30v 2017-04-11 00:55:51.114626557 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-1.18.0.orig/config/mt-gnu newlib-1.18.0/config/mt-gnu ---- newlib-1.18.0.orig/config/mt-gnu 2017-04-11 00:51:26.740759083 -0700 -+++ newlib-1.18.0/config/mt-gnu 2017-04-11 00:55:51.114626557 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-1.18.0.orig/config/mt-ospace newlib-1.18.0/config/mt-ospace ---- newlib-1.18.0.orig/config/mt-ospace 2017-04-11 00:51:26.740759083 -0700 -+++ newlib-1.18.0/config/mt-ospace 2017-04-11 00:55:51.114626557 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 191363a..0000000 --- a/patches/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,25 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.19.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.19.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.19.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/1.19.0/110-fix-eabihf.patch b/patches/newlib/1.19.0/110-fix-eabihf.patch deleted file mode 100644 index 69ddff3..0000000 --- a/patches/newlib/1.19.0/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-1.19.0.orig/libgloss/arm/configure newlib-1.19.0/libgloss/arm/configure ---- newlib-1.19.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.072868994 -0700 -+++ newlib-1.19.0/libgloss/arm/configure 2017-04-11 00:43:12.281788619 -0700 -@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-1.19.0.orig/libgloss/arm/configure.in newlib-1.19.0/libgloss/arm/configure.in ---- newlib-1.19.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.072868994 -0700 -+++ newlib-1.19.0/libgloss/arm/configure.in 2017-04-11 00:43:12.281788619 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/1.19.0/200-fix-mt-cflags.patch b/patches/newlib/1.19.0/200-fix-mt-cflags.patch deleted file mode 100644 index 9158e90..0000000 --- a/patches/newlib/1.19.0/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-1.19.0.orig/config/mt-d30v newlib-1.19.0/config/mt-d30v ---- newlib-1.19.0.orig/config/mt-d30v 2017-04-11 00:51:26.912760252 -0700 -+++ newlib-1.19.0/config/mt-d30v 2017-04-11 00:55:51.118626585 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-1.19.0.orig/config/mt-gnu newlib-1.19.0/config/mt-gnu ---- newlib-1.19.0.orig/config/mt-gnu 2017-04-11 00:51:26.912760252 -0700 -+++ newlib-1.19.0/config/mt-gnu 2017-04-11 00:55:51.118626585 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-1.19.0.orig/config/mt-ospace newlib-1.19.0/config/mt-ospace ---- newlib-1.19.0.orig/config/mt-ospace 2017-04-11 00:51:26.912760252 -0700 -+++ newlib-1.19.0/config/mt-ospace 2017-04-11 00:55:51.118626585 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/1.20.0/110-fix-eabihf.patch b/patches/newlib/1.20.0/110-fix-eabihf.patch deleted file mode 100644 index 8e30823..0000000 --- a/patches/newlib/1.20.0/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-1.20.0.orig/libgloss/arm/configure newlib-1.20.0/libgloss/arm/configure ---- newlib-1.20.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.120869401 -0700 -+++ newlib-1.20.0/libgloss/arm/configure 2017-04-11 00:43:12.289788688 -0700 -@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-1.20.0.orig/libgloss/arm/configure.in newlib-1.20.0/libgloss/arm/configure.in ---- newlib-1.20.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.120869401 -0700 -+++ newlib-1.20.0/libgloss/arm/configure.in 2017-04-11 00:43:12.289788688 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/1.20.0/200-fix-mt-cflags.patch b/patches/newlib/1.20.0/200-fix-mt-cflags.patch deleted file mode 100644 index b470af7..0000000 --- a/patches/newlib/1.20.0/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-1.20.0.orig/config/mt-d30v newlib-1.20.0/config/mt-d30v ---- newlib-1.20.0.orig/config/mt-d30v 2017-04-11 00:51:27.080761393 -0700 -+++ newlib-1.20.0/config/mt-d30v 2017-04-11 00:55:51.122626615 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-1.20.0.orig/config/mt-gnu newlib-1.20.0/config/mt-gnu ---- newlib-1.20.0.orig/config/mt-gnu 2017-04-11 00:51:27.080761393 -0700 -+++ newlib-1.20.0/config/mt-gnu 2017-04-11 00:55:51.122626615 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-1.20.0.orig/config/mt-ospace newlib-1.20.0/config/mt-ospace ---- newlib-1.20.0.orig/config/mt-ospace 2017-04-11 00:51:27.080761393 -0700 -+++ newlib-1.20.0/config/mt-ospace 2017-04-11 00:55:51.122626615 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/2.0.0/110-fix-eabihf.patch b/patches/newlib/2.0.0/110-fix-eabihf.patch deleted file mode 100644 index 5bb2405..0000000 --- a/patches/newlib/2.0.0/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-2.0.0.orig/libgloss/arm/configure newlib-2.0.0/libgloss/arm/configure ---- newlib-2.0.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.304870963 -0700 -+++ newlib-2.0.0/libgloss/arm/configure 2017-04-11 00:43:12.297788756 -0700 -@@ -2540,7 +2540,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-2.0.0.orig/libgloss/arm/configure.in newlib-2.0.0/libgloss/arm/configure.in ---- newlib-2.0.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.304870963 -0700 -+++ newlib-2.0.0/libgloss/arm/configure.in 2017-04-11 00:43:12.297788756 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/2.0.0/200-fix-mt-cflags.patch b/patches/newlib/2.0.0/200-fix-mt-cflags.patch deleted file mode 100644 index d2b0529..0000000 --- a/patches/newlib/2.0.0/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-2.0.0.orig/config/mt-d30v newlib-2.0.0/config/mt-d30v ---- newlib-2.0.0.orig/config/mt-d30v 2017-04-11 00:51:27.256762590 -0700 -+++ newlib-2.0.0/config/mt-d30v 2017-04-11 00:55:51.126626644 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-2.0.0.orig/config/mt-gnu newlib-2.0.0/config/mt-gnu ---- newlib-2.0.0.orig/config/mt-gnu 2017-04-11 00:51:27.256762590 -0700 -+++ newlib-2.0.0/config/mt-gnu 2017-04-11 00:55:51.126626644 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-2.0.0.orig/config/mt-ospace newlib-2.0.0/config/mt-ospace ---- newlib-2.0.0.orig/config/mt-ospace 2017-04-11 00:51:27.256762590 -0700 -+++ newlib-2.0.0/config/mt-ospace 2017-04-11 00:55:51.126626644 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/2.1.0/110-fix-eabihf.patch b/patches/newlib/2.1.0/110-fix-eabihf.patch deleted file mode 100644 index 5f91a23..0000000 --- a/patches/newlib/2.1.0/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-2.1.0.orig/libgloss/arm/configure newlib-2.1.0/libgloss/arm/configure ---- newlib-2.1.0.orig/libgloss/arm/configure 2017-04-11 00:41:24.592873407 -0700 -+++ newlib-2.1.0/libgloss/arm/configure 2017-04-11 00:43:12.305788823 -0700 -@@ -2541,7 +2541,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-2.1.0.orig/libgloss/arm/configure.in newlib-2.1.0/libgloss/arm/configure.in ---- newlib-2.1.0.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.592873407 -0700 -+++ newlib-2.1.0/libgloss/arm/configure.in 2017-04-11 00:43:12.305788823 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi) -+ *-*-elf | *-*-eabi*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/2.1.0/200-fix-mt-cflags.patch b/patches/newlib/2.1.0/200-fix-mt-cflags.patch deleted file mode 100644 index 57839ed..0000000 --- a/patches/newlib/2.1.0/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-2.1.0.orig/config/mt-d30v newlib-2.1.0/config/mt-d30v ---- newlib-2.1.0.orig/config/mt-d30v 2017-04-11 00:51:27.380763434 -0700 -+++ newlib-2.1.0/config/mt-d30v 2017-04-11 00:55:51.130626674 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-2.1.0.orig/config/mt-gnu newlib-2.1.0/config/mt-gnu ---- newlib-2.1.0.orig/config/mt-gnu 2017-04-11 00:51:27.380763434 -0700 -+++ newlib-2.1.0/config/mt-gnu 2017-04-11 00:55:51.130626674 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-2.1.0.orig/config/mt-ospace newlib-2.1.0/config/mt-ospace ---- newlib-2.1.0.orig/config/mt-ospace 2017-04-11 00:51:27.380763434 -0700 -+++ newlib-2.1.0/config/mt-ospace 2017-04-11 00:55:51.130626674 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/2.2.0.20151023/110-fix-eabihf.patch b/patches/newlib/2.2.0.20151023/110-fix-eabihf.patch deleted file mode 100644 index 2d5a3ff..0000000 --- a/patches/newlib/2.2.0.20151023/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-2.2.0.20151023.orig/libgloss/arm/configure newlib-2.2.0.20151023/libgloss/arm/configure ---- newlib-2.2.0.20151023.orig/libgloss/arm/configure 2017-04-11 00:41:24.816875309 -0700 -+++ newlib-2.2.0.20151023/libgloss/arm/configure 2017-04-11 00:43:12.313788892 -0700 -@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-2.2.0.20151023.orig/libgloss/arm/configure.in newlib-2.2.0.20151023/libgloss/arm/configure.in ---- newlib-2.2.0.20151023.orig/libgloss/arm/configure.in 2017-04-11 00:41:24.816875309 -0700 -+++ newlib-2.2.0.20151023/libgloss/arm/configure.in 2017-04-11 00:43:12.313788892 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/2.2.0.20151023/200-fix-mt-cflags.patch b/patches/newlib/2.2.0.20151023/200-fix-mt-cflags.patch deleted file mode 100644 index e1d8c02..0000000 --- a/patches/newlib/2.2.0.20151023/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-2.2.0.20151023.orig/config/mt-d30v newlib-2.2.0.20151023/config/mt-d30v ---- newlib-2.2.0.20151023.orig/config/mt-d30v 2017-04-11 00:51:27.580764794 -0700 -+++ newlib-2.2.0.20151023/config/mt-d30v 2017-04-11 00:55:51.130626674 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-2.2.0.20151023.orig/config/mt-gnu newlib-2.2.0.20151023/config/mt-gnu ---- newlib-2.2.0.20151023.orig/config/mt-gnu 2017-04-11 00:51:27.576764766 -0700 -+++ newlib-2.2.0.20151023/config/mt-gnu 2017-04-11 00:55:51.130626674 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-2.2.0.20151023.orig/config/mt-ospace newlib-2.2.0.20151023/config/mt-ospace ---- newlib-2.2.0.20151023.orig/config/mt-ospace 2017-04-11 00:51:27.576764766 -0700 -+++ newlib-2.2.0.20151023/config/mt-ospace 2017-04-11 00:55:51.130626674 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/2.3.0.20160226/110-fix-eabihf.patch b/patches/newlib/2.3.0.20160226/110-fix-eabihf.patch deleted file mode 100644 index 37d8842..0000000 --- a/patches/newlib/2.3.0.20160226/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-2.3.0.20160226.orig/libgloss/arm/configure newlib-2.3.0.20160226/libgloss/arm/configure ---- newlib-2.3.0.20160226.orig/libgloss/arm/configure 2017-04-11 00:41:25.064877413 -0700 -+++ newlib-2.3.0.20160226/libgloss/arm/configure 2017-04-11 00:43:12.321788960 -0700 -@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-2.3.0.20160226.orig/libgloss/arm/configure.in newlib-2.3.0.20160226/libgloss/arm/configure.in ---- newlib-2.3.0.20160226.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.064877413 -0700 -+++ newlib-2.3.0.20160226/libgloss/arm/configure.in 2017-04-11 00:43:12.321788960 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/2.3.0.20160226/200-fix-mt-cflags.patch b/patches/newlib/2.3.0.20160226/200-fix-mt-cflags.patch deleted file mode 100644 index 8c080e4..0000000 --- a/patches/newlib/2.3.0.20160226/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-2.3.0.20160226.orig/config/mt-d30v newlib-2.3.0.20160226/config/mt-d30v ---- newlib-2.3.0.20160226.orig/config/mt-d30v 2017-04-11 00:51:27.736765855 -0700 -+++ newlib-2.3.0.20160226/config/mt-d30v 2017-04-11 00:55:51.134626702 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-2.3.0.20160226.orig/config/mt-gnu newlib-2.3.0.20160226/config/mt-gnu ---- newlib-2.3.0.20160226.orig/config/mt-gnu 2017-04-11 00:51:27.736765855 -0700 -+++ newlib-2.3.0.20160226/config/mt-gnu 2017-04-11 00:55:51.134626702 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-2.3.0.20160226.orig/config/mt-ospace newlib-2.3.0.20160226/config/mt-ospace ---- newlib-2.3.0.20160226.orig/config/mt-ospace 2017-04-11 00:51:27.736765855 -0700 -+++ newlib-2.3.0.20160226/config/mt-ospace 2017-04-11 00:55:51.134626702 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/2.4.0.20161025/110-fix-eabihf.patch b/patches/newlib/2.4.0.20161025/110-fix-eabihf.patch deleted file mode 100644 index 65122f1..0000000 --- a/patches/newlib/2.4.0.20161025/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-2.4.0.20161025.orig/libgloss/arm/configure newlib-2.4.0.20161025/libgloss/arm/configure ---- newlib-2.4.0.20161025.orig/libgloss/arm/configure 2017-04-11 00:41:25.240878908 -0700 -+++ newlib-2.4.0.20161025/libgloss/arm/configure 2017-04-11 00:43:12.325788994 -0700 -@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-2.4.0.20161025.orig/libgloss/arm/configure.in newlib-2.4.0.20161025/libgloss/arm/configure.in ---- newlib-2.4.0.20161025.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.236878874 -0700 -+++ newlib-2.4.0.20161025/libgloss/arm/configure.in 2017-04-11 00:43:12.325788994 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/2.4.0.20161025/200-fix-mt-cflags.patch b/patches/newlib/2.4.0.20161025/200-fix-mt-cflags.patch deleted file mode 100644 index dcf6826..0000000 --- a/patches/newlib/2.4.0.20161025/200-fix-mt-cflags.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -urpN newlib-2.4.0.20161025.orig/config/mt-d30v newlib-2.4.0.20161025/config/mt-d30v ---- newlib-2.4.0.20161025.orig/config/mt-d30v 2017-04-11 00:51:27.980767513 -0700 -+++ newlib-2.4.0.20161025/config/mt-d30v 2017-04-11 00:55:51.138626731 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C diff --git a/patches/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/2.5.0.20170519/200-fix-mt-cflags.patch b/patches/newlib/2.5.0.20170519/200-fix-mt-cflags.patch deleted file mode 100644 index cc15551..0000000 --- a/patches/newlib/2.5.0.20170519/200-fix-mt-cflags.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -urpN newlib-2.5.0.20170323.orig/config/mt-d30v newlib-2.5.0.20170323/config/mt-d30v ---- newlib-2.5.0.20170323.orig/config/mt-d30v 2017-04-11 00:51:28.180768874 -0700 -+++ newlib-2.5.0.20170323/config/mt-d30v 2017-04-11 00:55:51.138626731 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C diff --git a/patches/newlib/linaro-2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/linaro-2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/linaro-2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/linaro-2.1.0-2014.09/110-fix-eabihf.patch b/patches/newlib/linaro-2.1.0-2014.09/110-fix-eabihf.patch deleted file mode 100644 index 21a3149..0000000 --- a/patches/newlib/linaro-2.1.0-2014.09/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure newlib-linaro-2.1.0-2014.09/libgloss/arm/configure ---- newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure 2017-04-11 00:41:25.484880978 -0700 -+++ newlib-linaro-2.1.0-2014.09/libgloss/arm/configure 2017-04-11 00:43:12.341789130 -0700 -@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure.in newlib-linaro-2.1.0-2014.09/libgloss/arm/configure.in ---- newlib-linaro-2.1.0-2014.09.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.484880978 -0700 -+++ newlib-linaro-2.1.0-2014.09/libgloss/arm/configure.in 2017-04-11 00:43:12.341789130 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/linaro-2.1.0-2014.09/200-fix-mt-cflags.patch b/patches/newlib/linaro-2.1.0-2014.09/200-fix-mt-cflags.patch deleted file mode 100644 index f64c170..0000000 --- a/patches/newlib/linaro-2.1.0-2014.09/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-linaro-2.1.0-2014.09.orig/config/mt-d30v newlib-linaro-2.1.0-2014.09/config/mt-d30v ---- newlib-linaro-2.1.0-2014.09.orig/config/mt-d30v 2017-04-11 00:51:28.188768929 -0700 -+++ newlib-linaro-2.1.0-2014.09/config/mt-d30v 2017-04-11 00:55:51.142626761 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-linaro-2.1.0-2014.09.orig/config/mt-gnu newlib-linaro-2.1.0-2014.09/config/mt-gnu ---- newlib-linaro-2.1.0-2014.09.orig/config/mt-gnu 2017-04-11 00:51:28.188768929 -0700 -+++ newlib-linaro-2.1.0-2014.09/config/mt-gnu 2017-04-11 00:55:51.142626761 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-linaro-2.1.0-2014.09.orig/config/mt-ospace newlib-linaro-2.1.0-2014.09/config/mt-ospace ---- newlib-linaro-2.1.0-2014.09.orig/config/mt-ospace 2017-04-11 00:51:28.188768929 -0700 -+++ newlib-linaro-2.1.0-2014.09/config/mt-ospace 2017-04-11 00:55:51.142626761 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/newlib/linaro-2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch b/patches/newlib/linaro-2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch deleted file mode 100644 index 1d0b49b..0000000 --- a/patches/newlib/linaro-2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch +++ /dev/null @@ -1,27 +0,0 @@ -The m68k mcpu processor does not like unaligned access - -Disable at least mcpu32, m68010 and m68020. These processors certainly -do not like unaligned accesses. - -Signed-off-by: Remy Bohmer -[yann.morin.1998@anciens.enib.fr: update for 1.19.0 from 1.18.0] -Signed-off-by: "Yann E. MORIN" -[austinpmorton@gmail.com: update for 1.20.0 from 1.19.0] -Signed-off-by: Austin Morton ---- - newlib/libc/machine/m68k/memcpy.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -=================================================================== ---- newlib-1.20.0.orig/newlib/libc/machine/m68k/memcpy.S -+++ newlib-1.20.0/newlib/libc/machine/m68k/memcpy.S -@@ -15,7 +15,7 @@ - - #include "m68kasm.h" - --#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) -+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__) - # define MISALIGNED_OK 1 - #else - # define MISALIGNED_OK 0 diff --git a/patches/newlib/linaro-2.2.0-2015.01/110-fix-eabihf.patch b/patches/newlib/linaro-2.2.0-2015.01/110-fix-eabihf.patch deleted file mode 100644 index 1fa21cc..0000000 --- a/patches/newlib/linaro-2.2.0-2015.01/110-fix-eabihf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urpN newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure newlib-linaro-2.2.0-2015.01/libgloss/arm/configure ---- newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure 2017-04-11 00:41:25.672882574 -0700 -+++ newlib-linaro-2.2.0-2015.01/libgloss/arm/configure 2017-04-11 00:43:12.349789198 -0700 -@@ -2531,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA - - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) -diff -urpN newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure.in newlib-linaro-2.2.0-2015.01/libgloss/arm/configure.in ---- newlib-linaro-2.2.0-2015.01.orig/libgloss/arm/configure.in 2017-04-11 00:41:25.672882574 -0700 -+++ newlib-linaro-2.2.0-2015.01/libgloss/arm/configure.in 2017-04-11 00:43:12.349789198 -0700 -@@ -49,7 +49,7 @@ AC_PROG_RANLIB - LIB_AM_PROG_AS - - case "${target}" in -- *-*-elf | *-*-eabi | *-*-tirtos*) -+ *-*-elf | *-*-eabi* | *-*-tirtos*) - objtype=elf- - ;; - *-*-coff) diff --git a/patches/newlib/linaro-2.2.0-2015.01/200-fix-mt-cflags.patch b/patches/newlib/linaro-2.2.0-2015.01/200-fix-mt-cflags.patch deleted file mode 100644 index 68e935b..0000000 --- a/patches/newlib/linaro-2.2.0-2015.01/200-fix-mt-cflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urpN newlib-linaro-2.2.0-2015.01.orig/config/mt-d30v newlib-linaro-2.2.0-2015.01/config/mt-d30v ---- newlib-linaro-2.2.0-2015.01.orig/config/mt-d30v 2017-04-11 00:51:28.364770125 -0700 -+++ newlib-linaro-2.2.0-2015.01/config/mt-d30v 2017-04-11 00:55:51.142626761 -0700 -@@ -1,4 +1,4 @@ - # Build libraries optimizing for space, not speed. - # Turn off warnings about symbols named the same as registers -- CFLAGS_FOR_TARGET = -g -Os -Wa,-C -- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C -+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C -+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C -diff -urpN newlib-linaro-2.2.0-2015.01.orig/config/mt-gnu newlib-linaro-2.2.0-2015.01/config/mt-gnu ---- newlib-linaro-2.2.0-2015.01.orig/config/mt-gnu 2017-04-11 00:51:28.364770125 -0700 -+++ newlib-linaro-2.2.0-2015.01/config/mt-gnu 2017-04-11 00:55:51.142626761 -0700 -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET += $(CXXFLAGS) -D_GNU_SOURCE -diff -urpN newlib-linaro-2.2.0-2015.01.orig/config/mt-ospace newlib-linaro-2.2.0-2015.01/config/mt-ospace ---- newlib-linaro-2.2.0-2015.01.orig/config/mt-ospace 2017-04-11 00:51:28.368770153 -0700 -+++ newlib-linaro-2.2.0-2015.01/config/mt-ospace 2017-04-11 00:55:51.142626761 -0700 -@@ -1,3 +1,3 @@ - # Build libraries optimizing for space, not speed. -- CFLAGS_FOR_TARGET = -g -Os -- CXXFLAGS_FOR_TARGET = -g -Os -+ CFLAGS_FOR_TARGET += -g -Os -+ CXXFLAGS_FOR_TARGET += -g -Os diff --git a/patches/uClibc-ng/1.0.20/100-xtensa-static-link.patch b/patches/uClibc-ng/1.0.20/100-xtensa-static-link.patch deleted file mode 100644 index 3f8a518..0000000 --- a/patches/uClibc-ng/1.0.20/100-xtensa-static-link.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch ---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 13:02:51.385861492 -0800 -+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 19:08:53.150146970 -0800 -@@ -32,10 +32,11 @@ libpthread_arch_SOBJ = $(patsubst %.S,$( - libpthread_arch_OBJS = $(libpthread_subarch_OBJS) $(libpthread_arch_COBJ) $(libpthread_arch_SOBJ) - - libc_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_CSRC)) --libc_arch_SOBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC)) -+libc_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC)) - libc_arch_OBJS = $(libc_arch_COBJ) $(libc_arch_SOBJ) - libc_arch_a_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_CSRC)) --libc_arch_a_OBJS = $(libc_arch_a_COBJ) -+libc_arch_a_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_SSRC)) -+libc_arch_a_OBJS = $(libc_arch_a_COBJ) $(libc_arch_a_SOBJ) - - librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC)) - librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC)) -diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S ---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 1969-12-31 16:00:00.000000000 -0800 -+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 2016-12-06 19:08:53.150146970 -0800 -@@ -0,0 +1 @@ -+#include -diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch ---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 13:02:51.401861642 -0800 -+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 19:08:53.150146970 -0800 -@@ -20,7 +20,7 @@ - ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread - - libc_arch_a_CSRC = libc-tls.c --librt_arch_a_SSRC = dl-tlsdesc.S -+libc_arch_a_SSRC = libc-dl-tlsdesc.S - - CFLAGS-gen_tlsdesc.c = -S - $(libpthread_arch_OUT)/gen_tlsdesc.c: $(libpthread_arch_DIR)/tlsdesc.sym | $(libpthread_arch_OUT) diff --git a/patches/uClibc-ng/1.0.20/110-has-lfs.patch b/patches/uClibc-ng/1.0.20/110-has-lfs.patch deleted file mode 100644 index c5b90de..0000000 --- a/patches/uClibc-ng/1.0.20/110-has-lfs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Mon, 23 Jan 2017 14:21:54 -0800 -Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled". - -Otherwise, buildroot rejects uClibc-ng in an external toolchain. - -Signed-off-by: Alexey Neyman ---- - extra/Configs/Config.in | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in -index a9d62f5..b2cf977 100644 ---- a/extra/Configs/Config.in -+++ b/extra/Configs/Config.in -@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG - Support sending messages to the system logger. - This requires socket-support. - -+config UCLIBC_HAS_LFS -+ def_bool y -+ help -+ Large file support (always enabled; config symbol retained for -+ feature test to be compatible with uClibc). - choice - prompt "Malloc Implementation" - default MALLOC if ! ARCH_USE_MMU --- -2.9.3 - diff --git a/patches/uClibc-ng/1.0.20/500-no-install-D.patch b/patches/uClibc-ng/1.0.20/500-no-install-D.patch deleted file mode 100644 index 83d3ff6..0000000 --- a/patches/uClibc-ng/1.0.20/500-no-install-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in ---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 -+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 -@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch deleted file mode 100644 index 4338f9f..0000000 --- a/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c ---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 -@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt, NULL); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr - if (tpnt1 != NULL) - return tpnt1; - #endif -+ - /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/util/ldd.c */ - _dl_if_debug_dprint("\tsearching full lib path list\n"); -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in ---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 -@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - ifeq ($(TARGET_ARCH),arc) - CFLAGS-ldso.c += -mno-long-calls - endif diff --git a/patches/uClibc-ng/1.0.20/700-features.h-c11.patch b/patches/uClibc-ng/1.0.20/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/patches/uClibc-ng/1.0.20/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/patches/uClibc-ng/1.0.21/110-has-lfs.patch b/patches/uClibc-ng/1.0.21/110-has-lfs.patch deleted file mode 100644 index c5b90de..0000000 --- a/patches/uClibc-ng/1.0.21/110-has-lfs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Mon, 23 Jan 2017 14:21:54 -0800 -Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled". - -Otherwise, buildroot rejects uClibc-ng in an external toolchain. - -Signed-off-by: Alexey Neyman ---- - extra/Configs/Config.in | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in -index a9d62f5..b2cf977 100644 ---- a/extra/Configs/Config.in -+++ b/extra/Configs/Config.in -@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG - Support sending messages to the system logger. - This requires socket-support. - -+config UCLIBC_HAS_LFS -+ def_bool y -+ help -+ Large file support (always enabled; config symbol retained for -+ feature test to be compatible with uClibc). - choice - prompt "Malloc Implementation" - default MALLOC if ! ARCH_USE_MMU --- -2.9.3 - diff --git a/patches/uClibc-ng/1.0.21/120-module.patch b/patches/uClibc-ng/1.0.21/120-module.patch deleted file mode 100644 index 2e8a989..0000000 --- a/patches/uClibc-ng/1.0.21/120-module.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit 03884934b32c79da545ef38a42835a6c257b125d -Author: Waldemar Brodkorb -Date: Tue Dec 27 09:24:24 2016 +0100 - - add init_module/delete_module syscall wrappers - - Add the wrappers unconditionally, because kmod package - still uses them. - -diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in -index 595074c..faed6fd 100644 ---- a/libc/sysdeps/linux/common/Makefile.in -+++ b/libc/sysdeps/linux/common/Makefile.in -@@ -31,6 +31,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \ - ioperm.c \ - iopl.c \ - modify_ldt.c \ -+ module.c \ - personality.c \ - pipe2.c \ - ppoll.c \ -diff --git a/libc/sysdeps/linux/common/module.c b/libc/sysdeps/linux/common/module.c -new file mode 100644 -index 0000000..146a43e ---- /dev/null -+++ b/libc/sysdeps/linux/common/module.c -@@ -0,0 +1,23 @@ -+/* -+ * init_module()/delete_module() for uClibc -+ * -+ * Copyright (C) 2000-2006 Erik Andersen -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include -+ -+#ifdef __NR_init_module -+int init_module(void *first, void *second, void *third, void *fourth, void *fifth); -+/* This may have 5 arguments (for old 2.0 kernels) or 2 arguments -+ * (for 2.2 and 2.4 kernels). Use the greatest common denominator, -+ * and let the kernel cope with whatever it gets. It's good at that. */ -+_syscall5(int, init_module, void *, first, void *, second, void *, third, -+ void *, fourth, void *, fifth) -+#endif -+ -+#ifdef __NR_delete_module -+int delete_module(const char *name, unsigned int flags); -+_syscall2(int, delete_module, const char *, name, unsigned int, flags) -+#endif diff --git a/patches/uClibc-ng/1.0.21/500-no-install-D.patch b/patches/uClibc-ng/1.0.21/500-no-install-D.patch deleted file mode 100644 index 83d3ff6..0000000 --- a/patches/uClibc-ng/1.0.21/500-no-install-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in ---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 -+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 -@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch deleted file mode 100644 index 4338f9f..0000000 --- a/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c ---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 -@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt, NULL); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr - if (tpnt1 != NULL) - return tpnt1; - #endif -+ - /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/util/ldd.c */ - _dl_if_debug_dprint("\tsearching full lib path list\n"); -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in ---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 -@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - ifeq ($(TARGET_ARCH),arc) - CFLAGS-ldso.c += -mno-long-calls - endif diff --git a/patches/uClibc-ng/1.0.21/700-features.h-c11.patch b/patches/uClibc-ng/1.0.21/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/patches/uClibc-ng/1.0.21/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/patches/uClibc-ng/1.0.22/500-no-install-D.patch b/patches/uClibc-ng/1.0.22/500-no-install-D.patch deleted file mode 100644 index 83d3ff6..0000000 --- a/patches/uClibc-ng/1.0.22/500-no-install-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in ---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 -+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 -@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch deleted file mode 100644 index 4338f9f..0000000 --- a/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c ---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 -@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt, NULL); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr - if (tpnt1 != NULL) - return tpnt1; - #endif -+ - /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/util/ldd.c */ - _dl_if_debug_dprint("\tsearching full lib path list\n"); -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in ---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 -@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - ifeq ($(TARGET_ARCH),arc) - CFLAGS-ldso.c += -mno-long-calls - endif diff --git a/patches/uClibc-ng/1.0.22/700-features.h-c11.patch b/patches/uClibc-ng/1.0.22/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/patches/uClibc-ng/1.0.22/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/patches/uClibc-ng/1.0.23/700-features.h-c11.patch b/patches/uClibc-ng/1.0.23/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/patches/uClibc-ng/1.0.23/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/patches/uClibc-ng/1.0.24/700-features.h-c11.patch b/patches/uClibc-ng/1.0.24/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/patches/uClibc-ng/1.0.24/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/patches/uClibc/0.9.33.2/100-m68k-ice.patch b/patches/uClibc/0.9.33.2/100-m68k-ice.patch deleted file mode 100644 index 410f8d6..0000000 --- a/patches/uClibc/0.9.33.2/100-m68k-ice.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN uClibc-0.9.33.2~orig/Rules.mak uClibc-0.9.33.2/Rules.mak ---- uClibc-0.9.33.2~orig/Rules.mak 2012-05-15 09:20:09.000000000 +0200 -+++ uClibc-0.9.33.2/Rules.mak 2012-09-24 14:09:51.092953729 +0200 -@@ -226,6 +226,7 @@ - - OPTIMIZATION:= - # Use '-Os' optimization if available, else use -O2, allow Config to override -+ifneq ($(TARGET_ARCH),m68k) - $(eval $(call check-gcc-var,-Os)) - ifneq ($(CFLAG_-Os),) - OPTIMIZATION += $(CFLAG_-Os) -@@ -233,6 +234,7 @@ - $(eval $(call check-gcc-var,-O2)) - OPTIMIZATION += $(CFLAG_-O2) - endif -+endif - # Use the gcc 3.4 -funit-at-a-time optimization when available - $(eval $(call check-gcc-var,-funit-at-a-time)) - OPTIMIZATION += $(CFLAG_-funit-at-a-time) diff --git a/patches/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch b/patches/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch deleted file mode 100644 index 0381ba8..0000000 --- a/patches/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch +++ /dev/null @@ -1,393 +0,0 @@ -From 7fef6b983456e4c529a5239ea90715050e6f4452 Mon Sep 17 00:00:00 2001 -From: Chris Packham -Date: Mon, 1 Oct 2012 18:12:54 +1300 -Subject: [PATCH 4/8] libc/sysdeps: add __kernel_long and __kernel_ulong - -Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various -exported header files were updated to use these new types. Add the -definitions for __kernel_long_t and __kernel_ulong_t to the relevant -kernel_types.h headers. - -This change was automated with the following scriptlet - - git grep --name-only 'typedef.*__kernel_old_dev_t' \ - | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ - typedef long\t\t__kernel_long_t;\ - typedef unsigned long\t__kernel_ulong_t;' - -Whitespace in arm, avr32, hppa, sparc was then manually fixed up. - -Signed-off-by: Chris Packham --- -Here's a cleaned up patch which should get the whitespace right. I'm a -bit iffy about the sparc changes they make sense to me but it's not a -platform I have access to. - -I can break this up per arch or per maintainer if requested. - - libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ - libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ - libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ - libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ - 22 files changed, 50 insertions(+) -Signed-off-by: Bernhard Reutner-Fischer -Signed-off-by: Gustavo Zacarias -Signed-off-by: Thomas Petazzoni ---- - libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ - libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ - libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ - libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ - libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ - 22 files changed, 50 insertions(+) - -diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h -index d5574c9..cd59b9d 100644 ---- a/libc/sysdeps/linux/alpha/bits/kernel_types.h -+++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h -@@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_t; - typedef __kernel_uid_t __kernel_uid32_t; - typedef __kernel_gid_t __kernel_gid32_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - int val[2]; -diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h -index 766a306..6b36f32 100644 ---- a/libc/sysdeps/linux/arm/bits/kernel_types.h -+++ b/libc/sysdeps/linux/arm/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef long long __kernel_loff_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - #ifdef __USE_ALL -diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h -index f7d8b52..c551d57 100644 ---- a/libc/sysdeps/linux/avr32/bits/kernel_types.h -+++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h -@@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef unsigned short __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - #ifdef __GNUC__ - typedef long long __kernel_loff_t; -diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h -index d69a875..9fec595 100644 ---- a/libc/sysdeps/linux/bfin/bits/kernel_types.h -+++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef long long __kernel_loff_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - #ifdef __USE_ALL -diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h -index 7557309..2c363a8 100644 ---- a/libc/sysdeps/linux/c6x/bits/kernel_types.h -+++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h -@@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned int __kernel_old_uid_t; - typedef unsigned int __kernel_old_gid_t; - typedef unsigned int __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef unsigned int __kernel_size_t; - typedef int __kernel_ssize_t; - typedef int __kernel_ptrdiff_t; -diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h -index f122c7f..5d31f7b 100644 ---- a/libc/sysdeps/linux/cris/bits/kernel_types.h -+++ b/libc/sysdeps/linux/cris/bits/kernel_types.h -@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - #ifdef __GNUC__ - typedef long long __kernel_loff_t; -diff --git a/libc/sysdeps/linux/e1/bits/kernel_types.h b/libc/sysdeps/linux/e1/bits/kernel_types.h -index 8017d85..f55a129 100644 ---- a/libc/sysdeps/linux/e1/bits/kernel_types.h -+++ b/libc/sysdeps/linux/e1/bits/kernel_types.h -@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - /* -diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h -index 0570675..4cfd1bf 100644 ---- a/libc/sysdeps/linux/h8300/bits/kernel_types.h -+++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef long long __kernel_loff_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - #ifdef __USE_ALL -diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h -index 4441f9b..6b2e794 100644 ---- a/libc/sysdeps/linux/hppa/bits/kernel_types.h -+++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h -@@ -45,6 +45,8 @@ typedef long long __kernel_off64_t; - typedef unsigned long long __kernel_ino64_t; - - typedef unsigned int __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - #ifdef __USE_ALL -diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h -index 9c07c72..59044b8 100644 ---- a/libc/sysdeps/linux/i386/bits/kernel_types.h -+++ b/libc/sysdeps/linux/i386/bits/kernel_types.h -@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - typedef struct { -diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h -index c8ef86d..e31dc65 100644 ---- a/libc/sysdeps/linux/ia64/bits/kernel_types.h -+++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h -@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t; - - typedef unsigned int __kernel_dev_t; - typedef unsigned int __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - #endif /* _ASM_IA64_POSIX_TYPES_H */ -diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h -index 0a77a8f..176b968 100644 ---- a/libc/sysdeps/linux/m68k/bits/kernel_types.h -+++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef long long __kernel_loff_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - #ifdef __USE_ALL -diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h -index 2a70575..a9f736b 100644 ---- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h -+++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h -@@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned int __kernel_old_uid_t; - typedef unsigned int __kernel_old_gid_t; - typedef unsigned int __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - #ifdef __GNUC__ - typedef long long __kernel_loff_t; -diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h -index 9fc3b96..97faeac 100644 ---- a/libc/sysdeps/linux/mips/bits/kernel_types.h -+++ b/libc/sysdeps/linux/mips/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef int __kernel_gid32_t; - typedef __kernel_uid_t __kernel_old_uid_t; - typedef __kernel_gid_t __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - #else - typedef unsigned int __kernel_dev_t; -@@ -68,6 +70,8 @@ typedef int __kernel_gid32_t; - typedef __kernel_uid_t __kernel_old_uid_t; - typedef __kernel_gid_t __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - #endif - -diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h -index 8b86d79..3c030e7 100644 ---- a/libc/sysdeps/linux/nios2/bits/kernel_types.h -+++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h -@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef unsigned short __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - typedef struct { -diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h -index 3f3b933..1167de2 100644 ---- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h -+++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h -@@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned int __kernel_old_uid_t; - typedef unsigned int __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - #else - typedef unsigned int __kernel_dev_t; - typedef unsigned int __kernel_ino_t; -@@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned int __kernel_old_uid_t; - typedef unsigned int __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - #endif - -diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h -index f96e9fa..ac97261 100644 ---- a/libc/sysdeps/linux/sh/bits/kernel_types.h -+++ b/libc/sysdeps/linux/sh/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - typedef struct { -diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h -index 671cc83..8cc6c61 100644 ---- a/libc/sysdeps/linux/sh64/bits/kernel_types.h -+++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h -@@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - typedef struct { -diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h -index 0cc4bc2..a10e075 100644 ---- a/libc/sysdeps/linux/sparc/bits/kernel_types.h -+++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h -@@ -32,6 +32,8 @@ typedef unsigned short __kernel_gid16_t; - typedef __kernel_uid_t __kernel_old_uid_t; - typedef __kernel_gid_t __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef __kernel_uid_t __kernel_uid32_t; - typedef __kernel_gid_t __kernel_gid32_t; - typedef int __kernel_suseconds_t; -@@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - #endif - -diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h -index 3e851ab..780aa8a 100644 ---- a/libc/sysdeps/linux/v850/bits/kernel_types.h -+++ b/libc/sysdeps/linux/v850/bits/kernel_types.h -@@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - - typedef struct { - #ifdef __USE_ALL -diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h -index de800d7..0cae08c 100644 ---- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h -+++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h -@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef __kernel_dev_t __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - typedef struct { -diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h -index 44f1075..ed38f2e 100644 ---- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h -+++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h -@@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t; - typedef unsigned short __kernel_old_uid_t; - typedef unsigned short __kernel_old_gid_t; - typedef unsigned short __kernel_old_dev_t; -+typedef long __kernel_long_t; -+typedef unsigned long __kernel_ulong_t; - typedef long long __kernel_loff_t; - - /* Beginning in 2.6 kernels, which is the first version that includes the --- -1.8.1.2 - diff --git a/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch b/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch deleted file mode 100644 index 884307d..0000000 --- a/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nrupa uClibc-0.9.33.2.orig/extra/scripts/unifdef.c uClibc-0.9.33.2/extra/scripts/unifdef.c ---- uClibc-0.9.33.2.orig/extra/scripts/unifdef.c 2012-05-15 09:20:09.000000000 +0200 -+++ uClibc-0.9.33.2/extra/scripts/unifdef.c 2014-10-25 17:07:33.000000000 +0200 -@@ -78,8 +78,6 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/ - #define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); }) - #define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno)) - --size_t strlcpy(char *dst, const char *src, size_t siz); -- - /* types of input lines: */ - typedef enum { - LT_TRUEI, /* a true #if with ignore flag */ diff --git a/patches/uClibc/0.9.33.2/400-arm-unwind.patch b/patches/uClibc/0.9.33.2/400-arm-unwind.patch deleted file mode 100644 index d31844c..0000000 --- a/patches/uClibc/0.9.33.2/400-arm-unwind.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 16884562bf54a93e76c6d2ba03edb1fb00e8b3e0 -Author: Alexey Neyman -Date: Thu Oct 1 13:22:37 2015 -0700 - - Mark libgcc_c_resume as used. - - Recent GCC releases eliminate the data that is only set and never read, - along with the code storing to that data. For assembly blocks like in - ARM unwind code, the data structures need to be declared used. - -diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index f9a4ffb..f0c3047 100644 ---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c -+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c -@@ -25,7 +25,7 @@ - #define __libc_dlclose dlclose - #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - diff --git a/patches/uClibc/0.9.33.2/500-no-install-D.patch b/patches/uClibc/0.9.33.2/500-no-install-D.patch deleted file mode 100644 index f8c2cc1..0000000 --- a/patches/uClibc/0.9.33.2/500-no-install-D.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- uClibc-0.9.33.2.orig/utils/Makefile.in 2012-05-15 00:20:09.000000000 -0700 -+++ uClibc-0.9.33.2/utils/Makefile.in 2017-03-01 12:17:56.000000000 -0800 -@@ -118,15 +118,22 @@ - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - #$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/patches/uClibc/0.9.33.2/600-prefer-multilib.patch b/patches/uClibc/0.9.33.2/600-prefer-multilib.patch deleted file mode 100644 index 677c599..0000000 --- a/patches/uClibc/0.9.33.2/600-prefer-multilib.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -urpN uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c uClibc-0.9.33.2/ldso/ldso/dl-elf.c ---- uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c 2017-03-14 23:40:57.527113741 -0700 -+++ uClibc-0.9.33.2/ldso/ldso/dl-elf.c 2017-03-14 23:42:19.308005691 -0700 -@@ -284,6 +284,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -diff -urpN uClibc-0.9.33.2.orig/ldso/ldso/Makefile.in uClibc-0.9.33.2/ldso/ldso/Makefile.in ---- uClibc-0.9.33.2.orig/ldso/ldso/Makefile.in 2017-03-14 23:40:57.527113741 -0700 -+++ uClibc-0.9.33.2/ldso/ldso/Makefile.in 2017-03-14 23:41:45.215634328 -0700 -@@ -30,6 +30,11 @@ CFLAGS-ldso/ldso/$(TARGET_ARCH)/ := $(CF - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" $(CFLAGS-ldso) - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1 - ifneq ($(SUPPORT_LD_DEBUG),y) - LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS) diff --git a/patches/uClibc/0.9.33.2/998-dlopen-static.patch b/patches/uClibc/0.9.33.2/998-dlopen-static.patch deleted file mode 100644 index 9d2fa55..0000000 --- a/patches/uClibc/0.9.33.2/998-dlopen-static.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 231e4a9b4b972662a6832f714a05525a3754892d Mon Sep 17 00:00:00 2001 -From: Filippo Arcidiacono -Date: Thu, 9 May 2013 09:04:20 +0200 -Subject: libdl: fix dlopen implementation from statically linked application - -Calling dlopen from statically linked application is actually broken, -because _dl_find_hash enters into an infinite loop when trying to -resolve symbols. In this case it doesn't need to extend the global -scope, it is readyto be used as it is, because _dl_loaded_modules already points -to the dlopened library. - -The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was -preventing to get the actual value of the LD_LIBRARY_PATH. - -Signed-off-by: Filippo Arcidiacono -Signed-off-by: Carmelo Amoroso ---- - ldso/libdl/libdl.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c -index 4630a59..3a78696 100644 ---- a/ldso/libdl/libdl.c -+++ b/ldso/libdl/libdl.c -@@ -374,7 +374,7 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) - if (getenv("LD_BIND_NOW")) - now_flag = RTLD_NOW; - --#if !defined SHARED && defined __LDSO_LIBRARY_PATH__ -+#if !defined SHARED && defined __LDSO_LD_LIBRARY_PATH__ - /* When statically linked, the _dl_library_path is not yet initialized */ - _dl_library_path = getenv("LD_LIBRARY_PATH"); - #endif -@@ -541,11 +541,18 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) - * to the GOT tables. We need to do this in reverse order so that COPY - * directives work correctly */ - -- /* Get the tail of the list */ -+#ifdef SHARED -+ /* -+ * Get the tail of the list. -+ * In the static case doesn't need to extend the global scope, it is -+ * ready to be used as it is, because _dl_loaded_modules already points -+ * to the dlopened library. -+ */ - for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next); - - /* Extend the global scope by adding the local scope of the dlopened DSO. */ - ls->next = &dyn_chain->dyn->symbol_scope; -+#endif - #ifdef __mips__ - /* - * Relocation of the GOT entries for MIPS have to be done --- -cgit v0.12 - diff --git a/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch b/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch deleted file mode 100644 index 8bc87ec..0000000 --- a/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -urpN uClibc-0.9.33.2.orig/extra/config/conf.c uClibc-0.9.33.2/extra/config/conf.c ---- uClibc-0.9.33.2.orig/extra/config/conf.c 2017-02-04 12:57:38.488808014 -0800 -+++ uClibc-0.9.33.2/extra/config/conf.c 2017-02-04 20:26:28.613244457 -0800 -@@ -435,6 +435,7 @@ int main(int ac, char **av) - const char *name; - const char *configname = conf_get_configname(); - struct stat tmpstat; -+ int olddefconfig = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); -@@ -451,6 +452,7 @@ int main(int ac, char **av) - break; - case 'd': - input_mode = set_default; -+ olddefconfig = 1; - break; - case 'D': - input_mode = set_default; -@@ -514,7 +516,7 @@ int main(int ac, char **av) - switch (input_mode) { - case set_default: - if (!defconfig_file) -- defconfig_file = conf_get_default_confname(); -+ defconfig_file = olddefconfig ? NULL : conf_get_default_confname(); - if (conf_read(defconfig_file)) { - printf(_("***\n" - "*** Can't find default configuration \"%s\"!\n" -diff -urpN uClibc-0.9.33.2.orig/Makefile.in uClibc-0.9.33.2/Makefile.in ---- uClibc-0.9.33.2.orig/Makefile.in 2017-02-04 12:57:38.484807980 -0800 -+++ uClibc-0.9.33.2/Makefile.in 2017-02-04 12:59:34.625789324 -0800 -@@ -460,6 +460,9 @@ allyesconfig: $(conf) - allnoconfig: $(conf) - $(Q)$< -n extra/Configs/Config.in - -+olddefconfig: $(conf) -+ $(Q)$< -d extra/Configs/Config.in -+ - defconfig: $(conf) - $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in - diff --git a/scripts/build/arch/sparc.sh b/scripts/build/arch/sparc.sh index b5f8140..7433c4d 100644 --- a/scripts/build/arch/sparc.sh +++ b/scripts/build/arch/sparc.sh @@ -60,7 +60,7 @@ CT_DoArchGlibcAdjustTuple() { # earlier (corresponding pthread barrier code is missing). Until this # support is reintroduced, configure as sparcv9. sparc-*) - if [ "${CT_LIBC_GLIBC_2_23_or_later}" = y ]; then + if [ "${CT_GLIBC_NO_SPARC_V8}" = y ]; then CT_DoLog WARN "GLIBC 2.23 and newer only support SPARCv9" target_=${target_/#sparc-/sparcv9-} fi diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh index fcdc57f..4ce5d8f 100644 --- a/scripts/build/libc/bionic.sh +++ b/scripts/build/libc/bionic.sh @@ -28,9 +28,9 @@ do_libc() { local arch="${CT_ARCH}" if [ "${CT_ARCH_64}" = "y" ]; then if [ "${CT_ARCH}" = "x86" ]; then - arch="${arch}_" - fi - arch="${arch}64" + arch="${arch}_" + fi + arch="${arch}64" fi CT_DoStep INFO "Installing C library binaries" CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk-${CT_LIBC_VERSION}/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}" diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 3eac3ba..e8f0445 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -10,9 +10,9 @@ do_libc_get() { addons_list=($(do_libc_add_ons_list " ")) # Main source - if [ "${CT_LIBC_GLIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \ - "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" + if [ "${CT_GLIBC_CUSTOM}" = "y" ]; then + CT_GetCustom "glibc" "${CT_GLIBC_CUSTOM_VERSION}" \ + "${CT_GLIBC_CUSTOM_LOCATION}" else case "${CT_LIBC_VERSION}" in linaro-*) @@ -34,7 +34,7 @@ do_libc_get() { nptl) continue;; esac - case "${addon}:${CT_LIBC_GLIBC_PORTS_EXTERNAL}" in + case "${addon}:${CT_GLIBC_PORTS_EXTERNAL}" in ports:y) ;; ports:*) continue;; esac @@ -209,7 +209,7 @@ do_libc_backend_once() { # Add some default glibc config options if not given by user. # We don't need to be conditional on whether the user did set different - # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY is passed after + # values, as they CT_GLIBC_EXTRA_CONFIG_ARRAY is passed after # extra_config extra_config+=("$(do_libc_min_kernel_config)") @@ -218,7 +218,7 @@ do_libc_backend_once() { nptl) extra_config+=("--with-__thread" "--with-tls");; linuxthreads) extra_config+=("--with-__thread" "--without-tls" "--without-nptl");; none) extra_config+=("--without-__thread" "--without-nptl") - case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in + case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in *-tls*) ;; *) extra_config+=("--without-tls");; esac @@ -230,12 +230,12 @@ do_libc_backend_once() { *) extra_config+=("--disable-shared");; esac - if [ "${CT_LIBC_DISABLE_VERSIONING}" = "y" ]; then + if [ "${CT_GLIBC_DISABLE_VERSIONING}" = "y" ]; then extra_config+=("--disable-versioning") fi - if [ "${CT_LIBC_OLDEST_ABI}" != "" ]; then - extra_config+=("--enable-oldest-abi=${CT_LIBC_OLDEST_ABI}") + if [ "${CT_GLIBC_OLDEST_ABI}" != "" ]; then + extra_config+=("--enable-oldest-abi=${CT_GLIBC_OLDEST_ABI}") fi case "$(do_libc_add_ons_list ,)" in @@ -251,25 +251,25 @@ do_libc_backend_once() { # Hide host C++ binary from configure echo "ac_cv_prog_ac_ct_CXX=${CT_TARGET}-g++" >>config.cache - if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then + if [ "${CT_GLIBC_FORCE_UNWIND}" = "y" ]; then echo "libc_cv_forced_unwind=yes" >>config.cache echo "libc_cv_c_cleanup=yes" >>config.cache fi # Pre-seed the configparms file with values from the config option - printf "%s\n" "${CT_LIBC_GLIBC_CONFIGPARMS}" > configparms + printf "%s\n" "${CT_GLIBC_CONFIGPARMS}" > configparms # glibc can't be built without -O2 (reference needed!) glibc_cflags+=" -O2" - case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in + case "${CT_GLIBC_ENABLE_FORTIFIED_BUILD}" in y) ;; *) glibc_cflags+=" -U_FORTIFY_SOURCE";; esac # In the order of increasing precedence. Flags common to compiler and linker. glibc_cflags+=" ${CT_TARGET_CFLAGS}" - glibc_cflags+=" ${CT_LIBC_GLIBC_EXTRA_CFLAGS}" + glibc_cflags+=" ${CT_GLIBC_EXTRA_CFLAGS}" glibc_cflags+=" ${multi_flags}" # Analyze the resulting options for any extra configure switches to throw in. @@ -336,7 +336,7 @@ do_libc_backend_once() { --without-gd \ --with-headers="${CT_HEADERS_DIR}" \ "${extra_config[@]}" \ - "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[@]}" + "${CT_GLIBC_EXTRA_CONFIG_ARRAY[@]}" # build hacks case "${CT_ARCH},${CT_ARCH_CPU}" in @@ -475,7 +475,7 @@ do_libc_backend_once() { ${CT_PREFIX_DIR}/share/doc fi - if [ "${CT_LIBC_LOCALES}" = "y" -a "${multi_index}" = "${multi_count}" ]; then + if [ "${CT_GLIBC_LOCALES}" = "y" -a "${multi_index}" = "${multi_count}" ]; then do_libc_locales fi fi # libc_mode = final @@ -486,16 +486,16 @@ do_libc_backend_once() { # Build up the addons list, separated with $1 do_libc_add_ons_list() { local sep="$1" - local addons_list="$( echo "${CT_LIBC_ADDONS_LIST}" \ + local addons_list="$( echo "${CT_GLIBC_ADDONS_LIST}" \ |sed -r -e "s/[[:space:],]/${sep}/g;" \ )" - if [ "${CT_LIBC_GLIBC_2_20_or_later}" != "y" ]; then + if [ "${GLIBC_HAS_NPTL_ADDON}" = "y" ]; then case "${CT_THREADS}" in none) ;; *) addons_list="${addons_list}${sep}${CT_THREADS}";; esac fi - [ "${CT_LIBC_GLIBC_USE_PORTS}" = "y" ] && addons_list="${addons_list}${sep}ports" + [ "${CT_GLIBC_USE_PORTS}" = "y" ] && addons_list="${addons_list}${sep}ports" # Remove duplicate, leading and trailing separators echo "${addons_list}" |sed -r -e "s/${sep}+/${sep}/g; s/^${sep}//; s/${sep}\$//;" } @@ -504,9 +504,9 @@ do_libc_add_ons_list() { do_libc_min_kernel_config() { local min_kernel_config - case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in + case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in *--enable-kernel*) ;; - *) if [ "${CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then + *) if [ "${CT_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then # We can't rely on the kernel version from the configuration, # because it might not be available if the user uses pre-installed # headers. On the other hand, both method will have the kernel @@ -523,9 +523,9 @@ do_libc_min_kernel_config() { patchlevel=$(((version_code>>8)&0xFF)) sublevel=$((version_code&0xFF)) min_kernel_config="${version}.${patchlevel}.${sublevel}" - elif [ "${CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then + elif [ "${CT_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then # Trim the fourth part of the linux version, keeping only the first three numbers - min_kernel_config="$( echo "${CT_LIBC_GLIBC_MIN_KERNEL_VERSION}" \ + min_kernel_config="$( echo "${CT_GLIBC_MIN_KERNEL_VERSION}" \ |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;' \ )" fi @@ -567,7 +567,7 @@ do_libc_locales() { CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'" glibc_cflags="-O2 -fno-stack-protector" - case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in + case "${CT_GLIBC_ENABLE_FORTIFIED_BUILD}" in y) ;; *) glibc_cflags+=" -U_FORTIFY_SOURCE";; esac -- cgit v0.10.2-6-g49f6