From 567277099a487508fd228a4c56f3583db3fa96c9 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 29 May 2017 22:32:38 -0700 Subject: Fix the references to old config variables Signed-off-by: Alexey Neyman diff --git a/Makefile.in b/Makefile.in index 0f32064..8f7821c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,7 +148,7 @@ distclean: clean $(call __silent_rm,Makefile kconfig/Makefile config/configure.in) mrproper: distclean - $(call __silent_rmdir,autom4te.cache config/gen) + $(call __silent_rmdir,autom4te.cache config/gen config/versions) $(call __silent_rm,config.log config.status configure) uninstall: real-uninstall diff --git a/TODO b/TODO index fd91244..99c1bda 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,10 @@ +TBD +packages todo +[ ] mention custom glibc addons are no longer handled (even though they never fully were, ct-ng would be unable to fetch them unless they were secretly placed into the download area) +[ ] mention incompatibility of sample options +[ ] version-locked packages + [ ] make glibc-ports package for glibc <2.17 (it has its own repo) + A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic language; contact me if you want to help with any of these :) -- Alexey Neyman (@stilor) @@ -6,9 +13,11 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag [ ] linux [ ] mingw-w64 [ ] newlib + [ ] gcc-linaro [ ] 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 +[ ] gdbinit (installed if CT_GDB_INSTALL_GDBINIT is set) is not relocatable, contains absolute paths [ ] FreeBSD [ ] Use 'cc' rather than 'gcc' on the host [ ] Detect in configure what the default value is diff --git a/config/binutils.in b/config/binutils.in index 0c6d5c0..7210f7c 100644 --- a/config/binutils.in +++ b/config/binutils.in @@ -33,9 +33,6 @@ config ARCH_BINFMT_FDPIC endchoice -config BINUTILS - string - source "config/gen/binutils.in" source "config/gen/binutils.in.2" diff --git a/config/cc.in b/config/cc.in index 03bc8d7..62aee4b 100644 --- a/config/cc.in +++ b/config/cc.in @@ -2,13 +2,6 @@ menu "C compiler" -config CC - string - default "gcc" - -config CC_VERSION - string - config CC_CORE_PASSES_NEEDED bool select CC_CORE_PASS_1_NEEDED @@ -20,8 +13,6 @@ config CC_CORE_PASS_1_NEEDED config CC_CORE_PASS_2_NEEDED bool -source "config/gen/cc.in" - config CC_SUPPORT_CXX bool @@ -43,6 +34,8 @@ config CC_SUPPORT_OBJCXX config CC_SUPPORT_GOLANG bool +source "config/gen/cc.in" + comment "Additional supported languages:" config CC_LANG_CXX diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index e238076..36ae939 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -7,6 +7,11 @@ config CC_GCC_ENABLE_PLUGINS depends on ! STATIC_TOOLCHAIN default y +# Affects the build of musl +config GCC_BUG_61144 + bool + default y if GCC_4_9_or_later && !GCC_4_9_2_or_later + # If binutils installs gold, enable support for gold in gcc config CC_GCC_GOLD bool @@ -133,7 +138,7 @@ comment "Optimisation features" config CC_GCC_USE_GRAPHITE bool "Enable GRAPHITE loop optimisations" default y - select CLOOG_NEEDED if !CC_GCC_5_or_later + select CLOOG_NEEDED if !GCC_5_or_later select ISL_NEEDED help Enable the GRAPHITE loop optimsations. diff --git a/config/kernel.in b/config/kernel.in index 2ae7656..31e83fc 100644 --- a/config/kernel.in +++ b/config/kernel.in @@ -18,12 +18,6 @@ config WINDOWS config KERNEL_SUPPORTS_SHARED_LIBS bool -config KERNEL - string - -config KERNEL_VERSION - string - source "config/gen/kernel.in" comment "Common kernel options" diff --git a/config/libc.in b/config/libc.in index 708c3b6..62490b9 100644 --- a/config/libc.in +++ b/config/libc.in @@ -2,23 +2,6 @@ menu "C-library" -config LIBC - string - -config LIBC_VERSION - string - help - Enter the date of the snapshot you want to use in the form: YYYYMMDD - where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit - day in the month. - - Please note: - - glibc has snapshots done every monday, and only the last ten are kept. - - uClibc has daily snapshots, and only the last 30-or-so are kept. - - So if you want to be able to re-build your toolchain later, you will - have to save your C library tarball by yourself. - source "config/gen/libc.in" config LIBC_SUPPORT_THREADS_ANY diff --git a/config/libc/bionic.in b/config/libc/bionic.in index ab51e6b..6bf708b 100644 --- a/config/libc/bionic.in +++ b/config/libc/bionic.in @@ -3,7 +3,7 @@ ## depends on ! WINDOWS && ! BARE_METAL ## depends on ARCH_arm || ARCH_mips || ARCH_x86 ## depends on EXPERIMENTAL -## depends on CC_GCC_6_or_later +## depends on GCC_6_or_later ## ## select LIBC_SUPPORT_THREADS_POSIX ## diff --git a/config/libc/glibc.in b/config/libc/glibc.in index c0c633d..803ba29 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -1,9 +1,13 @@ # glibc options +# TBD move all the remaining parts into glibc.in.2 and move the sourcing of versions +# into the auto-generated choice/menus? + ## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU ## ## select LIBC_SUPPORT_THREADS_NATIVE ## select CC_CORE_PASSES_NEEDED +# TBD: select GETTEXT for build only, not for host ## select GETTEXT_NEEDED ## select BINUTILS_FORCE_LD_BFD_DEFAULT ## @@ -16,39 +20,6 @@ # are still using quite ancient versions. Please do not retire versions # (including versions in between) until the EOL dates indicated in version.desc. source "config/versions/glibc.in" - -config THREADS - default "nptl" - -# 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 - +if GLIBC_USE_PORTS_EXTERNAL +source "config/versions/glibc-ports.in" +endif diff --git a/config/libc/glibc.in.2 b/config/libc/glibc.in.2 index f1c224c..7785aca 100644 --- a/config/libc/glibc.in.2 +++ b/config/libc/glibc.in.2 @@ -1,6 +1,70 @@ # This file contains the common configuration options # that apply to both glibc. +config THREADS + default "nptl" + +# Known add-ons and when they exist(ed) +# crypt external in 2.1, no longer an add-on since 2.2 +# libidn external in 2.3.4 .. 2.10, still an add-on +# linuxthreads external in 2.0.1 .. 2.5, no longer available since 2.6 [*] +# localedata external in 2.0.1 .. 2.0.6, no longer an add-on since 2.1 [*] +# ports external in 2.3.4 .. 2.16, no longer an add-on since 2.20 +# nptl never external, no longer an add-on since 2.20 +# +# Given the list of currently supported glibc releases, we only need to worry about +# 'libidn', 'ports' and 'nptl' add-ons. Of these, only 'ports' can be an external +# tarball; and only 'libidn' is user-selectable ('ports' & 'nptl' are selected +# by crosstool-NG, as dictated by the architecture and thread model). +# +# I had trouble locating the sources in the repository for some of the released +# versions. E.g., there is a 2.5 version of linuxthreads, but the tag for 2.5 in Git +# does not have the linuxthreads directory at all. Similarly, 2.0.6 tag did not have +# localedata. Since these releases are no longer supported by crosstool-NG, this is +# of pure historical interest now, however. + +config GLIBC_HAS_NPTL_ADDON + def_bool y + depends on !GLIBC_2_20_or_later + +config GLIBC_HAS_PORTS_ADDON + def_bool y + depends on !GLIBC_2_20_or_later + +config GLIBC_HAS_PORTS_ADDON_EXTERNAL + def_bool y + depends on !GLIBC_2_17_or_later + +# In case it folds into main distribution in some future release, too +config GLIBC_HAS_LIBIDN_ADDON + def_bool y + +# 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_USE_PORTS_ADDON + def_bool y + depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc + depends on GLIBC_HAS_PORTS_ADDON + +config GLIBC_USE_PORTS_EXTERNAL + def_bool y + depends on GLIBC_USE_PORTS_ADDON && GLIBC_HAS_PORTS_ADDON_EXTERNAL + +config GLIBC_USE_NPTL_ADDON + def_bool y + depends on THREADS_NATIVE && GLIBC_HAS_NPTL_ADDON + +config GLIBC_USE_LIBIDN_ADDON + bool "Build libidn add-on" + help + Enables the libidn add-on in GNU libc. + +# SPARCv8 support retired in 2.23 +config GLIBC_NO_SPARC_V8 + def_bool y + depends on GLIBC_2_23_or_later + config GLIBC_EXTRA_CONFIG_ARRAY string prompt "extra config" @@ -88,22 +152,6 @@ config GLIBC_FORCE_UNWIND of glibc on some architectures (seen on s390, s390x and x86_64). -config GLIBC_ADDONS_LIST - string - prompt "Extra addons" - default "" - help - Extra addons to include. Space separated list. - - You need to specify neither linuxthreads nor nptl, as they are added - automagically for you depending on the threading model you chose - earlier and on libc version selected. - - Also, do not specify ports even if applicable to the selected libc - version/architecture; it is selected automatically. - - Eg.: libidn - config GLIBC_LOCALES bool prompt "Build and install locales" @@ -111,7 +159,7 @@ config GLIBC_LOCALES Whether to build and install the libc locale files for the target, which is required in order to support internationalization. -if LIBC_glibc && LIBC_LOCALES +if LIBC_glibc && GLIBC_LOCALES comment "WARNING! " comment "| The built locales will be usable if and only if the build " comment "| machine and the target: " @@ -121,7 +169,7 @@ comment "| You will have to check by yourself (for now). " comment "WARNING! " comment "| Building GLIBC locales requires that GLIBC supports " comment "| the build machine as the target. " -endif # LIBC_glibc && LIBC_LOCALES +endif # LIBC_glibc && GLIBC_LOCALES if KERNEL_linux @@ -215,7 +263,7 @@ endchoice config GLIBC_MIN_KERNEL string default "" if GLIBC_KERNEL_VERSION_NONE - default KERNEL_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS + default LINUX_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/newlib.in b/config/libc/newlib.in index 5354fef..a37eca7 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -21,3 +21,11 @@ config NEWLIB_CXA_ATEXIT def_bool y depends on NEWLIB_2_0_or_later select LIBC_PROVIDES_CXA_ATEXIT + +config NEWLIB_HAS_NANO_MALLOC + def_bool y + depends on NEWLIB_2_1_or_later + +config NEWLIB_HAS_NANO_FORMATTED_IO + def_bool y + depends on NEWLIB_2_2_or_later diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2 index f73128c..ed27e7a 100644 --- a/config/libc/newlib.in.2 +++ b/config/libc/newlib.in.2 @@ -164,7 +164,7 @@ config LIBC_NEWLIB_LTO config LIBC_NEWLIB_NANO_MALLOC bool prompt "Enable Nano Malloc" - depends on LIBC_NEWLIB_2_1_or_later + depends on NEWLIB_HAS_NANO_MALLOC help NEWLIB has two implementations of malloc family's functions, one in `mallocr.c' and the other one in `nano-mallocr.c'. This options @@ -175,7 +175,7 @@ config LIBC_NEWLIB_NANO_MALLOC config LIBC_NEWLIB_NANO_FORMATTED_IO bool prompt "Enable Nano Formatted I/O" - depends on LIBC_NEWLIB_2_2_or_later + depends on NEWLIB_HAS_NANO_FORMATTED_IO help This builds NEWLIB with a special implementation of formatted I/O functions, designed to lower the size of application on small systems diff --git a/config/target.in b/config/target.in index 50aaa61..3d86b55 100644 --- a/config/target.in +++ b/config/target.in @@ -2,9 +2,6 @@ menu "Target options" -config ARCH - string - source "config/gen/arch.in" config ARCH_SUFFIX diff --git a/maintainer/gen-kconfig.sh b/maintainer/gen-kconfig.sh index 4066fbb..096599c 100755 --- a/maintainer/gen-kconfig.sh +++ b/maintainer/gen-kconfig.sh @@ -81,6 +81,7 @@ gen_choice() { printf '\n' printf 'config %s\n' "${cfg_prefix}" + printf ' string\n' for entry in `get_components ${base_dir}`; do file="${base_dir}/${entry}.in" _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;') diff --git a/maintainer/gen-versions.sh b/maintainer/gen-versions.sh index 99e9791..cd99432 100755 --- a/maintainer/gen-versions.sh +++ b/maintainer/gen-versions.sh @@ -1,7 +1,21 @@ #!/bin/bash ######################################## -# Common meta-language implementation +# Common meta-language implementation. Syntax: +# +# The template file is processed line by line, with @@VAR@@ placeholders +# being replaced with a value of the VAR variable. +# Special lines start with '#!' and a keyword: +# +# #!// +# Comment, the rest of the line is ignored +# #!if COND +# Conditional: the lines until the matching #!end-if are processed +# only if the conditional COND evaluates to true. +# #!foreach NAME +# Iterate over NAME entities (the iterator must be set up first +# using the set_iter function), processing the lines until the matching +# #!end-foreach line. declare -A info @@ -12,7 +26,7 @@ debug() fi } -info() +msg() { if [ -z "${QUIET}" ]; then echo "INFO :: $@" >&2 @@ -125,7 +139,7 @@ run_lines() while [ "${l}" -le "${end}" ]; do lnext=$[l+1] s="${tlines[${l}]}" - # Expand @@foo@@ to ${info[foo]}. First escape quotes/backslashes. + # Expand @@foo@@ to ${info[foo]}. First escape variables/backslashes for evals below. s="${s//\\/\\\\}" s="${s//\$/\\\$}" while [ -n "${s}" ]; do @@ -352,13 +366,28 @@ sort_versions() read_file() { - local l + local l p while read l; do + l="${p}${l}" + p= case "${l}" in - "#"*) continue;; - *=*) echo "info[${l%%=*}]=${l#*=}";; - *) error "syntax error in '${1}': '${l}'" + "") + continue + ;; + *\\) + p="${l%\\}" + continue + ;; + "#"*) + continue + ;; + *=*) + echo "info[${l%%=*}]=${l#*=}" + ;; + *) + error "syntax error in '${1}': '${l}'" + ;; esac done < "${1}" } @@ -410,6 +439,7 @@ enter_fork() info[repository_cset]=HEAD info[fork]=${fork} info[name]=${fork} + info[mirrors]= eval `read_package_desc ${fork}` @@ -426,6 +456,7 @@ enter_fork() info[repository_url]=${info[repository]##* } info[repository_dflt_branch]=${dflt_branch[${info[vcs]}]} fi + info[versionlocked]=`kconfigize "${info[versionlocked]}"` versions=`cd packages/${fork} && \ for f in */version.desc; do [ -r "${f}" ] && echo "${f%/version.desc}"; done` @@ -449,13 +480,6 @@ enter_fork() fi } -set_latest_milestone() -{ - if [ `cmp_versions ${info[ms]} ${info[ver]}` -le 0 -a -z "${milestone}" ]; then - milestone=${info[ms_kcfg]} - fi -} - enter_version() { local -A ver_postfix=( \ @@ -463,35 +487,23 @@ enter_version() [,,yes,]=" (EXPERIMENTAL)" \ [,yes,yes,]=" (OBSOLETE,EXPERIMENTAL)" ) local version="${1}" - local tmp milestone eval `read_version_desc ${info[fork]} ${version}` info[ver]=${version} info[kcfg]=`kconfigize ${version}` info[ver_postfix]=${ver_postfix[,${info[obsolete]},${info[experimental]},]} - - # TBD do we need "prev" version? - tmp=" ${info[all_versions]} " - tmp=${tmp##* ${version} } - info[prev]=`kconfigize ${tmp%% *}` - - # Find the latest milestone preceding this version - milestone= - do_foreach milestone set_latest_milestone - info[milestone]=${milestone} } enter_milestone() { local ms="${1}" - local tmp + local cmp info[ms]=${ms} info[ms_kcfg]=`kconfigize ${ms}` - - tmp=" ${info[all_milestones]} " - tmp=${tmp##* ${ms} } - info[ms_prev]=`kconfigize ${tmp%% *}` + if [ -n "${info[ver]}" ]; then + info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}` + fi } rm -rf "${config_dir}" @@ -502,7 +514,7 @@ pkg_all=( `cd packages && \ while read f; do [ -r "${f}" ] && echo "${f%/package.desc}"; done | \ xargs echo` ) -info "Generating package version descriptions" +msg "Generating package version descriptions" debug "Packages: ${pkg_all[@]}" # We need to group forks of the same package into the same @@ -511,12 +523,12 @@ debug "Packages: ${pkg_all[@]}" for p in "${pkg_all[@]}"; do find_forks "${p}" done -info "Master packages: ${pkg_masters[@]}" +msg "Master packages: ${pkg_masters[@]}" # Now for each master, create its kconfig file with version # definitions. for p in "${pkg_masters[@]}"; do - info "Generating '${config_dir}/${p}.in'" + msg "Generating '${config_dir}/${p}.in'" exec >"${config_dir}/${p}.in" # Base definitions for the whole config file info=( \ @@ -532,4 +544,4 @@ for p in "${pkg_masters[@]}"; do # TBD get rid of the "origin" completely and use just the fork name? run_template "${template}" done -info "Done!" +msg "Done!" diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template index c6d001e..9343f18 100644 --- a/maintainer/kconfig-versions.template +++ b/maintainer/kconfig-versions.template @@ -58,19 +58,6 @@ config @@pfx@@_SRC_DEVEL Check out from vendor repository at: @@repository_url@@ -#!end-if -config @@pfx@@_SRC_CUSTOM - bool "Custom location" - depends on EXPERIMENTAL - help - Custom directory or tarball. - -endchoice -#!if [ -n "@@all_versions@@" ] -endif -#!end-if - -#!if [ -n "@@repository@@" ] if @@pfx@@_SRC_DEVEL config @@pfx@@_DEVEL_VCS @@ -95,7 +82,13 @@ config @@pfx@@_DEVEL_REVISION Commit ID or revision ID to check out. endif + #!end-if +config @@pfx@@_SRC_CUSTOM + bool "Custom location" + depends on EXPERIMENTAL + help + Custom directory or tarball. if @@pfx@@_SRC_CUSTOM @@ -106,9 +99,40 @@ config @@pfx@@_CUSTOM_LOCATION endif +endchoice #!if [ -n "@@all_versions@@" ] +endif + +config @@pfx@@_MIRRORS_ARRAY + string + default "@@mirrors@@" +#!end-if + +#!// Below, we explicitly select all milestones to which a given version +#!// compares greater-or-equal. We don't select just the latest applicable +#!// (and letting milestones chain-select each other, with FOO_6_or_later +#!// selecting FOO_5_or_later and so on) so that we can handle the cases +#!// where we need to identify a range of releases on a branch, for example, +#!// "all FOO releases after 4.9.1 but before 4.9.3". +#!// +#!if [ -n "@@all_versions@@" -a -z "@@versionlocked@@" ] choice bool "Version of @@name@@" + help + For a released version, select the version of @@name@@ to download + and build. For sources out of the vendor repository or from a custom + location, select the version that describes those custom sources. + Based on this version, crosstool-NG may apply some version-specific + quirks while building @@name@@. + +config @@pfx@@_VERY_NEW + bool "newer than anything below" + depends on EXPERIMENTAL + depends on @@pfx@@_SRC_DEVEL || @@pfx@@_SRC_CUSTOM +#!foreach milestone + select @@masterpfx@@_@@ms_kcfg@@_or_later + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older +#!end-foreach #!foreach version config @@pfx@@_V_@@kcfg@@ @@ -119,14 +143,39 @@ config @@pfx@@_V_@@kcfg@@ #!if [ "@@experimental@@" = "yes" ] depends on EXPERIMENTAL #!end-if -#!if [ -n "@@milestone@@" ] - select @@masterpfx@@_@@milestone@@_or_later +#!foreach milestone +#!if [ "@@version_cmp_milestone@@" -ge 0 ] + select @@masterpfx@@_@@ms_kcfg@@_or_later #!end-if +#!if [ "@@version_cmp_milestone@@" -gt 0 ] + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older +#!end-if +#!if [ "@@version_cmp_milestone@@" -lt 0 ] + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later +#!end-if +#!end-foreach #!end-foreach +config @@pfx@@_VERY_OLD + bool "older than anything above" + depends on OBSOLETE && EXPERIMENTAL + depends on @@pfx@@_SRC_DEVEL || @@pfx@@_SRC_CUSTOM +#!foreach milestone + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later +#!end-foreach + endchoice #!end-if +#!if [ -n "@@versionlocked@@" ] +#!foreach version +config @@pfx@@_V_@@kcfg@@ + def_bool y + depends on @@versionlocked@@_V_@@kcfg@@ + +#!end-foreach +#!end-if + #!if [ "@@nforks@@" -ge 2 ] endif #!end-if @@ -141,10 +190,16 @@ config @@pfx@@_VERSION #!end-foreach #!foreach milestone +#!// Milestones selected by a chosen version of this package config @@masterpfx@@_@@ms_kcfg@@_or_later bool -#!if [ -n "@@ms_prev@@" ] - select @@masterpfx@@_@@ms_prev@@_or_later -#!end-if + +#!// Milestone requirements selected by other packages that restrict +#!// the choices in this package +config @@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later + bool + +config @@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older + bool #!end-foreach diff --git a/packages/autoconf/package.desc b/packages/autoconf/package.desc index bfec125..27ac6c3 100644 --- a/packages/autoconf/package.desc +++ b/packages/autoconf/package.desc @@ -1 +1,2 @@ -repository="git git://git.sv.gnu.org/autoconf" +repository='git git://git.sv.gnu.org/autoconf' +mirrors='$(CT_Mirrors GNU autoconf)' diff --git a/packages/autoconf/version.desc b/packages/autoconf/version.desc index 026d275..fcfe389 100644 --- a/packages/autoconf/version.desc +++ b/packages/autoconf/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/automake/1.11.1/version.desc b/packages/automake/1.11.1/version.desc index 026d275..fcfe389 100644 --- a/packages/automake/1.11.1/version.desc +++ b/packages/automake/1.11.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/automake/1.11.6/version.desc b/packages/automake/1.11.6/version.desc index 026d275..fcfe389 100644 --- a/packages/automake/1.11.6/version.desc +++ b/packages/automake/1.11.6/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/automake/1.14/version.desc b/packages/automake/1.14/version.desc index 026d275..fcfe389 100644 --- a/packages/automake/1.14/version.desc +++ b/packages/automake/1.14/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/automake/package.desc b/packages/automake/package.desc index ba73596..7400a0f 100644 --- a/packages/automake/package.desc +++ b/packages/automake/package.desc @@ -1 +1,2 @@ -repository="git https://git.savannah.gnu.org/git/automake.git" +repository='git https://git.savannah.gnu.org/git/automake.git' +mirrors='$(CT_Mirrors GNU automake)' diff --git a/packages/avr-libc/1.8.0/version.desc b/packages/avr-libc/1.8.0/version.desc index 026d275..fcfe389 100644 --- a/packages/avr-libc/1.8.0/version.desc +++ b/packages/avr-libc/1.8.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/avr-libc/package.desc b/packages/avr-libc/package.desc index fa9571e..8976862 100644 --- a/packages/avr-libc/package.desc +++ b/packages/avr-libc/package.desc @@ -1 +1,2 @@ -repository="svn svn://svn.savannah.nongnu.org/avr-libc/trunk/avr-libc" +repository='svn svn://svn.savannah.nongnu.org/avr-libc/trunk/avr-libc' +mirrors='http://download.savannah.gnu.org/releases/avr-libc' diff --git a/packages/binutils-linaro/2.23.2-2013.10-4/version.desc b/packages/binutils-linaro/2.23.2-2013.10-4/version.desc index 026d275..fcfe389 100644 --- a/packages/binutils-linaro/2.23.2-2013.10-4/version.desc +++ b/packages/binutils-linaro/2.23.2-2013.10-4/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/binutils-linaro/2.24.0-2014.11-2/version.desc b/packages/binutils-linaro/2.24.0-2014.11-2/version.desc index 026d275..fcfe389 100644 --- a/packages/binutils-linaro/2.24.0-2014.11-2/version.desc +++ b/packages/binutils-linaro/2.24.0-2014.11-2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/binutils-linaro/2.25.0-2015.01-2/version.desc b/packages/binutils-linaro/2.25.0-2015.01-2/version.desc index 026d275..fcfe389 100644 --- a/packages/binutils-linaro/2.25.0-2015.01-2/version.desc +++ b/packages/binutils-linaro/2.25.0-2015.01-2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/binutils-linaro/package.desc b/packages/binutils-linaro/package.desc index 5adfd4e..ea5dc66 100644 --- a/packages/binutils-linaro/package.desc +++ b/packages/binutils-linaro/package.desc @@ -1,5 +1,5 @@ -master="binutils" -repository="git https://git.linaro.org/toolchain/binutils-gdb.git" -download="TBD" -origin="Linaro" -experimental="yes" +master='binutils' +repository='git https://git.linaro.org/toolchain/binutils-gdb.git' +mirrors='$(CT_Mirrors Linaro binutils ${CT_BINUTILS_LINARO_VERSION})' +origin='Linaro' +experimental='yes' diff --git a/packages/binutils/2.23.2/version.desc b/packages/binutils/2.23.2/version.desc index 026d275..fcfe389 100644 --- a/packages/binutils/2.23.2/version.desc +++ b/packages/binutils/2.23.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/binutils/2.24/version.desc b/packages/binutils/2.24/version.desc index 026d275..fcfe389 100644 --- a/packages/binutils/2.24/version.desc +++ b/packages/binutils/2.24/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/binutils/2.25.1/version.desc b/packages/binutils/2.25.1/version.desc index 026d275..fcfe389 100644 --- a/packages/binutils/2.25.1/version.desc +++ b/packages/binutils/2.25.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/binutils/package.desc b/packages/binutils/package.desc index 54845f8..6854ee9 100644 --- a/packages/binutils/package.desc +++ b/packages/binutils/package.desc @@ -1,4 +1,4 @@ -repository="git git://sourceware.org/git/binutils-gdb.git" -download_url="TBD other mirrors https://ftp.gnu.org/gnu/binutils/binutils-${version}.${format}" -origin="GNU" -milestones="2.23" +repository='git git://sourceware.org/git/binutils-gdb.git' +mirrors='$(CT_Mirrors GNU binutils) $(CT_Mirrors GCC_GNU binutils) $(CT_Mirrors sourceware)' +origin='GNU' +milestones='2.23' diff --git a/packages/bionic/10e/version.desc b/packages/bionic/10e/version.desc index 026d275..fcfe389 100644 --- a/packages/bionic/10e/version.desc +++ b/packages/bionic/10e/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/bionic/11c/version.desc b/packages/bionic/11c/version.desc index 026d275..fcfe389 100644 --- a/packages/bionic/11c/version.desc +++ b/packages/bionic/11c/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/bionic/12b/version.desc b/packages/bionic/12b/version.desc index 026d275..fcfe389 100644 --- a/packages/bionic/12b/version.desc +++ b/packages/bionic/12b/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/bionic/13b/version.desc b/packages/bionic/13b/version.desc index 026d275..fcfe389 100644 --- a/packages/bionic/13b/version.desc +++ b/packages/bionic/13b/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/bionic/15-beta2/version.desc b/packages/bionic/15-beta2/version.desc index 03502fc..76f1447 100644 --- a/packages/bionic/15-beta2/version.desc +++ b/packages/bionic/15-beta2/version.desc @@ -1 +1 @@ -experimental="yes" +experimental='yes' diff --git a/packages/bionic/package.desc b/packages/bionic/package.desc index fe2c772..6e3d374 100644 --- a/packages/bionic/package.desc +++ b/packages/bionic/package.desc @@ -1 +1,2 @@ # We don't support building bionic (yet) so no official repository +mirrors='https://dl.google.com/android/repository' diff --git a/packages/cloog/0.18.0/version.desc b/packages/cloog/0.18.0/version.desc index 026d275..fcfe389 100644 --- a/packages/cloog/0.18.0/version.desc +++ b/packages/cloog/0.18.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/cloog/0.18.1/version.desc b/packages/cloog/0.18.1/version.desc index 026d275..fcfe389 100644 --- a/packages/cloog/0.18.1/version.desc +++ b/packages/cloog/0.18.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/cloog/package.desc b/packages/cloog/package.desc index c5b98b7..ac3c29a 100644 --- a/packages/cloog/package.desc +++ b/packages/cloog/package.desc @@ -1,3 +1,4 @@ -name="CLooG" -repository="git git://repo.or.cz/cloog.git" -milestones="0.18" +name='CLooG' +repository='git git://repo.or.cz/cloog.git' +mirrors='http://www.bastoul.net/cloog/pages/download ftp://gcc.gnu.org/pub/gcc/infrastructure' +milestones='0.18' diff --git a/packages/duma/package.desc b/packages/duma/package.desc index a48afdd..efedb9e 100644 --- a/packages/duma/package.desc +++ b/packages/duma/package.desc @@ -1 +1,2 @@ -repository="cvs :pserver:anonymous@duma.cvs.sourceforge.net:/cvsroot/duma" +repository='cvs :pserver:anonymous@duma.cvs.sourceforge.net:/cvsroot/duma' +mirrors='http://downloads.sourceforge.net/project/duma/duma/${CT_DUMA_VERSION}' diff --git a/packages/elf2flt/package.desc b/packages/elf2flt/package.desc index a3b9dc2..c46788c 100644 --- a/packages/elf2flt/package.desc +++ b/packages/elf2flt/package.desc @@ -1,2 +1,2 @@ -repository="git https://github.com/uclinux-dev/elf2flt.git" -repository_cset="6d80ab6c93409e796f85da404bde84b841231531" +repository='git https://github.com/uclinux-dev/elf2flt.git' +repository_cset='6d80ab6c93409e796f85da404bde84b841231531' diff --git a/packages/expat/2.1.1/version.desc b/packages/expat/2.1.1/version.desc index 026d275..fcfe389 100644 --- a/packages/expat/2.1.1/version.desc +++ b/packages/expat/2.1.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/expat/package.desc b/packages/expat/package.desc index f9e53c6..d1bfcf9 100644 --- a/packages/expat/package.desc +++ b/packages/expat/package.desc @@ -1 +1,2 @@ -repository="git https://github.com/libexpat/libexpat.git" +repository='git https://github.com/libexpat/libexpat.git' +mirrors='http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION}' diff --git a/packages/gcc-linaro/4.8-2015.06/version.desc b/packages/gcc-linaro/4.8-2015.06/version.desc index 026d275..fcfe389 100644 --- a/packages/gcc-linaro/4.8-2015.06/version.desc +++ b/packages/gcc-linaro/4.8-2015.06/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch b/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch new file mode 100644 index 0000000..c012719 --- /dev/null +++ b/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch @@ -0,0 +1,28 @@ +From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001 +From: kyukhin +Date: Sat, 3 Sep 2016 10:57:05 +0000 +Subject: [PATCH] gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty + string. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971 138bc75d-0d04-0410-961f-82ee72b054a4 + +Upstream-Status: Backport +Signed-off-by: Joshua Lock + +--- + gcc/ubsan.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +Index: gcc-6.3.0/gcc/ubsan.c +=================================================================== +--- gcc-6.3.0.orig/gcc/ubsan.c ++++ gcc-6.3.0/gcc/ubsan.c +@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc) + + expanded_location xloc = expand_location (loc); + if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 +- || xloc.file == '\0' || xloc.file[0] == '\xff' ++ || xloc.file[0] == '\0' || xloc.file[0] == '\xff' + || xloc.file[1] == '\xff') + return false; + diff --git a/packages/gcc-linaro/package.desc b/packages/gcc-linaro/package.desc index 126f5f2..1731843 100644 --- a/packages/gcc-linaro/package.desc +++ b/packages/gcc-linaro/package.desc @@ -1,5 +1,5 @@ -master="gcc" -repository="git https://git.linaro.org/toolchain/gcc.git" -download="TBD" -origin="Linaro" -experimental="yes" +master='gcc' +repository='git https://git.linaro.org/toolchain/gcc.git' +mirrors='$(CT_Mirrors Linaro gcc ${CT_GCC_LINARO_VERSION})' +origin='Linaro' +experimental='yes' diff --git a/packages/gcc/4.8.5/version.desc b/packages/gcc/4.8.5/version.desc index 026d275..fcfe389 100644 --- a/packages/gcc/4.8.5/version.desc +++ b/packages/gcc/4.8.5/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gcc/package.desc b/packages/gcc/package.desc index 81afb5b..c38ead7 100644 --- a/packages/gcc/package.desc +++ b/packages/gcc/package.desc @@ -1,4 +1,4 @@ -repository="svn svn://gcc.gnu.org/svn/gcc" -download_url="TBD other mirrors ftp://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.${format}" -origin="GNU" -milestones="4.8 4.9 5 6 7" +repository='svn svn://gcc.gnu.org/svn/gcc' +mirrors='$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc gcc-${CT_GCC_VERSION})' +origin='GNU' +milestones='4.8 4.9 4.9.2 5 6 7' diff --git a/packages/gdb-linaro/7.3-2011.12/version.desc b/packages/gdb-linaro/7.3-2011.12/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.3-2011.12/version.desc +++ b/packages/gdb-linaro/7.3-2011.12/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/7.4-2012.06/version.desc b/packages/gdb-linaro/7.4-2012.06/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.4-2012.06/version.desc +++ b/packages/gdb-linaro/7.4-2012.06/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/7.5-2012.12/version.desc b/packages/gdb-linaro/7.5-2012.12/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.5-2012.12/version.desc +++ b/packages/gdb-linaro/7.5-2012.12/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/7.6.1-2013.10/version.desc b/packages/gdb-linaro/7.6.1-2013.10/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.6.1-2013.10/version.desc +++ b/packages/gdb-linaro/7.6.1-2013.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/7.7-2014.05/version.desc b/packages/gdb-linaro/7.7-2014.05/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.7-2014.05/version.desc +++ b/packages/gdb-linaro/7.7-2014.05/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/7.7.1-2014.06-1/version.desc b/packages/gdb-linaro/7.7.1-2014.06-1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.7.1-2014.06-1/version.desc +++ b/packages/gdb-linaro/7.7.1-2014.06-1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/7.8-2014.09/version.desc b/packages/gdb-linaro/7.8-2014.09/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb-linaro/7.8-2014.09/version.desc +++ b/packages/gdb-linaro/7.8-2014.09/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb-linaro/package.desc b/packages/gdb-linaro/package.desc index 1b9bd68..f5ed8fa 100644 --- a/packages/gdb-linaro/package.desc +++ b/packages/gdb-linaro/package.desc @@ -1,5 +1,5 @@ -master="gdb" -repository="git https://git.linaro.org/toolchain/binutils-gdb.git" -download="TBD" -origin="Linaro" -experimental="yes" +master='gdb' +repository='git https://git.linaro.org/toolchain/binutils-gdb.git' +mirrors='$(CT_Mirrors Linaro gdb ${CT_GDB_LINARO_VERSION})' +origin='Linaro' +experimental='yes' diff --git a/packages/gdb/6.8a/version.desc b/packages/gdb/6.8a/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/6.8a/version.desc +++ b/packages/gdb/6.8a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.0.1a/version.desc b/packages/gdb/7.0.1a/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.0.1a/version.desc +++ b/packages/gdb/7.0.1a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.0a/version.desc b/packages/gdb/7.0a/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.0a/version.desc +++ b/packages/gdb/7.0a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.10.1/version.desc b/packages/gdb/7.10.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.10.1/version.desc +++ b/packages/gdb/7.10.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.10/version.desc b/packages/gdb/7.10/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.10/version.desc +++ b/packages/gdb/7.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.1a/version.desc b/packages/gdb/7.1a/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.1a/version.desc +++ b/packages/gdb/7.1a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.2a/version.desc b/packages/gdb/7.2a/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.2a/version.desc +++ b/packages/gdb/7.2a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.3.1/version.desc b/packages/gdb/7.3.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.3.1/version.desc +++ b/packages/gdb/7.3.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.3a/version.desc b/packages/gdb/7.3a/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.3a/version.desc +++ b/packages/gdb/7.3a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.4.1/version.desc b/packages/gdb/7.4.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.4.1/version.desc +++ b/packages/gdb/7.4.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.4/version.desc b/packages/gdb/7.4/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.4/version.desc +++ b/packages/gdb/7.4/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.5.1/version.desc b/packages/gdb/7.5.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.5.1/version.desc +++ b/packages/gdb/7.5.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.6.1/version.desc b/packages/gdb/7.6.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.6.1/version.desc +++ b/packages/gdb/7.6.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.7.1/version.desc b/packages/gdb/7.7.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.7.1/version.desc +++ b/packages/gdb/7.7.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.7/version.desc b/packages/gdb/7.7/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.7/version.desc +++ b/packages/gdb/7.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.8.1/version.desc b/packages/gdb/7.8.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.8.1/version.desc +++ b/packages/gdb/7.8.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.8/version.desc b/packages/gdb/7.8/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.8/version.desc +++ b/packages/gdb/7.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.9.1/version.desc b/packages/gdb/7.9.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.9.1/version.desc +++ b/packages/gdb/7.9.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/7.9/version.desc b/packages/gdb/7.9/version.desc index 026d275..fcfe389 100644 --- a/packages/gdb/7.9/version.desc +++ b/packages/gdb/7.9/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gdb/package.desc b/packages/gdb/package.desc index 4753dc1..b9855a5 100644 --- a/packages/gdb/package.desc +++ b/packages/gdb/package.desc @@ -1,3 +1,4 @@ -origin="GNU" -repository="git ssh://sourceware.org/git/binutils-gdb.git" -milestones="7.0 7.2" +origin='GNU' +repository='git ssh://sourceware.org/git/binutils-gdb.git' +mirrors='$(CT_Mirrors GNU gdb) $(CT_Mirrors sourceware gdb)' +milestones='7.0 7.2' diff --git a/packages/gettext/0.19.7/version.desc b/packages/gettext/0.19.7/version.desc index 026d275..fcfe389 100644 --- a/packages/gettext/0.19.7/version.desc +++ b/packages/gettext/0.19.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gettext/package.desc b/packages/gettext/package.desc index 6554419..ccd9f2f 100644 --- a/packages/gettext/package.desc +++ b/packages/gettext/package.desc @@ -1 +1,2 @@ -repository="git https://git.savannah.gnu.org/git/gettext.git" +repository='git https://git.savannah.gnu.org/git/gettext.git' +mirrors='$(CT_Mirrors GNU gettext)' diff --git a/packages/glibc-linaro/2.20-2014.11/version.desc b/packages/glibc-linaro/2.20-2014.11/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc-linaro/2.20-2014.11/version.desc +++ b/packages/glibc-linaro/2.20-2014.11/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc-linaro/package.desc b/packages/glibc-linaro/package.desc index c1f1a95..91195f4 100644 --- a/packages/glibc-linaro/package.desc +++ b/packages/glibc-linaro/package.desc @@ -1,4 +1,5 @@ -master="glibc" -origin="Linaro" -repository="git https://git.linaro.org/toolchain/glibc.git" -experimental="yes" +master='glibc' +origin='Linaro' +repository='git https://git.linaro.org/toolchain/glibc.git' +mirrors='$(CT_Mirrors Linaro glibc ${CT_GLIBC_LINARO_VERSION})' +experimental='yes' 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.12.1/version.desc b/packages/glibc-ports/2.12.1/version.desc new file mode 100644 index 0000000..e69de29 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.13/version.desc b/packages/glibc-ports/2.13/version.desc new file mode 100644 index 0000000..e69de29 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.1/version.desc b/packages/glibc-ports/2.14.1/version.desc new file mode 100644 index 0000000..e69de29 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.14/version.desc b/packages/glibc-ports/2.14/version.desc new file mode 100644 index 0000000..e69de29 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.15/version.desc b/packages/glibc-ports/2.15/version.desc new file mode 100644 index 0000000..e69de29 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/glibc-ports/2.16.0/version.desc b/packages/glibc-ports/2.16.0/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/glibc-ports/package.desc b/packages/glibc-ports/package.desc new file mode 100644 index 0000000..5df2f20 --- /dev/null +++ b/packages/glibc-ports/package.desc @@ -0,0 +1,8 @@ +# This is not a true package, but rather a part of glibc. When +# the ports were an external add-on, it used a separate repository +# and separate tarballs. +repository='git git://sourceware.org/git/glibc-ports.git' +mirrors='$(CT_Mirrors GNU glibc) $(CT_Mirrors sourceware glibc)' + +# Version of this package must be the same as the glibc's +versionlocked='glibc' diff --git a/packages/glibc/2.12.2/version.desc b/packages/glibc/2.12.2/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.12.2/version.desc +++ b/packages/glibc/2.12.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.13/version.desc b/packages/glibc/2.13/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.13/version.desc +++ b/packages/glibc/2.13/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.14.1/version.desc b/packages/glibc/2.14.1/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.14.1/version.desc +++ b/packages/glibc/2.14.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.14/version.desc b/packages/glibc/2.14/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.14/version.desc +++ b/packages/glibc/2.14/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.15/version.desc b/packages/glibc/2.15/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.15/version.desc +++ b/packages/glibc/2.15/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.16.0/version.desc b/packages/glibc/2.16.0/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.16.0/version.desc +++ b/packages/glibc/2.16.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.18/version.desc b/packages/glibc/2.18/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.18/version.desc +++ b/packages/glibc/2.18/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.20/version.desc b/packages/glibc/2.20/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.20/version.desc +++ b/packages/glibc/2.20/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.21/version.desc b/packages/glibc/2.21/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.21/version.desc +++ b/packages/glibc/2.21/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/2.22/version.desc b/packages/glibc/2.22/version.desc index 026d275..fcfe389 100644 --- a/packages/glibc/2.22/version.desc +++ b/packages/glibc/2.22/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc index a7fd499..f6cc8e2 100644 --- a/packages/glibc/package.desc +++ b/packages/glibc/package.desc @@ -1,3 +1,4 @@ -origin="GNU" -repository="git git://sourceware.org/git/glibc.git" -milestones="2.17 2.20 2.23" +origin='GNU' +repository='git git://sourceware.org/git/glibc.git' +mirrors='$(CT_Mirrors GNU glibc) $(CT_Mirrors sourceware glibc)' +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 deleted file mode 100644 index 1a632fe..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index ed022be..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/160-manual-no-perl.patch b/packages/glibc/ports-2.12.1/160-manual-no-perl.patch deleted file mode 100644 index 2eb5414..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch deleted file mode 100644 index fb0881d..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/180-resolv-dynamic.patch b/packages/glibc/ports-2.12.1/180-resolv-dynamic.patch deleted file mode 100644 index 8f74a53..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/190-localedef-mmap.patch b/packages/glibc/ports-2.12.1/190-localedef-mmap.patch deleted file mode 100644 index b24ed80..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/200-fadvise64_64.patch b/packages/glibc/ports-2.12.1/200-fadvise64_64.patch deleted file mode 100644 index a9f10cd..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/220-section-comments.patch b/packages/glibc/ports-2.12.1/220-section-comments.patch deleted file mode 100644 index 4d35535..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/230-no-inline-gmon.patch b/packages/glibc/ports-2.12.1/230-no-inline-gmon.patch deleted file mode 100644 index 594fb79..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/240-check_native-headers.patch b/packages/glibc/ports-2.12.1/240-check_native-headers.patch deleted file mode 100644 index de0cb5b..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/250-fix-pr631.patch b/packages/glibc/ports-2.12.1/250-fix-pr631.patch deleted file mode 100644 index af5b347..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/260-assume-pipe2.patch b/packages/glibc/ports-2.12.1/260-assume-pipe2.patch deleted file mode 100644 index b84f882..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/270-china.patch b/packages/glibc/ports-2.12.1/270-china.patch deleted file mode 100644 index 4cde1cf..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/280-new-valencian-locale.patch b/packages/glibc/ports-2.12.1/280-new-valencian-locale.patch deleted file mode 100644 index 6b46b44..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/300-nscd-one-fork.patch b/packages/glibc/ports-2.12.1/300-nscd-one-fork.patch deleted file mode 100644 index 27eae51..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch deleted file mode 100644 index 947bb58..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/330-m68k-sys-user.patch b/packages/glibc/ports-2.12.1/330-m68k-sys-user.patch deleted file mode 100644 index b441691..0000000 --- a/packages/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/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 deleted file mode 100644 index afdb39c..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch deleted file mode 100644 index 3f03169..0000000 --- a/packages/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/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 deleted file mode 100644 index a847cdb..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/370-fnmatch.patch b/packages/glibc/ports-2.12.1/370-fnmatch.patch deleted file mode 100644 index f345b35..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/380-dont-build-timezone.patch b/packages/glibc/ports-2.12.1/380-dont-build-timezone.patch deleted file mode 100644 index 0a30436..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/400-alpha-xstat.patch b/packages/glibc/ports-2.12.1/400-alpha-xstat.patch deleted file mode 100644 index 97bea98..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/430-alpha-creat.patch b/packages/glibc/ports-2.12.1/430-alpha-creat.patch deleted file mode 100644 index bfb72d0..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/440-alpha-cache-shape.patch b/packages/glibc/ports-2.12.1/440-alpha-cache-shape.patch deleted file mode 100644 index ea85e99..0000000 --- a/packages/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/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 deleted file mode 100644 index 6438267..0000000 --- a/packages/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/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 deleted file mode 100644 index 9d35ebd..0000000 --- a/packages/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/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 deleted file mode 100644 index 621a6f3..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/560-ppc-atomic.patch b/packages/glibc/ports-2.12.1/560-ppc-atomic.patch deleted file mode 100644 index 679ef18..0000000 --- a/packages/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/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 deleted file mode 100644 index fc42a92..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.12.1/580-nptl-lowlevellock.patch deleted file mode 100644 index c243a76..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/610-fpu-cw-mips.patch b/packages/glibc/ports-2.12.1/610-fpu-cw-mips.patch deleted file mode 100644 index 7d990de..0000000 --- a/packages/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/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 deleted file mode 100644 index f6a5eb6..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/640-alpha-atfcts.patch b/packages/glibc/ports-2.12.1/640-alpha-atfcts.patch deleted file mode 100644 index 90a9d0d..0000000 --- a/packages/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/packages/glibc/ports-2.12.1/650-syslog.patch b/packages/glibc/ports-2.12.1/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/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/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 deleted file mode 100644 index a5a7052..0000000 --- a/packages/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/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 deleted file mode 100644 index 3f2bc0f..0000000 --- a/packages/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/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 deleted file mode 100644 index 1a632fe..0000000 --- a/packages/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/packages/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/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/packages/glibc/ports-2.13/160-manual-no-perl.patch b/packages/glibc/ports-2.13/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/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/packages/glibc/ports-2.13/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.13/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/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/packages/glibc/ports-2.13/180-resolv-dynamic.patch b/packages/glibc/ports-2.13/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/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/packages/glibc/ports-2.13/190-localedef-mmap.patch b/packages/glibc/ports-2.13/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/packages/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/packages/glibc/ports-2.13/200-fadvise64_64.patch b/packages/glibc/ports-2.13/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/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/packages/glibc/ports-2.13/220-section-comments.patch b/packages/glibc/ports-2.13/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/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/packages/glibc/ports-2.13/230-no-inline-gmon.patch b/packages/glibc/ports-2.13/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/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/packages/glibc/ports-2.13/240-check_native-headers.patch b/packages/glibc/ports-2.13/240-check_native-headers.patch deleted file mode 100644 index c936f71..0000000 --- a/packages/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/packages/glibc/ports-2.13/250-fix-pr631.patch b/packages/glibc/ports-2.13/250-fix-pr631.patch deleted file mode 100644 index a48912e..0000000 --- a/packages/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/packages/glibc/ports-2.13/260-assume-pipe2.patch b/packages/glibc/ports-2.13/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/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/packages/glibc/ports-2.13/270-china.patch b/packages/glibc/ports-2.13/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/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/packages/glibc/ports-2.13/280-new-valencian-locale.patch b/packages/glibc/ports-2.13/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/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/packages/glibc/ports-2.13/300-nscd-one-fork.patch b/packages/glibc/ports-2.13/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/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/packages/glibc/ports-2.13/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.13/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/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/packages/glibc/ports-2.13/330-m68k-sys-user.patch b/packages/glibc/ports-2.13/330-m68k-sys-user.patch deleted file mode 100644 index 191e0c6..0000000 --- a/packages/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/packages/glibc/ports-2.13/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.13/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/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/packages/glibc/ports-2.13/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.13/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/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/packages/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/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/packages/glibc/ports-2.13/380-dont-build-timezone.patch b/packages/glibc/ports-2.13/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/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/packages/glibc/ports-2.13/400-alpha-xstat.patch b/packages/glibc/ports-2.13/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/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/packages/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch b/packages/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch deleted file mode 100644 index fd55537..0000000 --- a/packages/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/packages/glibc/ports-2.13/420-alpha-statfs.patch b/packages/glibc/ports-2.13/420-alpha-statfs.patch deleted file mode 100644 index 65c925a..0000000 --- a/packages/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/packages/glibc/ports-2.13/430-alpha-creat.patch b/packages/glibc/ports-2.13/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/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/packages/glibc/ports-2.13/440-alpha-cache-shape.patch b/packages/glibc/ports-2.13/440-alpha-cache-shape.patch deleted file mode 100644 index 62ade7b..0000000 --- a/packages/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/packages/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch b/packages/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch deleted file mode 100644 index ac3ea9a..0000000 --- a/packages/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/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 deleted file mode 100644 index 313e0e0..0000000 --- a/packages/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/packages/glibc/ports-2.13/470-alpha-feupdateenv.patch b/packages/glibc/ports-2.13/470-alpha-feupdateenv.patch deleted file mode 100644 index 45a7051..0000000 --- a/packages/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/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 deleted file mode 100644 index 372f34c..0000000 --- a/packages/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/packages/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index b2ae9b5..0000000 --- a/packages/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/packages/glibc/ports-2.13/560-ppc-atomic.patch b/packages/glibc/ports-2.13/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/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/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 deleted file mode 100644 index 4f4dbec..0000000 --- a/packages/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/packages/glibc/ports-2.13/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.13/580-nptl-lowlevellock.patch deleted file mode 100644 index 08518e9..0000000 --- a/packages/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/packages/glibc/ports-2.13/610-fpu-cw-mips.patch b/packages/glibc/ports-2.13/610-fpu-cw-mips.patch deleted file mode 100644 index cd2b4d9..0000000 --- a/packages/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/packages/glibc/ports-2.13/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.13/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/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/packages/glibc/ports-2.13/640-alpha-atfcts.patch b/packages/glibc/ports-2.13/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/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/packages/glibc/ports-2.13/650-syslog.patch b/packages/glibc/ports-2.13/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/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/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 deleted file mode 100644 index a5a7052..0000000 --- a/packages/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/packages/glibc/ports-2.13/670-support-hard-float-eabi.patch b/packages/glibc/ports-2.13/670-support-hard-float-eabi.patch deleted file mode 100644 index 589f11e..0000000 --- a/packages/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/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 deleted file mode 100644 index 1a632fe..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/160-manual-no-perl.patch b/packages/glibc/ports-2.14.1/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/180-resolv-dynamic.patch b/packages/glibc/ports-2.14.1/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/190-localedef-mmap.patch b/packages/glibc/ports-2.14.1/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/200-fadvise64_64.patch b/packages/glibc/ports-2.14.1/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/220-section-comments.patch b/packages/glibc/ports-2.14.1/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/230-no-inline-gmon.patch b/packages/glibc/ports-2.14.1/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/260-assume-pipe2.patch b/packages/glibc/ports-2.14.1/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/270-china.patch b/packages/glibc/ports-2.14.1/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/280-new-valencian-locale.patch b/packages/glibc/ports-2.14.1/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/300-nscd-one-fork.patch b/packages/glibc/ports-2.14.1/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/330-m68k-sys-user.patch b/packages/glibc/ports-2.14.1/330-m68k-sys-user.patch deleted file mode 100644 index 8fbe2e5..0000000 --- a/packages/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/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 deleted file mode 100644 index 2402af0..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/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/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 deleted file mode 100644 index 9f78c52..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/380-dont-build-timezone.patch b/packages/glibc/ports-2.14.1/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/400-alpha-xstat.patch b/packages/glibc/ports-2.14.1/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/430-alpha-creat.patch b/packages/glibc/ports-2.14.1/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/440-alpha-cache-shape.patch b/packages/glibc/ports-2.14.1/440-alpha-cache-shape.patch deleted file mode 100644 index 8ca0bd6..0000000 --- a/packages/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/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 deleted file mode 100644 index c3e59f4..0000000 --- a/packages/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/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 deleted file mode 100644 index 372f34c..0000000 --- a/packages/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/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 deleted file mode 100644 index 2691a99..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/560-ppc-atomic.patch b/packages/glibc/ports-2.14.1/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/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/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 deleted file mode 100644 index 5e45682..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.14.1/580-nptl-lowlevellock.patch deleted file mode 100644 index 6bf5250..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/610-fpu-cw-mips.patch b/packages/glibc/ports-2.14.1/610-fpu-cw-mips.patch deleted file mode 100644 index e53ac78..0000000 --- a/packages/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/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 deleted file mode 100644 index 791d76c..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/640-alpha-atfcts.patch b/packages/glibc/ports-2.14.1/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/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/packages/glibc/ports-2.14.1/650-syslog.patch b/packages/glibc/ports-2.14.1/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/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/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 deleted file mode 100644 index a5a7052..0000000 --- a/packages/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/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 deleted file mode 100644 index 1a632fe..0000000 --- a/packages/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/packages/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/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/packages/glibc/ports-2.14/160-manual-no-perl.patch b/packages/glibc/ports-2.14/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/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/packages/glibc/ports-2.14/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.14/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/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/packages/glibc/ports-2.14/180-resolv-dynamic.patch b/packages/glibc/ports-2.14/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/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/packages/glibc/ports-2.14/190-localedef-mmap.patch b/packages/glibc/ports-2.14/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/packages/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/packages/glibc/ports-2.14/200-fadvise64_64.patch b/packages/glibc/ports-2.14/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/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/packages/glibc/ports-2.14/220-section-comments.patch b/packages/glibc/ports-2.14/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/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/packages/glibc/ports-2.14/230-no-inline-gmon.patch b/packages/glibc/ports-2.14/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/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/packages/glibc/ports-2.14/240-check_native-headers.patch b/packages/glibc/ports-2.14/240-check_native-headers.patch deleted file mode 100644 index c936f71..0000000 --- a/packages/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/packages/glibc/ports-2.14/260-assume-pipe2.patch b/packages/glibc/ports-2.14/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/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/packages/glibc/ports-2.14/270-china.patch b/packages/glibc/ports-2.14/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/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/packages/glibc/ports-2.14/280-new-valencian-locale.patch b/packages/glibc/ports-2.14/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/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/packages/glibc/ports-2.14/300-nscd-one-fork.patch b/packages/glibc/ports-2.14/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/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/packages/glibc/ports-2.14/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.14/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/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/packages/glibc/ports-2.14/330-m68k-sys-user.patch b/packages/glibc/ports-2.14/330-m68k-sys-user.patch deleted file mode 100644 index 28bcb11..0000000 --- a/packages/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/packages/glibc/ports-2.14/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.14/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/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/packages/glibc/ports-2.14/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.14/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/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/packages/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/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/packages/glibc/ports-2.14/380-dont-build-timezone.patch b/packages/glibc/ports-2.14/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/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/packages/glibc/ports-2.14/400-alpha-xstat.patch b/packages/glibc/ports-2.14/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/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/packages/glibc/ports-2.14/430-alpha-creat.patch b/packages/glibc/ports-2.14/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/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/packages/glibc/ports-2.14/440-alpha-cache-shape.patch b/packages/glibc/ports-2.14/440-alpha-cache-shape.patch deleted file mode 100644 index def0181..0000000 --- a/packages/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/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 deleted file mode 100644 index 1569ce4..0000000 --- a/packages/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/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 deleted file mode 100644 index 372f34c..0000000 --- a/packages/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/packages/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 3560e2a..0000000 --- a/packages/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/packages/glibc/ports-2.14/560-ppc-atomic.patch b/packages/glibc/ports-2.14/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/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/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 deleted file mode 100644 index b297ff0..0000000 --- a/packages/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/packages/glibc/ports-2.14/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.14/580-nptl-lowlevellock.patch deleted file mode 100644 index a2a141c..0000000 --- a/packages/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/packages/glibc/ports-2.14/610-fpu-cw-mips.patch b/packages/glibc/ports-2.14/610-fpu-cw-mips.patch deleted file mode 100644 index c624565..0000000 --- a/packages/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/packages/glibc/ports-2.14/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.14/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/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/packages/glibc/ports-2.14/640-alpha-atfcts.patch b/packages/glibc/ports-2.14/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/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/packages/glibc/ports-2.14/650-syslog.patch b/packages/glibc/ports-2.14/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/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/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 deleted file mode 100644 index a5a7052..0000000 --- a/packages/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/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 deleted file mode 100644 index 1a632fe..0000000 --- a/packages/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/packages/glibc/ports-2.15/091-libmemusage-link-failure.patch b/packages/glibc/ports-2.15/091-libmemusage-link-failure.patch deleted file mode 100644 index 9f9887c..0000000 --- a/packages/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/packages/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/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/packages/glibc/ports-2.15/160-manual-no-perl.patch b/packages/glibc/ports-2.15/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/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/packages/glibc/ports-2.15/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.15/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/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/packages/glibc/ports-2.15/180-resolv-dynamic.patch b/packages/glibc/ports-2.15/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/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/packages/glibc/ports-2.15/200-fadvise64_64.patch b/packages/glibc/ports-2.15/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/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/packages/glibc/ports-2.15/220-section-comments.patch b/packages/glibc/ports-2.15/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/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/packages/glibc/ports-2.15/230-no-inline-gmon.patch b/packages/glibc/ports-2.15/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/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/packages/glibc/ports-2.15/260-assume-pipe2.patch b/packages/glibc/ports-2.15/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/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/packages/glibc/ports-2.15/270-china.patch b/packages/glibc/ports-2.15/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/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/packages/glibc/ports-2.15/280-new-valencian-locale.patch b/packages/glibc/ports-2.15/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/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/packages/glibc/ports-2.15/300-nscd-one-fork.patch b/packages/glibc/ports-2.15/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/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/packages/glibc/ports-2.15/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.15/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/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/packages/glibc/ports-2.15/330-m68k-sys-user.patch b/packages/glibc/ports-2.15/330-m68k-sys-user.patch deleted file mode 100644 index faee18f..0000000 --- a/packages/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/packages/glibc/ports-2.15/340-dl_execstack-PaX-support.patch b/packages/glibc/ports-2.15/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/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/packages/glibc/ports-2.15/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.15/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/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/packages/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch b/packages/glibc/ports-2.15/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/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/packages/glibc/ports-2.15/380-dont-build-timezone.patch b/packages/glibc/ports-2.15/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/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/packages/glibc/ports-2.15/400-alpha-xstat.patch b/packages/glibc/ports-2.15/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/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/packages/glibc/ports-2.15/430-alpha-creat.patch b/packages/glibc/ports-2.15/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/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/packages/glibc/ports-2.15/440-alpha-cache-shape.patch b/packages/glibc/ports-2.15/440-alpha-cache-shape.patch deleted file mode 100644 index b3158da..0000000 --- a/packages/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/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 deleted file mode 100644 index a54d823..0000000 --- a/packages/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/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 deleted file mode 100644 index acf250d..0000000 --- a/packages/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/packages/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch b/packages/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch deleted file mode 100644 index 800a789..0000000 --- a/packages/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/packages/glibc/ports-2.15/560-ppc-atomic.patch b/packages/glibc/ports-2.15/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/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/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 deleted file mode 100644 index 8a05574..0000000 --- a/packages/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/packages/glibc/ports-2.15/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.15/580-nptl-lowlevellock.patch deleted file mode 100644 index a39e463..0000000 --- a/packages/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/packages/glibc/ports-2.15/610-fpu-cw-mips.patch b/packages/glibc/ports-2.15/610-fpu-cw-mips.patch deleted file mode 100644 index 8692a1f..0000000 --- a/packages/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/packages/glibc/ports-2.15/630-mips_shn_undef-hack.patch b/packages/glibc/ports-2.15/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/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/packages/glibc/ports-2.15/640-alpha-atfcts.patch b/packages/glibc/ports-2.15/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/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/packages/glibc/ports-2.15/650-syslog.patch b/packages/glibc/ports-2.15/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/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/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 deleted file mode 100644 index a5a7052..0000000 --- a/packages/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/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 deleted file mode 100644 index 59f95aa..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch b/packages/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index dce491c..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch b/packages/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/180-resolv-dynamic.patch b/packages/glibc/ports-2.16.0/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/200-fadvise64_64.patch b/packages/glibc/ports-2.16.0/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/260-assume-pipe2.patch b/packages/glibc/ports-2.16.0/260-assume-pipe2.patch deleted file mode 100644 index 54f0382..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/270-china.patch b/packages/glibc/ports-2.16.0/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/280-new-valencian-locale.patch b/packages/glibc/ports-2.16.0/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/300-nscd-one-fork.patch b/packages/glibc/ports-2.16.0/300-nscd-one-fork.patch deleted file mode 100644 index 13b2861..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch b/packages/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch deleted file mode 100644 index 11e8a65..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/330-m68k-sys-user.patch b/packages/glibc/ports-2.16.0/330-m68k-sys-user.patch deleted file mode 100644 index f113996..0000000 --- a/packages/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/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 deleted file mode 100644 index 2402af0..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch b/packages/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/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/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 deleted file mode 100644 index 9f78c52..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/380-dont-build-timezone.patch b/packages/glibc/ports-2.16.0/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/400-alpha-xstat.patch b/packages/glibc/ports-2.16.0/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/430-alpha-creat.patch b/packages/glibc/ports-2.16.0/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/440-alpha-cache-shape.patch b/packages/glibc/ports-2.16.0/440-alpha-cache-shape.patch deleted file mode 100644 index 5b1a298..0000000 --- a/packages/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/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 deleted file mode 100644 index f2ff04f..0000000 --- a/packages/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/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 deleted file mode 100644 index acf250d..0000000 --- a/packages/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/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 deleted file mode 100644 index 42faaa5..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/560-ppc-atomic.patch b/packages/glibc/ports-2.16.0/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/580-nptl-lowlevellock.patch b/packages/glibc/ports-2.16.0/580-nptl-lowlevellock.patch deleted file mode 100644 index 185331c..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/610-fpu-cw-mips.patch b/packages/glibc/ports-2.16.0/610-fpu-cw-mips.patch deleted file mode 100644 index 0c0daf3..0000000 --- a/packages/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/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 deleted file mode 100644 index 791d76c..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/640-alpha-atfcts.patch b/packages/glibc/ports-2.16.0/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/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/packages/glibc/ports-2.16.0/650-syslog.patch b/packages/glibc/ports-2.16.0/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/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/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 deleted file mode 100644 index a5a7052..0000000 --- a/packages/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/packages/gmp/4.3.0/version.desc b/packages/gmp/4.3.0/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/4.3.0/version.desc +++ b/packages/gmp/4.3.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/4.3.1/version.desc b/packages/gmp/4.3.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/4.3.1/version.desc +++ b/packages/gmp/4.3.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/4.3.2/version.desc b/packages/gmp/4.3.2/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/4.3.2/version.desc +++ b/packages/gmp/4.3.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/5.0.1/version.desc b/packages/gmp/5.0.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/5.0.1/version.desc +++ b/packages/gmp/5.0.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/5.0.2/version.desc b/packages/gmp/5.0.2/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/5.0.2/version.desc +++ b/packages/gmp/5.0.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/5.1.1/version.desc b/packages/gmp/5.1.1/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/5.1.1/version.desc +++ b/packages/gmp/5.1.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/5.1.3/version.desc b/packages/gmp/5.1.3/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/5.1.3/version.desc +++ b/packages/gmp/5.1.3/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/6.0.0a/version.desc b/packages/gmp/6.0.0a/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/6.0.0a/version.desc +++ b/packages/gmp/6.0.0a/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/6.1.0/version.desc b/packages/gmp/6.1.0/version.desc index 026d275..fcfe389 100644 --- a/packages/gmp/6.1.0/version.desc +++ b/packages/gmp/6.1.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/gmp/package.desc b/packages/gmp/package.desc index 8a97436..a7ed6ef 100644 --- a/packages/gmp/package.desc +++ b/packages/gmp/package.desc @@ -1,2 +1,3 @@ -repository="hg https://gmplib.org/repo/gmp/" -milestones="5.1" +repository='hg https://gmplib.org/repo/gmp/' +mirrors='https://gmplib.org/download/gmp $(CT_Mirrors GNU gmp)' +milestones='5.1' diff --git a/packages/isl/0.11.1/version.desc b/packages/isl/0.11.1/version.desc index 026d275..fcfe389 100644 --- a/packages/isl/0.11.1/version.desc +++ b/packages/isl/0.11.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/isl/0.12.2/version.desc b/packages/isl/0.12.2/version.desc index 026d275..fcfe389 100644 --- a/packages/isl/0.12.2/version.desc +++ b/packages/isl/0.12.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/isl/0.14/version.desc b/packages/isl/0.14/version.desc index 026d275..fcfe389 100644 --- a/packages/isl/0.14/version.desc +++ b/packages/isl/0.14/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/isl/package.desc b/packages/isl/package.desc index 5fc14ab..e328b88 100644 --- a/packages/isl/package.desc +++ b/packages/isl/package.desc @@ -1,2 +1,3 @@ -repository="git git://repo.or.cz/isl.git" -milestones="0.12 0.14" +repository='git git://repo.or.cz/isl.git' +mirrors='http://isl.gforge.inria.fr' +milestones='0.12 0.14' diff --git a/packages/libelf/0.8.12/version.desc b/packages/libelf/0.8.12/version.desc index 026d275..fcfe389 100644 --- a/packages/libelf/0.8.12/version.desc +++ b/packages/libelf/0.8.12/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/libelf/package.desc b/packages/libelf/package.desc index b015c2d..4720cd4 100644 --- a/packages/libelf/package.desc +++ b/packages/libelf/package.desc @@ -1,2 +1,3 @@ # FIXME No public repository and no new releases. # Consider switching to/adding project elftoolchain? +mirrors='http://www.mr511.de/software' diff --git a/packages/libiconv/1.14/version.desc b/packages/libiconv/1.14/version.desc index 026d275..fcfe389 100644 --- a/packages/libiconv/1.14/version.desc +++ b/packages/libiconv/1.14/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/libiconv/package.desc b/packages/libiconv/package.desc index eb8318e..b733bae 100644 --- a/packages/libiconv/package.desc +++ b/packages/libiconv/package.desc @@ -1 +1,2 @@ -repository="git https://git.savannah.gnu.org/git/libiconv.git" +repository='git https://git.savannah.gnu.org/git/libiconv.git' +mirrors='$(CT_Mirrors GNU libiconv)' diff --git a/packages/libtool/package.desc b/packages/libtool/package.desc index 995546e..2568f09 100644 --- a/packages/libtool/package.desc +++ b/packages/libtool/package.desc @@ -1 +1,2 @@ -repository="git git://git.savannah.gnu.org/libtool.git" +repository='git git://git.savannah.gnu.org/libtool.git' +mirrors='$(CT_Mirrors GNU libtool)' diff --git a/packages/linux/2.6.33.7/version.desc b/packages/linux/2.6.33.7/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.33.7/version.desc +++ b/packages/linux/2.6.33.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/2.6.34.7/version.desc b/packages/linux/2.6.34.7/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.34.7/version.desc +++ b/packages/linux/2.6.34.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/2.6.35.9/version.desc b/packages/linux/2.6.35.9/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.35.9/version.desc +++ b/packages/linux/2.6.35.9/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/2.6.36.4/version.desc b/packages/linux/2.6.36.4/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.36.4/version.desc +++ b/packages/linux/2.6.36.4/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/2.6.37.6/version.desc b/packages/linux/2.6.37.6/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.37.6/version.desc +++ b/packages/linux/2.6.37.6/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/2.6.38.8/version.desc b/packages/linux/2.6.38.8/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.38.8/version.desc +++ b/packages/linux/2.6.38.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/2.6.39.4/version.desc b/packages/linux/2.6.39.4/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/2.6.39.4/version.desc +++ b/packages/linux/2.6.39.4/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.0.101/version.desc b/packages/linux/3.0.101/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.0.101/version.desc +++ b/packages/linux/3.0.101/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.1.10/version.desc b/packages/linux/3.1.10/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.1.10/version.desc +++ b/packages/linux/3.1.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.11.10/version.desc b/packages/linux/3.11.10/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.11.10/version.desc +++ b/packages/linux/3.11.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.14.79/version.desc b/packages/linux/3.14.79/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.14.79/version.desc +++ b/packages/linux/3.14.79/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.15.10/version.desc b/packages/linux/3.15.10/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.15.10/version.desc +++ b/packages/linux/3.15.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.17.8/version.desc b/packages/linux/3.17.8/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.17.8/version.desc +++ b/packages/linux/3.17.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.18.48/version.desc b/packages/linux/3.18.48/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.18.48/version.desc +++ b/packages/linux/3.18.48/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.19.8/version.desc b/packages/linux/3.19.8/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.19.8/version.desc +++ b/packages/linux/3.19.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.3.8/version.desc b/packages/linux/3.3.8/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.3.8/version.desc +++ b/packages/linux/3.3.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.5.7/version.desc b/packages/linux/3.5.7/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.5.7/version.desc +++ b/packages/linux/3.5.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.6.11/version.desc b/packages/linux/3.6.11/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.6.11/version.desc +++ b/packages/linux/3.6.11/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.7.10/version.desc b/packages/linux/3.7.10/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.7.10/version.desc +++ b/packages/linux/3.7.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.8.13/version.desc b/packages/linux/3.8.13/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.8.13/version.desc +++ b/packages/linux/3.8.13/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/3.9.11/version.desc b/packages/linux/3.9.11/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/3.9.11/version.desc +++ b/packages/linux/3.9.11/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.0.9/version.desc b/packages/linux/4.0.9/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.0.9/version.desc +++ b/packages/linux/4.0.9/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.10.8/version.desc b/packages/linux/4.10.8/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.10.8/version.desc +++ b/packages/linux/4.10.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.2.8/version.desc b/packages/linux/4.2.8/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.2.8/version.desc +++ b/packages/linux/4.2.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.3.6/version.desc b/packages/linux/4.3.6/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.3.6/version.desc +++ b/packages/linux/4.3.6/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.5.7/version.desc b/packages/linux/4.5.7/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.5.7/version.desc +++ b/packages/linux/4.5.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.6.7/version.desc b/packages/linux/4.6.7/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.6.7/version.desc +++ b/packages/linux/4.6.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.7.10/version.desc b/packages/linux/4.7.10/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.7.10/version.desc +++ b/packages/linux/4.7.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/4.8.17/version.desc b/packages/linux/4.8.17/version.desc index 026d275..fcfe389 100644 --- a/packages/linux/4.8.17/version.desc +++ b/packages/linux/4.8.17/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/linux/package.desc b/packages/linux/package.desc index 2e5f7a3..e34f9e4 100644 --- a/packages/linux/package.desc +++ b/packages/linux/package.desc @@ -1 +1,2 @@ -repository="git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" +repository='git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git' +mirrors='$(CT_Mirrors linux ${CT_LINUX_VERSION})' diff --git a/packages/ltrace/0.5.3/version.desc b/packages/ltrace/0.5.3/version.desc index 026d275..fcfe389 100644 --- a/packages/ltrace/0.5.3/version.desc +++ b/packages/ltrace/0.5.3/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/ltrace/package.desc b/packages/ltrace/package.desc index d80e7ce..73d781b 100644 --- a/packages/ltrace/package.desc +++ b/packages/ltrace/package.desc @@ -1 +1,2 @@ -repository="git git://git.debian.org/git/collab-maint/ltrace.git" +repository='git git://git.debian.org/git/collab-maint/ltrace.git' +mirrors='http://ftp.debian.org/debian/pool/main/l/ltrace ftp:://ftp.debian.org/debian/pool/main/l/ltrace' diff --git a/packages/m4/1.4.13/version.desc b/packages/m4/1.4.13/version.desc index 026d275..fcfe389 100644 --- a/packages/m4/1.4.13/version.desc +++ b/packages/m4/1.4.13/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/m4/1.4.17/version.desc b/packages/m4/1.4.17/version.desc index 026d275..fcfe389 100644 --- a/packages/m4/1.4.17/version.desc +++ b/packages/m4/1.4.17/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/m4/package.desc b/packages/m4/package.desc index 555cdd1..f0d62ce 100644 --- a/packages/m4/package.desc +++ b/packages/m4/package.desc @@ -1 +1,2 @@ -repository="git git://git.sv.gnu.org/m4" +repository='git git://git.sv.gnu.org/m4' +mirrors='$(CT_Mirrors GNU m4)' diff --git a/packages/make/3.81/version.desc b/packages/make/3.81/version.desc index 026d275..fcfe389 100644 --- a/packages/make/3.81/version.desc +++ b/packages/make/3.81/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/make/4.0/version.desc b/packages/make/4.0/version.desc index 026d275..fcfe389 100644 --- a/packages/make/4.0/version.desc +++ b/packages/make/4.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/make/4.1/version.desc b/packages/make/4.1/version.desc index 026d275..fcfe389 100644 --- a/packages/make/4.1/version.desc +++ b/packages/make/4.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/make/package.desc b/packages/make/package.desc index b093324..8485d3e 100644 --- a/packages/make/package.desc +++ b/packages/make/package.desc @@ -1 +1,2 @@ -repository="git https://git.savannah.gnu.org/git/make.git" +repository='git https://git.savannah.gnu.org/git/make.git' +mirrors='$(CT_Mirrors GNU make)' diff --git a/packages/mingw-w64/package.desc b/packages/mingw-w64/package.desc index 7bae1f7..bbe507a 100644 --- a/packages/mingw-w64/package.desc +++ b/packages/mingw-w64/package.desc @@ -1 +1,2 @@ -repository="git https://git.code.sf.net/p/mingw-w64/mingw-w64" +repository='git https://git.code.sf.net/p/mingw-w64/mingw-w64' +mirrors='http://downloads.sourceforge.net/sourceforge/mingw-w64 https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/' diff --git a/packages/mingw-w64/v2.0.7/version.desc b/packages/mingw-w64/v2.0.7/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v2.0.7/version.desc +++ b/packages/mingw-w64/v2.0.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v2.0.8/version.desc b/packages/mingw-w64/v2.0.8/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v2.0.8/version.desc +++ b/packages/mingw-w64/v2.0.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v2.0.9/version.desc b/packages/mingw-w64/v2.0.9/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v2.0.9/version.desc +++ b/packages/mingw-w64/v2.0.9/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v3.0.0/version.desc b/packages/mingw-w64/v3.0.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v3.0.0/version.desc +++ b/packages/mingw-w64/v3.0.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v3.1.0/version.desc b/packages/mingw-w64/v3.1.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v3.1.0/version.desc +++ b/packages/mingw-w64/v3.1.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v3.2.0/version.desc b/packages/mingw-w64/v3.2.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v3.2.0/version.desc +++ b/packages/mingw-w64/v3.2.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v3.3.0/version.desc b/packages/mingw-w64/v3.3.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v3.3.0/version.desc +++ b/packages/mingw-w64/v3.3.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v4.0.0/version.desc b/packages/mingw-w64/v4.0.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v4.0.0/version.desc +++ b/packages/mingw-w64/v4.0.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v4.0.1/version.desc b/packages/mingw-w64/v4.0.1/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v4.0.1/version.desc +++ b/packages/mingw-w64/v4.0.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v4.0.2/version.desc b/packages/mingw-w64/v4.0.2/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v4.0.2/version.desc +++ b/packages/mingw-w64/v4.0.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v4.0.4/version.desc b/packages/mingw-w64/v4.0.4/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v4.0.4/version.desc +++ b/packages/mingw-w64/v4.0.4/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v4.0.5/version.desc b/packages/mingw-w64/v4.0.5/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v4.0.5/version.desc +++ b/packages/mingw-w64/v4.0.5/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mingw-w64/v5.0.0/version.desc b/packages/mingw-w64/v5.0.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mingw-w64/v5.0.0/version.desc +++ b/packages/mingw-w64/v5.0.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/0.7/version.desc b/packages/mpc/0.7/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/0.7/version.desc +++ b/packages/mpc/0.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/0.8.1/version.desc b/packages/mpc/0.8.1/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/0.8.1/version.desc +++ b/packages/mpc/0.8.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/0.8.2/version.desc b/packages/mpc/0.8.2/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/0.8.2/version.desc +++ b/packages/mpc/0.8.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/0.9/version.desc b/packages/mpc/0.9/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/0.9/version.desc +++ b/packages/mpc/0.9/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/1.0.1/version.desc b/packages/mpc/1.0.1/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/1.0.1/version.desc +++ b/packages/mpc/1.0.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/1.0.2/version.desc b/packages/mpc/1.0.2/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/1.0.2/version.desc +++ b/packages/mpc/1.0.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/1.0/version.desc b/packages/mpc/1.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mpc/1.0/version.desc +++ b/packages/mpc/1.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpc/package.desc b/packages/mpc/package.desc index 2a7e47c..c368160 100644 --- a/packages/mpc/package.desc +++ b/packages/mpc/package.desc @@ -1 +1,2 @@ -repository="git https://scm.gforge.inria.fr/anonscm/git/mpc/mpc.git" +repository='git https://scm.gforge.inria.fr/anonscm/git/mpc/mpc.git' +mirrors='http://www.multiprecision.org/mpc/download $(CT_Mirrors GNU mpc)' diff --git a/packages/mpfr/2.4.0/version.desc b/packages/mpfr/2.4.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/2.4.0/version.desc +++ b/packages/mpfr/2.4.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/2.4.1/version.desc b/packages/mpfr/2.4.1/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/2.4.1/version.desc +++ b/packages/mpfr/2.4.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/2.4.2/version.desc b/packages/mpfr/2.4.2/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/2.4.2/version.desc +++ b/packages/mpfr/2.4.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/3.0.0/version.desc b/packages/mpfr/3.0.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/3.0.0/version.desc +++ b/packages/mpfr/3.0.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/3.0.1/version.desc b/packages/mpfr/3.0.1/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/3.0.1/version.desc +++ b/packages/mpfr/3.0.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/3.1.0/version.desc b/packages/mpfr/3.1.0/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/3.1.0/version.desc +++ b/packages/mpfr/3.1.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/3.1.1/version.desc b/packages/mpfr/3.1.1/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/3.1.1/version.desc +++ b/packages/mpfr/3.1.1/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/3.1.2/version.desc b/packages/mpfr/3.1.2/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/3.1.2/version.desc +++ b/packages/mpfr/3.1.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/3.1.3/version.desc b/packages/mpfr/3.1.3/version.desc index 026d275..fcfe389 100644 --- a/packages/mpfr/3.1.3/version.desc +++ b/packages/mpfr/3.1.3/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/mpfr/package.desc b/packages/mpfr/package.desc index edd604a..1eacb98 100644 --- a/packages/mpfr/package.desc +++ b/packages/mpfr/package.desc @@ -1 +1,2 @@ -repository="svn https://scm.gforge.inria.fr/anonscm/svn/mpfr" +repository='svn https://scm.gforge.inria.fr/anonscm/svn/mpfr' +mirrors='http://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)' diff --git a/packages/musl/1.1.15/version.desc b/packages/musl/1.1.15/version.desc index 026d275..fcfe389 100644 --- a/packages/musl/1.1.15/version.desc +++ b/packages/musl/1.1.15/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/musl/package.desc b/packages/musl/package.desc index 23870dd..f1b73dc 100644 --- a/packages/musl/package.desc +++ b/packages/musl/package.desc @@ -1 +1,2 @@ -repository="git git://git.musl-libc.org/musl" +repository='git git://git.musl-libc.org/musl' +mirrors='http://www.musl-libc.org/releases' diff --git a/packages/ncurses/package.desc b/packages/ncurses/package.desc index 8b966f1..bb5646d 100644 --- a/packages/ncurses/package.desc +++ b/packages/ncurses/package.desc @@ -1 +1,2 @@ # No public repository for ncurses +mirrors='ftp://invisible-island.net/ncurses $(CT_Mirrors GNU ncurses)' diff --git a/packages/newlib-linaro/2.1.0-2014.09/version.desc b/packages/newlib-linaro/2.1.0-2014.09/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib-linaro/2.1.0-2014.09/version.desc +++ b/packages/newlib-linaro/2.1.0-2014.09/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib-linaro/2.2.0-2015.01/version.desc b/packages/newlib-linaro/2.2.0-2015.01/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib-linaro/2.2.0-2015.01/version.desc +++ b/packages/newlib-linaro/2.2.0-2015.01/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib-linaro/package.desc b/packages/newlib-linaro/package.desc index d1bc373..a11646d 100644 --- a/packages/newlib-linaro/package.desc +++ b/packages/newlib-linaro/package.desc @@ -1,4 +1,5 @@ -origin="Linaro" -master="newlib" -repository="git https://git.linaro.org/toolchain/newlib.git" -experimental="yes" +origin='Linaro' +master='newlib' +repository='git https://git.linaro.org/toolchain/newlib.git' +mirrors='$(CT_Mirrors Linaro newlib ${CT_NEWLIB_LINARO_VERSION})' +experimental='yes' diff --git a/packages/newlib/1.17.0/version.desc b/packages/newlib/1.17.0/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/1.17.0/version.desc +++ b/packages/newlib/1.17.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/1.18.0/version.desc b/packages/newlib/1.18.0/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/1.18.0/version.desc +++ b/packages/newlib/1.18.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/1.19.0/version.desc b/packages/newlib/1.19.0/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/1.19.0/version.desc +++ b/packages/newlib/1.19.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/1.20.0/version.desc b/packages/newlib/1.20.0/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/1.20.0/version.desc +++ b/packages/newlib/1.20.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/2.0.0/version.desc b/packages/newlib/2.0.0/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/2.0.0/version.desc +++ b/packages/newlib/2.0.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/2.1.0/version.desc b/packages/newlib/2.1.0/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/2.1.0/version.desc +++ b/packages/newlib/2.1.0/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/2.2.0.20151023/version.desc b/packages/newlib/2.2.0.20151023/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/2.2.0.20151023/version.desc +++ b/packages/newlib/2.2.0.20151023/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/2.3.0.20160226/version.desc b/packages/newlib/2.3.0.20160226/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/2.3.0.20160226/version.desc +++ b/packages/newlib/2.3.0.20160226/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/2.4.0.20161025/version.desc b/packages/newlib/2.4.0.20161025/version.desc index 026d275..fcfe389 100644 --- a/packages/newlib/2.4.0.20161025/version.desc +++ b/packages/newlib/2.4.0.20161025/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/newlib/package.desc b/packages/newlib/package.desc index 3abfe27..56fe432 100644 --- a/packages/newlib/package.desc +++ b/packages/newlib/package.desc @@ -1,3 +1,4 @@ -origin="RedHat" -repository="git git://sourceware.org/git/newlib-cygwin.git" -milestones="2.0" +origin='RedHat' +repository='git git://sourceware.org/git/newlib-cygwin.git' +mirrors='ftp://sourceware.org/pub/newlib' +milestones='2.0 2.1 2.2' diff --git a/packages/strace/4.10/version.desc b/packages/strace/4.10/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.10/version.desc +++ b/packages/strace/4.10/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.11/version.desc b/packages/strace/4.11/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.11/version.desc +++ b/packages/strace/4.11/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.12/version.desc b/packages/strace/4.12/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.12/version.desc +++ b/packages/strace/4.12/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.13/version.desc b/packages/strace/4.13/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.13/version.desc +++ b/packages/strace/4.13/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.14/version.desc b/packages/strace/4.14/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.14/version.desc +++ b/packages/strace/4.14/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.5.18/version.desc b/packages/strace/4.5.18/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.5.18/version.desc +++ b/packages/strace/4.5.18/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.5.19/version.desc b/packages/strace/4.5.19/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.5.19/version.desc +++ b/packages/strace/4.5.19/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.5.20/version.desc b/packages/strace/4.5.20/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.5.20/version.desc +++ b/packages/strace/4.5.20/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.6/version.desc b/packages/strace/4.6/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.6/version.desc +++ b/packages/strace/4.6/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.7/version.desc b/packages/strace/4.7/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.7/version.desc +++ b/packages/strace/4.7/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.8/version.desc b/packages/strace/4.8/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.8/version.desc +++ b/packages/strace/4.8/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/4.9/version.desc b/packages/strace/4.9/version.desc index 026d275..fcfe389 100644 --- a/packages/strace/4.9/version.desc +++ b/packages/strace/4.9/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/strace/package.desc b/packages/strace/package.desc index 9960dff..e260df8 100644 --- a/packages/strace/package.desc +++ b/packages/strace/package.desc @@ -1 +1,2 @@ -repository="git https://git.code.sf.net/p/strace/code" +repository='git https://git.code.sf.net/p/strace/code' +mirrors='http://downloads.sourceforge.net/project/strace/strace/${CT_STRACE_VERSION}' diff --git a/packages/uClibc-ng/1.0.20/version.desc b/packages/uClibc-ng/1.0.20/version.desc index 026d275..fcfe389 100644 --- a/packages/uClibc-ng/1.0.20/version.desc +++ b/packages/uClibc-ng/1.0.20/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/uClibc-ng/1.0.21/version.desc b/packages/uClibc-ng/1.0.21/version.desc index 026d275..fcfe389 100644 --- a/packages/uClibc-ng/1.0.21/version.desc +++ b/packages/uClibc-ng/1.0.21/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/uClibc-ng/package.desc b/packages/uClibc-ng/package.desc index 72cfd1a..1d514fb 100644 --- a/packages/uClibc-ng/package.desc +++ b/packages/uClibc-ng/package.desc @@ -1,3 +1,4 @@ -origin="uclibc-ng.org" -repository="git git://uclibc-ng.org/git/uclibc-ng" -milestones="0.9.33.2 1.0.0 1.0.15" +origin='uclibc-ng.org' +repository='git git://uclibc-ng.org/git/uclibc-ng' +mirrors='http://downloads.uclibc-ng.org/releases/${CT_UCLIBC_NG_VERSION}' +milestones='0.9.33.2 1.0.0 1.0.15' diff --git a/packages/uClibc/0.9.33.2/version.desc b/packages/uClibc/0.9.33.2/version.desc index 026d275..fcfe389 100644 --- a/packages/uClibc/0.9.33.2/version.desc +++ b/packages/uClibc/0.9.33.2/version.desc @@ -1 +1 @@ -obsolete="yes" +obsolete='yes' diff --git a/packages/uClibc/package.desc b/packages/uClibc/package.desc index ac3a844..fd2050a 100644 --- a/packages/uClibc/package.desc +++ b/packages/uClibc/package.desc @@ -1,5 +1,6 @@ # 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" +master='uClibc-ng' +origin='uclibc.org' +repository='git git://git.busybox.net/uClibc' +mirrors='http://www.uclibc.org/downloads http://www.uclibc.org/downloads/old-releases' diff --git a/packages/zlib/package.desc b/packages/zlib/package.desc index eea24eb..789f3c7 100644 --- a/packages/zlib/package.desc +++ b/packages/zlib/package.desc @@ -1 +1,2 @@ -repository="git https://github.com/madler/zlib.git" +repository='git https://github.com/madler/zlib.git' +mirrors='http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}' diff --git a/samples/aarch64-unknown-linux-android/crosstool.config b/samples/aarch64-unknown-linux-android/crosstool.config index 295b219..aa49e31 100644 --- a/samples/aarch64-unknown-linux-android/crosstool.config +++ b/samples/aarch64-unknown-linux-android/crosstool.config @@ -4,7 +4,7 @@ CT_ARCH_64=y CT_ARCH_ARCH="armv8-a" CT_STATIC_TOOLCHAIN=y CT_KERNEL_linux=y -CT_LIBC_BIONIC_V_14b=y +CT_BIONIC_V_14b=y CT_ANDROID_API_21=y CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config b/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config index 76174b6..3f948f8 100644 --- a/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config +++ b/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config @@ -9,7 +9,6 @@ CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_LIBC_glibc=y -CT_CC_GCC_SHOW_LINARO=y CT_CC_LANG_CXX=y CT_DEBUG_duma=y CT_DEBUG_gdb=y diff --git a/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config b/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config index f5a57dd..f34570c 100644 --- a/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config +++ b/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config @@ -11,10 +11,9 @@ CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_LIBC_glibc=y -CT_LIBC_ADDONS_LIST="libidn" -CT_LIBC_LOCALES=y -CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y -CT_CC_GCC_SHOW_LINARO=y +CT_GLIBC_USE_LIBIDN_ADDON=y +CT_GLIBC_LOCALES=y +CT_GLIBC_KERNEL_VERSION_NONE=y # CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config b/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config index 398a550..8e7e00c 100644 --- a/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config +++ b/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config @@ -7,7 +7,6 @@ CT_KERNEL_linux=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set CT_BINUTILS_PLUGINS=y CT_THREADS_NONE=y -CT_CC_GCC_SHOW_LINARO=y CT_CC_GCC_DISABLE_PCH=y CT_CC_GCC_BUILD_ID=y CT_CC_GCC_LNK_HASH_STYLE_BOTH=y diff --git a/samples/armv6-rpi-linux-gnueabi/crosstool.config b/samples/armv6-rpi-linux-gnueabi/crosstool.config index 22fbfaa..c67c8d8 100644 --- a/samples/armv6-rpi-linux-gnueabi/crosstool.config +++ b/samples/armv6-rpi-linux-gnueabi/crosstool.config @@ -4,16 +4,15 @@ CT_ARCH_CPU="arm1176jzf-s" CT_ARCH_FPU="vfp" CT_TARGET_VENDOR="rpi" CT_KERNEL_linux=y -CT_KERNEL_V_3_12=y +CT_LINUX_V_3_12=y CT_BINUTILS_LINKER_LD_GOLD=y CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_LIBC_glibc=y -CT_LIBC_LOCALES=y -CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN=y -CT_LIBC_GLIBC_MIN_KERNEL_VERSION="3.2.27" -CT_CC_GCC_SHOW_LINARO=y +CT_GLIBC_LOCALES=y +CT_GLIBC_KERNEL_VERSION_CHOSEN=y +CT_GLIBC_MIN_KERNEL_VERSION="3.2.27" CT_CC_GCC_DISABLE_PCH=y CT_CC_GCC_BUILD_ID=y CT_CC_GCC_LNK_HASH_STYLE_BOTH=y diff --git a/samples/i686-centos6-linux-gnu/crosstool.config b/samples/i686-centos6-linux-gnu/crosstool.config index 86ec1f6..255b877 100644 --- a/samples/i686-centos6-linux-gnu/crosstool.config +++ b/samples/i686-centos6-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_ARCH="i686" CT_TARGET_VENDOR="centos6" CT_KERNEL_linux=y -CT_KERNEL_V_2_6_32=y +CT_LINUX_V_2_6_32=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_12_2=y +CT_GLIBC_V_2_12_2=y CT_CC_LANG_CXX=y diff --git a/samples/i686-centos7-linux-gnu/crosstool.config b/samples/i686-centos7-linux-gnu/crosstool.config index b6403bb..6d524d6 100644 --- a/samples/i686-centos7-linux-gnu/crosstool.config +++ b/samples/i686-centos7-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_ARCH="i686" CT_TARGET_VENDOR="centos7" CT_KERNEL_linux=y -CT_KERNEL_V_3_10=y +CT_LINUX_V_3_10=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_17=y +CT_GLIBC_V_2_17=y CT_CC_LANG_CXX=y diff --git a/samples/i686-ubuntu12.04-linux-gnu/crosstool.config b/samples/i686-ubuntu12.04-linux-gnu/crosstool.config index 01c4312..320b091 100644 --- a/samples/i686-ubuntu12.04-linux-gnu/crosstool.config +++ b/samples/i686-ubuntu12.04-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_ARCH="i686" CT_TARGET_VENDOR="ubuntu12.04" CT_KERNEL_linux=y -CT_KERNEL_V_3_2=y +CT_LINUX_V_3_2=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_15=y +CT_GLIBC_V_2_15=y CT_CC_LANG_CXX=y diff --git a/samples/i686-ubuntu14.04-linux-gnu/crosstool.config b/samples/i686-ubuntu14.04-linux-gnu/crosstool.config index e3f459b..016f85d 100644 --- a/samples/i686-ubuntu14.04-linux-gnu/crosstool.config +++ b/samples/i686-ubuntu14.04-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_ARCH="i686" CT_TARGET_VENDOR="ubuntu14.04" CT_KERNEL_linux=y -CT_KERNEL_V_3_13=y +CT_LINUX_V_3_13=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_19=y +CT_GLIBC_V_2_19=y CT_CC_LANG_CXX=y diff --git a/samples/i686-ubuntu16.04-linux-gnu/crosstool.config b/samples/i686-ubuntu16.04-linux-gnu/crosstool.config index 9eec3c1..e9b0d9c 100644 --- a/samples/i686-ubuntu16.04-linux-gnu/crosstool.config +++ b/samples/i686-ubuntu16.04-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_ARCH="i686" CT_TARGET_VENDOR="ubuntu16.04" CT_KERNEL_linux=y -CT_KERNEL_V_4_4=y +CT_LINUX_V_4_4=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_23=y +CT_GLIBC_V_2_23=y CT_CC_LANG_CXX=y diff --git a/samples/powerpc-860-linux-gnu/crosstool.config b/samples/powerpc-860-linux-gnu/crosstool.config index eae5f91..b6d3a46 100644 --- a/samples/powerpc-860-linux-gnu/crosstool.config +++ b/samples/powerpc-860-linux-gnu/crosstool.config @@ -4,7 +4,7 @@ CT_ARCH_FLOAT_SW=y CT_TARGET_VENDOR="860" CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y -CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY="--without-fp" +CT_GLIBC_EXTRA_CONFIG_ARRAY="--without-fp" CT_CC_LANG_CXX=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set diff --git a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config index d05e2b4..b86bf27 100644 --- a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config +++ b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config @@ -6,7 +6,6 @@ CT_ARCH_powerpc_ABI_SPE=y CT_TARGET_VENDOR="e500v2" CT_KERNEL_linux=y CT_BINUTILS_EXTRA_CONFIG_ARRAY="--enable-spe=yes --enable-e500x2 --with-e500x2" -CT_CC_GCC_SHOW_LINARO=y CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-e500_double" CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-e500_double" # CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set diff --git a/samples/sh4-multilib-linux-uclibc/crosstool.config b/samples/sh4-multilib-linux-uclibc/crosstool.config index 2c61643..c3c6eda 100644 --- a/samples/sh4-multilib-linux-uclibc/crosstool.config +++ b/samples/sh4-multilib-linux-uclibc/crosstool.config @@ -4,7 +4,6 @@ CT_TARGET_VENDOR="multilib" CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y CT_LIBC_uClibc=y -CT_CC_GCC_V_4_9_4=y CT_CC_GCC_MULTILIB_LIST="m4a,m3" CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/samples/sparc-leon-linux-uclibc/crosstool.config b/samples/sparc-leon-linux-uclibc/crosstool.config index 02c346d..016cf69 100644 --- a/samples/sparc-leon-linux-uclibc/crosstool.config +++ b/samples/sparc-leon-linux-uclibc/crosstool.config @@ -4,12 +4,12 @@ CT_ARCH_TUNE="leon" CT_ARCH_FLOAT_SW=y CT_TARGET_VENDOR="leon" CT_KERNEL_linux=y -CT_KERNEL_V_3_10=y +CT_LINUX_V_3_10=y CT_LIBC_uClibc=y CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/uClibc.config" CT_LIBC_UCLIBC_IPV6=y CT_LIBC_UCLIBC_WCHAR=y -CT_CC_GCC_V_6_3_0=y +CT_GCC_V_6_3_0=y CT_CC_GCC_EXTRA_CONFIG_ARRAY="--disable-libitm" CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/samples/x86_64-centos6-linux-gnu/crosstool.config b/samples/x86_64-centos6-linux-gnu/crosstool.config index ad84a6c..a2375a4 100644 --- a/samples/x86_64-centos6-linux-gnu/crosstool.config +++ b/samples/x86_64-centos6-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_64=y CT_TARGET_VENDOR="centos6" CT_KERNEL_linux=y -CT_KERNEL_V_2_6_32=y +CT_LINUX_V_2_6_32=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_12_2=y +CT_GLIBC_V_2_12_2=y CT_CC_LANG_CXX=y diff --git a/samples/x86_64-centos7-linux-gnu/crosstool.config b/samples/x86_64-centos7-linux-gnu/crosstool.config index 8ca023c..db00ebb 100644 --- a/samples/x86_64-centos7-linux-gnu/crosstool.config +++ b/samples/x86_64-centos7-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_64=y CT_TARGET_VENDOR="centos7" CT_KERNEL_linux=y -CT_KERNEL_V_3_10=y +CT_LINUX_V_3_10=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_17=y +CT_GLIBC_V_2_17=y CT_CC_LANG_CXX=y diff --git a/samples/x86_64-multilib-linux-gnu/crosstool.config b/samples/x86_64-multilib-linux-gnu/crosstool.config index d3e5b63..dabac91 100644 --- a/samples/x86_64-multilib-linux-gnu/crosstool.config +++ b/samples/x86_64-multilib-linux-gnu/crosstool.config @@ -8,7 +8,7 @@ CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_LIBC_glibc=y -CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y +CT_GLIBC_KERNEL_VERSION_NONE=y CT_CC_GCC_MULTILIB_LIST="m64,m32,mx32" CT_CC_GCC_LNK_HASH_STYLE_BOTH=y CT_CC_LANG_CXX=y diff --git a/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config b/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config index 3e2bc3f..0a177e9 100644 --- a/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config +++ b/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_64=y CT_TARGET_VENDOR="ubuntu12.04" CT_KERNEL_linux=y -CT_KERNEL_V_3_2=y +CT_LINUX_V_3_2=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_15=y +CT_GLIBC_V_2_15=y CT_CC_LANG_CXX=y diff --git a/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config b/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config index 4aa16c7..234d950 100644 --- a/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config +++ b/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_64=y CT_TARGET_VENDOR="ubuntu14.04" CT_KERNEL_linux=y -CT_KERNEL_V_3_13=y +CT_LINUX_V_3_13=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_19=y +CT_GLIBC_V_2_19=y CT_CC_LANG_CXX=y diff --git a/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config b/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config index 37be385..220f818 100644 --- a/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config +++ b/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config @@ -3,8 +3,8 @@ CT_ARCH_x86=y CT_ARCH_64=y CT_TARGET_VENDOR="ubuntu16.04" CT_KERNEL_linux=y -CT_KERNEL_V_4_4=y +CT_LINUX_V_4_4=y CT_LIBC_glibc=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_LIBC_GLIBC_V_2_23=y +CT_GLIBC_V_2_23=y CT_CC_LANG_CXX=y diff --git a/samples/x86_64-unknown-linux-gnu/crosstool.config b/samples/x86_64-unknown-linux-gnu/crosstool.config index 3f7c338..a499b61 100644 --- a/samples/x86_64-unknown-linux-gnu/crosstool.config +++ b/samples/x86_64-unknown-linux-gnu/crosstool.config @@ -6,7 +6,7 @@ CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_LIBC_glibc=y -CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y +CT_GLIBC_KERNEL_VERSION_NONE=y CT_CC_GCC_LNK_HASH_STYLE_BOTH=y CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config b/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config index 34d1ea1..3d8cc41 100644 --- a/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config +++ b/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config @@ -12,10 +12,9 @@ CT_BINUTILS_LINKER_LD_GOLD=y CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_LIBC_glibc=y -CT_LIBC_ADDONS_LIST="libidn" -CT_LIBC_LOCALES=y -CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y -CT_CC_GCC_SHOW_LINARO=y +CT_GLIBC_USE_LIBIDN_ADDON=y +CT_GLIBC_LOCALES=y +CT_GLIBC_KERNEL_VERSION_NONE=y # CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index f378b4f..74139bc 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -4,44 +4,18 @@ # Download binutils do_binutils_get() { - if [ "${CT_BINUTILS_CUSTOM}" = "y" ]; then - CT_GetCustom "binutils" "${CT_BINUTILS_CUSTOM_VERSION}" \ - "${CT_BINUTILS_CUSTOM_LOCATION}" - else - case "${CT_BINUTILS_VERSION}" in - linaro-*) - CT_GetLinaro "binutils" "${CT_BINUTILS_VERSION}" - ;; - *) - CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \ - {http,ftp}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \ - ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots} - ;; - esac - fi - + CT_Fetch BINUTILS if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then - if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then - CT_GetCustom "elf2flt" "${CT_ELF2FLT_CUSTOM_VERSION}" \ - "${CT_ELF2FLT_CUSTOM_LOCATION}" - else - CT_GetGit elf2flt "${CT_ELF2FLT_GIT_CSET}" https://github.com/uclinux-dev/elf2flt.git - fi + CT_Fetch ELF2FLT fi } # Extract binutils do_binutils_extract() { - CT_Extract "binutils-${CT_BINUTILS_VERSION}" - CT_Patch "binutils" "${CT_BINUTILS_VERSION}" - + # TBD handle xtensa overlays in CT_ExtractPatch + CT_ExtractPatch BINUTILS if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then - CT_Extract "elf2flt-${CT_ELF2FLT_GIT_CSET}" - CT_Patch "elf2flt" "${CT_ELF2FLT_GIT_CSET}" - fi - - if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then - CT_ConfigureXtensa "binutils" "${CT_BINUTILS_VERSION}" + CT_ExtractPatch ELF2FLT fi } @@ -67,7 +41,7 @@ do_binutils_for_build() { if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then # We re-use binutils' options, plus our owns - binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" ) + binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils" ) binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_BUILD}" ) CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-build-${CT_BUILD}" @@ -100,7 +74,7 @@ do_binutils_for_host() { if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then # We re-use binutils' options, plus our owns - binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" ) + binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils" ) binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" ) CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-host-${CT_HOST}" @@ -207,7 +181,7 @@ do_binutils_backend() { CXXFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \ + "${CT_SRC_DIR}/binutils/configure" \ --build=${CT_BUILD} \ --host=${host} \ --target=${CT_TARGET} \ @@ -351,7 +325,7 @@ do_binutils_for_target() { CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \ + "${CT_SRC_DIR}/binutils/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ --target=${CT_TARGET} \ diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh deleted file mode 100644 index 2ca8e6f..0000000 --- a/scripts/build/cc/100-gcc.sh +++ /dev/null @@ -1,1178 +0,0 @@ -# This file adds the function to build the gcc C compiler -# Copyright 2007 Yann E. MORIN -# Licensed under the GPL v2. See COPYING in the root of this package - -# Download gcc -do_gcc_get() { - local linaro_version="" - local linaro_series="" - - if [ "${CT_CC_GCC_CUSTOM}" = "y" ]; then - CT_GetCustom "gcc" "${CT_CC_GCC_CUSTOM_VERSION}" \ - "${CT_CC_GCC_CUSTOM_LOCATION}" - else - case "${CT_CC_GCC_VERSION}" in - linaro-*) - CT_GetLinaro "gcc" "${CT_CC_GCC_VERSION}" - ;; - *) - # The official gcc hosts put gcc under a gcc/release/ directory, - # whereas the mirrors put it in the gcc/ directory. - CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_GCC_VERSION} \ - ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_GCC_VERSION} - ;; - esac - fi # ! custom location - # Starting with GCC 4.3, ecj is used for Java, and will only be - # built if the configure script finds ecj.jar at the top of the - # GCC source tree, which will not be there unless we get it and - # put it there ourselves - if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then - CT_GetFile ecj-latest .jar http://mirrors.kernel.org/sourceware/java/ \ - http://crosstool-ng.org/pub/java \ - ftp://gcc.gnu.org/pub/java \ - ftp://sourceware.org/pub/java - fi -} - -# Extract gcc -do_gcc_extract() { - CT_Extract "gcc-${CT_CC_GCC_VERSION}" - CT_Patch "gcc" "${CT_CC_GCC_VERSION}" - - # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree - if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \ - -a ! -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/ecj.jar" \ - ]; then - CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/ecj.jar" - fi - - if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then - CT_ConfigureXtensa "gcc" "${CT_CC_GCC_VERSION}" - fi -} - -#------------------------------------------------------------------------------ -# This function builds up the set of languages to enable -# No argument expected, returns the comma-separated language list on stdout -cc_gcc_lang_list() { - local lang_list - - lang_list="c" - [ "${CT_CC_LANG_CXX}" = "y" ] && lang_list+=",c++" - [ "${CT_CC_LANG_FORTRAN}" = "y" ] && lang_list+=",fortran" - [ "${CT_CC_LANG_ADA}" = "y" ] && lang_list+=",ada" - [ "${CT_CC_LANG_JAVA}" = "y" ] && lang_list+=",java" - [ "${CT_CC_LANG_OBJC}" = "y" ] && lang_list+=",objc" - [ "${CT_CC_LANG_OBJCXX}" = "y" ] && lang_list+=",obj-c++" - [ "${CT_CC_LANG_GOLANG}" = "y" ] && lang_list+=",go" - lang_list+="${CT_CC_LANG_OTHERS:+,${CT_CC_LANG_OTHERS}}" - - printf "%s" "${lang_list}" -} - -#------------------------------------------------------------------------------ -# Report the type of a GCC option -cc_gcc_classify_opt() { - # Options present in multiple architectures - case "${1}" in - -march=*) echo "arch"; return;; - -mabi=*) echo "abi"; return;; - -mcpu=*|-mmcu=*) echo "cpu"; return;; - -mtune=*) echo "tune"; return;; - -mfpu=*) echo "fpu"; return;; - -mhard-float|-msoft-float|-mno-soft-float|-mno-float|-mfloat-abi=*|\ - -mfpu|-mno-fpu) echo "float"; return;; - -EB|-EL|-mbig-endian|-mlittle-endian|-mbig|-mlittle|-meb|-mel|-mb|-ml) echo "endian"; return;; - -mthumb|-marm) echo "mode"; return;; - esac - - # Arch-specific options and aliases - case "${CT_ARCH}" in - m68k) - case "${1}" in - -m68881) echo "float"; return;; - -m5[234]*|-mcfv4e) echo "cpu"; return;; - -m68*|-mc68*) echo "arch"; return;; - esac - ;; - mips) - case "${1}" in - -mips[1234]|-mips32|-mips32r*|-mips64|-mips64r*) echo "cpu"; return;; - esac - ;; - sh) - case "${1}" in - -m[12345]*) echo "cpu"; return;; - esac - esac - - # All tried and failed - echo "unknown" -} - -evaluate_multilib_cflags() -{ - local multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_flags multi_index multi_count - local mdir mdir_os dirtop - local f - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - mdir="lib/${multi_dir}" - mdir_os="lib/${multi_os_dir_gcc}" - CT_SanitizeVarDir mdir mdir_os - CT_DoLog EXTRA " '${multi_flags}' --> ${mdir} (gcc) ${mdir_os} (os)" - for f in ${multi_flags}; do - eval ml_`cc_gcc_classify_opt ${f}`=seen - done - if [ "${CT_DEMULTILIB}" = "y" -a "${CT_USE_SYSROOT}" = "y" ]; then - case "${mdir_os}" in - lib/*) - ;; - *) - dirtop="${mdir_os%%/*}" - if [ ! -e "${multi_root}/${mdir_os}" ]; then - CT_DoExecLog ALL ln -sfv lib "${multi_root}/${mdir_os}" - fi - if [ ! -e "${multi_root}/usr/${mdir_os}" ]; then - CT_DoExecLog ALL ln -sfv lib "${multi_root}/usr/${mdir_os}" - fi - ;; - esac - fi -} - -#------------------------------------------------------------------------------ -# This function lists the multilibs configured in the compiler (even if multilib -# is disabled - so that it lists the default GCC/OS directory, which may differ -# from the default 'lib'). It then performs a few multilib checks/quirks: -# -# 1. On MIPS target, gcc (or rather, ld, which it invokes under the hood) chokes -# if supplied with two -mabi=* options. I.e., 'gcc -mabi=n32' and 'gcc -mabi=32' both -# work, but 'gcc -mabi=32 -mabi=n32' produces an internal error in ld. Thus we do -# not supply target's CFLAGS in multilib builds - and after compiling pass-1 gcc, -# attempt to determine which CFLAGS need to be filtered out. -# -# 2. If "demultilibing" is in effect, create top-level directories for any -# multilibs not in lib/ as symlinks to lib. -cc_gcc_multilib_housekeeping() { - local cc host - local ml_arch ml_abi ml_cpu ml_tune ml_fpu ml_float ml_endian ml_mode ml_unknown ml - local new_cflags - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - if [ \( "${CT_CANADIAN}" = "y" -o "${CT_CROSS_NATIVE}" = "y" \) -a "${host}" = "${CT_HOST}" ]; then - CT_DoLog EXTRA "Canadian Cross/Cross-native unable to confirm multilibs configuration "\ - "directly; will use build-compiler for housekeeping." - # Since we cannot run the desired compiler, substitute build-CC with the assumption - # that the host-CC is configured in the same way. - cc="${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}" - fi - - CT_IterateMultilibs evaluate_multilib_cflags evaluate_cflags - - # Filtering out some of the options provided in CT-NG config. Then *prepend* - # them to CT_TARGET_CFLAGS, like scripts/crosstool-NG.sh does. Zero out - # the stashed MULTILIB flags so that we don't process them again in the passes - # that follow. - CT_DoLog DEBUG "Configured target CFLAGS: '${CT_ARCH_TARGET_CFLAGS_MULTILIB}'" - ml_unknown= # Pass through anything we don't know about - for f in ${CT_ARCH_TARGET_CFLAGS_MULTILIB}; do - eval ml=\$ml_`cc_gcc_classify_opt ${f}` - if [ "${ml}" != "seen" ]; then - new_cflags="${new_cflags} ${f}" - fi - done - CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'" - CT_EnvModify CT_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}" - CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB "" - - # Currently, the only LDFLAGS are endianness-related - CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'" - if [ "${ml_endian}" != "seen" ]; then - CT_EnvModify CT_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}" - CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB "" - fi - CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'" -} - -#------------------------------------------------------------------------------ -# Core gcc pass 1 -do_gcc_core_pass_1() { - local -a core_opts - - if [ "${CT_CC_CORE_PASS_1_NEEDED}" != "y" ]; then - return 0 - fi - - core_opts+=( "mode=static" ) - core_opts+=( "host=${CT_BUILD}" ) - core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) - core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) - core_opts+=( "lang_list=c" ) - core_opts+=( "build_step=core1" ) - - CT_DoStep INFO "Installing pass-1 core C gcc compiler" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1" - - do_gcc_core_backend "${core_opts[@]}" - - CT_Popd - CT_EndStep -} - -# Core gcc pass 2 -do_gcc_core_pass_2() { - local -a core_opts - - if [ "${CT_CC_CORE_PASS_2_NEEDED}" != "y" ]; then - return 0 - fi - - # Common options: - core_opts+=( "host=${CT_BUILD}" ) - core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) - core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) - core_opts+=( "lang_list=c" ) - core_opts+=( "build_step=core2" ) - - # Different conditions are at stake here: - # - In case the threading model is NPTL, we need a shared-capable core - # gcc; in all other cases, we need a static-only core gcc. - # - In case the threading model is NPTL or win32, or gcc is 4.3 or - # later, we need to build libgcc - case "${CT_THREADS}" in - nptl) - core_opts+=( "mode=shared" ) - core_opts+=( "build_libgcc=yes" ) - ;; - win32) - core_opts+=( "mode=static" ) - core_opts+=( "build_libgcc=yes" ) - ;; - *) - core_opts+=( "mode=static" ) - core_opts+=( "build_libgcc=yes" ) - ;; - esac - - CT_DoStep INFO "Installing pass-2 core C gcc compiler" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-2" - - do_gcc_core_backend "${core_opts[@]}" - - CT_Popd - CT_EndStep -} - -#------------------------------------------------------------------------------ -# Build core gcc -# This function is used to build the core C compiler. -# Usage: do_gcc_core_backend param=value [...] -# Parameter : Definition : Type : Default -# mode : build a 'static', 'shared' or 'baremetal' : string : (none) -# host : the machine the core will run on : tuple : (none) -# prefix : dir prefix to install into : dir : (none) -# complibs : dir where complibs are installed : dir : (none) -# lang_list : the list of languages to build : string : (empty) -# build_libgcc : build libgcc or not : bool : no -# build_libstdcxx : build libstdc++ or not : bool : no -# build_libgfortran : build libgfortran or not : bool : no -# build_staticlinked : build statically linked or not : bool : no -# build_manuals : whether to build manuals or not : bool : no -# cflags : cflags to use : string : (empty) -# ldflags : ldflags to use : string : (empty) -# build_step : build step 'core1', 'core2', 'gcc_build' -# or 'gcc_host' : string : (none) -# Usage: do_gcc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no] -do_gcc_core_backend() { - local mode - local build_libgcc=no - local build_libstdcxx=no - local build_libgfortran=no - local build_staticlinked=no - local build_manuals=no - local host - local prefix - local complibs - local lang_list - local cflags - local cflags_for_build - local ldflags - local build_step - local log_txt - local tmp - local -a host_libstdcxx_flags - local -a extra_config - local -a core_LDFLAGS - local -a core_targets - local -a core_targets_all - local -a core_targets_install - local -a extra_user_config - local arg - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - # This function gets called in case of a bare metal compiler for the final gcc, too. - case "${build_step}" in - core1|core2) - CT_DoLog EXTRA "Configuring core C gcc compiler" - log_txt="gcc" - extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) - ;; - gcc_build|gcc_host) - CT_DoLog EXTRA "Configuring final gcc compiler" - extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" ) - log_txt="final gcc compiler" - # to inhibit the libiberty and libgcc tricks later on - build_libgcc=no - ;; - *) - CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'" - ;; - esac - - case "${mode}" in - static) - extra_config+=("--with-newlib") - extra_config+=("--enable-threads=no") - extra_config+=("--disable-shared") - ;; - shared) - extra_config+=("--enable-shared") - ;; - baremetal) - extra_config+=("--with-newlib") - extra_config+=("--enable-threads=no") - extra_config+=("--disable-shared") - ;; - *) - CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'" - ;; - esac - - # This is only needed when building libstdc++ in a canadian environment with - # this function being used for final step (i.e., when building for bare metal). - if [ "${build_step}" = "gcc_build" ]; then - CT_DoLog DEBUG "Copying headers to install area of core C compiler" - CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include" - fi - - for tmp in ARCH ABI CPU TUNE FPU FLOAT; do - eval tmp="\${CT_ARCH_WITH_${tmp}}" - if [ -n "${tmp}" ]; then - extra_config+=("${tmp}") - fi - done - - extra_config+=("--with-pkgversion=${CT_PKGVERSION}") - [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") - - if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then - extra_config+=("--enable-__cxa_atexit") - else - extra_config+=("--disable-__cxa_atexit") - fi - - if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" \ - -a "${mode}" = "baremetal" ]; then - extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}") - fi - - extra_config+=(--disable-libgomp) - extra_config+=(--disable-libmudflap) - extra_config+=(--disable-libmpx) - - if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then - extra_config+=(--enable-libssp) - else - extra_config+=(--disable-libssp) - fi - if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then - extra_config+=(--enable-libquadmath) - extra_config+=(--enable-libquadmath-support) - else - extra_config+=(--disable-libquadmath) - extra_config+=(--disable-libquadmath-support) - fi - - core_LDFLAGS+=("${ldflags}") - - # *** WARNING ! *** - # Keep this full if-else-if-elif-fi-fi block in sync - # with the same block in do_gcc_backend, below. - if [ "${build_staticlinked}" = "yes" ]; then - core_LDFLAGS+=("-static") - host_libstdcxx_flags+=("-static-libgcc") - host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++") - host_libstdcxx_flags+=("-lm") - # Companion libraries are build static (eg !shared), so - # the libstdc++ is not pulled automatically, although it - # is needed. Shoe-horn it in our LDFLAGS - # Ditto libm on some Fedora boxen - core_LDFLAGS+=("-lstdc++") - core_LDFLAGS+=("-lm") - else - if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then - # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2 - # build script - # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++, - # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html - host_libstdcxx_flags+=("-static-libgcc") - host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic") - host_libstdcxx_flags+=("-lm") - fi - # When companion libraries are build static (eg !shared), - # the libstdc++ is not pulled automatically, although it - # is needed. Shoe-horn it in our LDFLAGS - # Ditto libm on some Fedora boxen - core_LDFLAGS+=("-lstdc++") - core_LDFLAGS+=("-lm") - fi - - extra_config+=("--with-gmp=${complibs}") - extra_config+=("--with-mpfr=${complibs}") - extra_config+=("--with-mpc=${complibs}") - if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then - if [ "${CT_ISL}" = "y" ]; then - extra_config+=("--with-isl=${complibs}") - fi - if [ "${CT_CLOOG}" = "y" ]; then - extra_config+=("--with-cloog=${complibs}") - fi - else - extra_config+=("--with-isl=no") - extra_config+=("--with-cloog=no") - fi - if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then - extra_config+=("--enable-lto") - else - extra_config+=("--disable-lto") - fi - - if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then - extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}") - fi - - if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then - extra_config+=("--enable-target-optspace") - fi - if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then - extra_config+=("--disable-libstdcxx-pch") - fi - - case "${CT_CC_GCC_LDBL_128}" in - y) extra_config+=("--with-long-double-128");; - m) ;; - "") extra_config+=("--without-long-double-128");; - esac - - if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then - extra_config+=( --enable-linker-build-id ) - fi - - case "${CT_CC_GCC_LNK_HASH_STYLE}" in - "") ;; - *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );; - esac - - case "${CT_CC_GCC_DEC_FLOATS}" in - "") ;; - *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );; - esac - - case "${CT_ARCH}" in - mips) - case "${CT_CC_GCC_mips_llsc}" in - y) extra_config+=( --with-llsc );; - m) ;; - *) extra_config+=( --without-llsc );; - esac - case "${CT_CC_GCC_mips_synci}" in - y) extra_config+=( --with-synci );; - m) ;; - *) extra_config+=( --without-synci );; - esac - if [ "${CT_CC_GCC_mips_plt}" ]; then - extra_config+=( --with-mips-plt ) - fi - ;; # ARCH is mips - esac - - if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then - extra_config+=("--with-libintl-prefix=${complibs}") - else - extra_config+=("--disable-nls") - fi - - if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then - extra_config+=("--with-system-zlib") - fi - - case "${CT_CC_GCC_CONFIG_TLS}" in - y) extra_config+=("--enable-tls");; - m) ;; - "") extra_config+=("--disable-tls");; - esac - - # Some versions of gcc have a defective --enable-multilib. - # Since that's the default, only pass --disable-multilib. For multilib, - # also enable multiarch. Without explicit --enable-multiarch, pass-1 - # compiler is configured as multilib/no-multiarch and pass-2/final - # are multilib/multiarch (because gcc autodetects multiarch based on - # multiple instances of crt*.o in the install directory - which do - # not exist in pass-1). - if [ "${CT_MULTILIB}" != "y" ]; then - extra_config+=("--disable-multilib") - else - extra_config+=("--enable-multiarch") - if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then - extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}") - fi - fi - - CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" - - # We may need to modify host/build CFLAGS separately below - cflags_for_build="${CT_CFLAGS_FOR_BUILD}" - - # Clang's default bracket-depth is 256, and building GCC - # requires somewhere between 257 and 512. - if [ "${host}" = "${CT_BUILD}" ]; then - if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then - cflags="$cflags "-fbracket-depth=512 - cflags_for_build="$cflags_for_build "-fbracket-depth=512 - fi - else - # FIXME we currently don't support clang as host compiler, only as build - if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then - cflags_for_build="$cflags_for_build "-fbracket-depth=512 - fi - fi - - # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) - CT_DoExecLog CFG \ - CC_FOR_BUILD="${CT_BUILD}-gcc" \ - CFLAGS="${cflags}" \ - CFLAGS_FOR_BUILD="${cflags_for_build}" \ - CXXFLAGS="${cflags}" \ - CXXFLAGS_FOR_BUILD="${cflags_for_build}" \ - LDFLAGS="${core_LDFLAGS[*]}" \ - CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ - CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ - LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ - ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${host} \ - --target=${CT_TARGET} \ - --prefix="${prefix}" \ - --with-local-prefix="${CT_SYSROOT_DIR}" \ - ${CC_CORE_SYSROOT_ARG} \ - "${extra_config[@]}" \ - --enable-languages="${lang_list}" \ - "${extra_user_config[@]}" - - if [ "${build_libgcc}" = "yes" ]; then - # HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or - # gcc/config/t-libunwind so -lc is removed from the link for - # libgcc_s.so, as we do not have a target -lc yet. - # This is not as ugly as it appears to be ;-) All symbols get resolved - # during the glibc build, and we provide a proper libgcc_s.so for the - # cross toolchain during the final gcc build. - # - # As we cannot modify the source tree, nor override SHLIB_LC itself - # during configure or make, we have to edit the resultant - # gcc/libgcc.mk itself to remove -lc from the link. - # This causes us to have to jump through some hoops... - # - # To produce libgcc.mk to edit we firstly require libiberty.a, - # so we configure then build it. - # Next we have to configure gcc, create libgcc.mk then edit it... - # So much easier if we just edit the source tree, but hey... - if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then - CT_DoExecLog CFG make ${JOBSFLAGS} configure-libiberty - CT_DoExecLog ALL make ${JOBSFLAGS} -C libiberty libiberty.a - CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp - CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp - else - CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty - CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp all-build-libiberty - fi - # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here. - if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/libdecnumber" ]; then - CT_DoExecLog CFG make ${JOBSFLAGS} configure-libdecnumber - CT_DoExecLog ALL make ${JOBSFLAGS} -C libdecnumber libdecnumber.a - fi - # HACK: gcc-4.8 uses libbacktrace to make libgcc.mvars, so make it here. - if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/libbacktrace" ]; then - CT_DoExecLog CFG make ${JOBSFLAGS} configure-libbacktrace - CT_DoExecLog ALL make ${JOBSFLAGS} -C libbacktrace - fi - - libgcc_rule="libgcc.mvars" - core_targets=( gcc target-libgcc ) - - # On bare metal and canadian build the host-compiler is used when - # actually the build-system compiler is required. Choose the correct - # compilers for canadian build and use the defaults on other - # configurations. - if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then - repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \ - CXX_FOR_BUILD=${CT_BUILD}-g++ \ - GCC_FOR_TARGET=${CT_TARGET}-${CT_CC}" - else - repair_cc="" - fi - - CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \ - ${repair_cc} - sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule} - else # build_libgcc - core_targets=( gcc ) - fi # ! build libgcc - if [ "${build_libstdcxx}" = "yes" \ - -a "${CT_CC_LANG_CXX}" = "y" \ - ]; then - core_targets+=( target-libstdc++-v3 ) - fi - - if [ "${build_libgfortran}" = "yes" \ - -a "${CT_CC_LANG_FORTRAN}" = "y" \ - ]; then - core_targets+=( target-libgfortran ) - fi - - core_targets_all="${core_targets[@]/#/all-}" - core_targets_install="${core_targets[@]/#/install-}" - - case "${build_step}" in - gcc_build|gcc_host) - core_targets_all=all - core_targets_install=install - ;; - esac - - CT_DoLog EXTRA "Building ${log_txt}" - CT_DoExecLog ALL make ${JOBSFLAGS} ${core_targets_all} - - # Do not pass ${JOBSFLAGS} here: recent GCC builds have been failing - # in parallel 'make install' at random locations: libitm, libcilk, - # always for the files that are installed more than once to the same - # location (such as libitm.info). - # The symptom is that the install command fails with "File exists" - # error; running the same command manually succeeds. It looks like - # attempts to remove the destination and re-create it, but another - # install gets in the way. - CT_DoLog EXTRA "Installing ${log_txt}" - CT_DoExecLog ALL make ${core_targets_install} - - # Remove the libtool "pseudo-libraries": having them in the installed - # tree makes the libtoolized utilities that are built next assume - # that, for example, libsupc++ is an "accessory library", and not include - # -lsupc++ to the link flags. That breaks ltrace, for example. - CT_DoLog EXTRA "Housekeeping for core gcc compiler" - CT_Pushd "${prefix}" - find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL - CT_Popd - - if [ "${build_manuals}" = "yes" ]; then - CT_DoLog EXTRA "Building the GCC manuals" - CT_DoExecLog ALL make pdf html - CT_DoLog EXTRA "Installing the GCC manuals" - CT_DoExecLog ALL make install-{pdf,html}-gcc - fi - - # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able - # to call the C compiler with the same, somewhat canonical name. - # check whether compiler has an extension - file="$( ls -1 "${prefix}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )" - [ -z "${file}" ] || ext=".${file##*.}" - if [ -f "${prefix}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then - CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" - fi - - cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \ - host="${host}" -} - -#------------------------------------------------------------------------------ -# Build complete gcc to run on build -do_gcc_for_build() { - local -a build_final_opts - local build_final_backend - - # If native or simple cross toolchain is being built, then build==host; - # nothing to do. - case "${CT_TOOLCHAIN_TYPE}" in - native|cross) return 0;; - esac - - build_final_opts+=( "host=${CT_BUILD}" ) - build_final_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - build_final_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) - build_final_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) - build_final_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) - build_final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) - build_final_opts+=( "build_step=gcc_build" ) - if [ "${CT_BARE_METAL}" = "y" ]; then - # In the tests I've done, bare-metal was not impacted by the - # lack of such a compiler, but better safe than sorry... - build_final_opts+=( "mode=baremetal" ) - build_final_opts+=( "build_libgcc=yes" ) - build_final_opts+=( "build_libstdcxx=yes" ) - build_final_opts+=( "build_libgfortran=yes" ) - if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then - build_final_opts+=( "build_staticlinked=yes" ) - fi - build_final_backend=do_gcc_core_backend - else - build_final_backend=do_gcc_backend - fi - - CT_DoStep INFO "Installing final gcc compiler for build" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-build-${CT_BUILD}" - - "${build_final_backend}" "${build_final_opts[@]}" - - CT_Popd - CT_EndStep -} - -gcc_movelibs() { - local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count - local gcc_dir dst_dir - local rel - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - # Move only files, directories are for other multilibs. We're looking inside - # GCC's directory structure, thus use unmangled multi_os_dir that GCC reports. - gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir_gcc}" - if [ ! -d "${gcc_dir}" ]; then - # GCC didn't install anything outside of sysroot - return - fi - # Depending on the selected libc, we may or may not have the ${multi_os_dir_gcc} - # created by libc installation. If we do, use it. If we don't, use ${multi_os_dir} - # to avoid creating an otherwise empty directory. - dst_dir="${multi_root}/lib/${multi_os_dir_gcc}" - if [ ! -d "${dst_dir}" ]; then - dst_dir="${multi_root}/lib/${multi_os_dir}" - fi - CT_SanitizeVarDir dst_dir gcc_dir - rel=$( echo "${gcc_dir#${CT_PREFIX_DIR}/}" | sed 's#[^/]\{1,\}#..#g' ) - - ls "${gcc_dir}" | while read f; do - case "${f}" in - *.ld) - # Linker scripts remain in GCC's directory; elf2flt insists on - # finding them there. - continue - ;; - esac - if [ -f "${gcc_dir}/${f}" ]; then - CT_DoExecLog ALL mkdir -p "${dst_dir}" - CT_DoExecLog ALL mv "${gcc_dir}/${f}" "${dst_dir}/${f}" - CT_DoExecLog ALL ln -sf "${rel}/${dst_dir#${CT_PREFIX_DIR}/}/${f}" "${gcc_dir}/${f}" - fi - done -} - -#------------------------------------------------------------------------------ -# Build final gcc to run on host -do_gcc_for_host() { - local -a final_opts - local final_backend - - final_opts+=( "host=${CT_HOST}" ) - final_opts+=( "prefix=${CT_PREFIX_DIR}" ) - final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" ) - final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) - final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) - final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) - final_opts+=( "build_step=gcc_host" ) - if [ "${CT_BUILD_MANUALS}" = "y" ]; then - final_opts+=( "build_manuals=yes" ) - fi - if [ "${CT_BARE_METAL}" = "y" ]; then - final_opts+=( "mode=baremetal" ) - final_opts+=( "build_libgcc=yes" ) - final_opts+=( "build_libstdcxx=yes" ) - final_opts+=( "build_libgfortran=yes" ) - if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then - final_opts+=( "build_staticlinked=yes" ) - fi - final_backend=do_gcc_core_backend - else - final_backend=do_gcc_backend - fi - - CT_DoStep INFO "Installing final gcc compiler" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final" - "${final_backend}" "${final_opts[@]}" - CT_Popd - - # GCC installs stuff (including libgcc) into its own /lib dir, - # outside of sysroot, breaking linking with -static-libgcc. - # Fix up by moving the libraries into the sysroot. - if [ "${CT_USE_SYSROOT}" = "y" ]; then - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-movelibs" - CT_IterateMultilibs gcc_movelibs movelibs - CT_Popd - fi - - CT_EndStep -} - -#------------------------------------------------------------------------------ -# Build the final gcc -# Usage: do_gcc_backend param=value [...] -# Parameter : Definition : Type : Default -# host : the host we run onto : tuple : (none) -# prefix : the runtime prefix : dir : (none) -# complibs : the companion libraries prefix : dir : (none) -# cflags : cflags to use : string : (empty) -# ldflags : ldflags to use : string : (empty) -# lang_list : the list of languages to build : string : (empty) -# build_manuals : whether to build manuals or not : bool : no -do_gcc_backend() { - local host - local prefix - local complibs - local lang_list - local cflags - local cflags_for_build - local ldflags - local build_manuals - local -a host_libstdcxx_flags - local -a extra_config - local -a final_LDFLAGS - local tmp - local arg - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - CT_DoLog EXTRA "Configuring final gcc compiler" - - # Enable selected languages - extra_config+=("--enable-languages=${lang_list}") - - for tmp in ARCH ABI CPU TUNE FPU FLOAT; do - eval tmp="\${CT_ARCH_WITH_${tmp}}" - if [ -n "${tmp}" ]; then - extra_config+=("${tmp}") - fi - done - - [ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared") - extra_config+=("--with-pkgversion=${CT_PKGVERSION}") - [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") - - case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in - y) extra_config+=("--enable-sjlj-exceptions");; - m) ;; - "") extra_config+=("--disable-sjlj-exceptions");; - esac - if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then - extra_config+=("--enable-__cxa_atexit") - else - extra_config+=("--disable-__cxa_atexit") - fi - - if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" ]; then - extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}") - fi - - if [ "${CT_THREADS}" = "none" ]; then - extra_config+=(--disable-libatomic) - fi - if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then - extra_config+=(--enable-libmudflap) - else - extra_config+=(--disable-libmudflap) - fi - if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then - extra_config+=(--enable-libgomp) - else - extra_config+=(--disable-libgomp) - fi - if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then - extra_config+=(--enable-libssp) - else - extra_config+=(--disable-libssp) - fi - if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then - extra_config+=(--enable-libquadmath) - extra_config+=(--enable-libquadmath-support) - else - extra_config+=(--disable-libquadmath) - extra_config+=(--disable-libquadmath-support) - fi - - if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then - extra_config+=(--enable-libsanitizer) - else - extra_config+=(--disable-libsanitizer) - fi - - if [ "${CT_CC_GCC_HAS_LIBMPX}" = "y" ]; then - if [ "${CT_CC_GCC_LIBMPX}" = "y" ]; then - extra_config+=(--enable-libmpx) - else - extra_config+=(--disable-libmpx) - fi - fi - - final_LDFLAGS+=("${ldflags}") - - # *** WARNING ! *** - # Keep this full if-else-if-elif-fi-fi block in sync - # with the same block in do_gcc_core_backend, above. - if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then - final_LDFLAGS+=("-static") - host_libstdcxx_flags+=("-static-libgcc") - host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++") - host_libstdcxx_flags+=("-lm") - # Companion libraries are build static (eg !shared), so - # the libstdc++ is not pulled automatically, although it - # is needed. Shoe-horn it in our LDFLAGS - # Ditto libm on some Fedora boxen - final_LDFLAGS+=("-lstdc++") - final_LDFLAGS+=("-lm") - else - if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then - # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2 - # build script - # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++, - # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html - host_libstdcxx_flags+=("-static-libgcc") - host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic") - host_libstdcxx_flags+=("-lm") - fi - # When companion libraries are build static (eg !shared), - # the libstdc++ is not pulled automatically, although it - # is needed. Shoe-horn it in our LDFLAGS - # Ditto libm on some Fedora boxen - final_LDFLAGS+=("-lstdc++") - final_LDFLAGS+=("-lm") - fi - - extra_config+=("--with-gmp=${complibs}") - extra_config+=("--with-mpfr=${complibs}") - extra_config+=("--with-mpc=${complibs}") - if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then - if [ "${CT_ISL}" = "y" ]; then - extra_config+=("--with-isl=${complibs}") - fi - if [ "${CT_CLOOG}" = "y" ]; then - extra_config+=("--with-cloog=${complibs}") - fi - else - extra_config+=("--with-isl=no") - extra_config+=("--with-cloog=no") - fi - if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then - extra_config+=("--enable-lto") - else - extra_config+=("--disable-lto") - fi - - if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then - extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}") - fi - - if [ "${CT_THREADS}" = "none" ]; then - extra_config+=("--disable-threads") - else - if [ "${CT_THREADS}" = "win32" ]; then - extra_config+=("--enable-threads=win32") - extra_config+=("--disable-win32-registry") - else - extra_config+=("--enable-threads=posix") - fi - fi - - if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then - extra_config+=("--enable-target-optspace") - fi - if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then - extra_config+=("--disable-libstdcxx-pch") - fi - - case "${CT_CC_GCC_LDBL_128}" in - y) extra_config+=("--with-long-double-128");; - m) ;; - "") extra_config+=("--without-long-double-128");; - esac - - if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then - extra_config+=( --enable-linker-build-id ) - fi - - case "${CT_CC_GCC_LNK_HASH_STYLE}" in - "") ;; - *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );; - esac - - case "${CT_CC_GCC_DEC_FLOATS}" in - "") ;; - *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );; - esac - - if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then - extra_config+=( --enable-plugin ) - else - extra_config+=( --disable-plugin ) - fi - if [ "${CT_CC_GCC_GOLD}" = "y" ]; then - extra_config+=( --enable-gold ) - fi - - case "${CT_ARCH}" in - mips) - case "${CT_CC_GCC_mips_llsc}" in - y) extra_config+=( --with-llsc );; - m) ;; - *) extra_config+=( --without-llsc );; - esac - case "${CT_CC_GCC_mips_synci}" in - y) extra_config+=( --with-synci );; - m) ;; - *) extra_config+=( --without-synci );; - esac - if [ "${CT_CC_GCC_mips_plt}" ]; then - extra_config+=( --with-mips-plt ) - fi - ;; # ARCH is mips - esac - - if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then - extra_config+=("--with-libintl-prefix=${complibs}") - else - extra_config+=("--disable-nls") - fi - - if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then - extra_config+=("--with-system-zlib") - fi - - case "${CT_CC_GCC_CONFIG_TLS}" in - y) extra_config+=("--enable-tls");; - m) ;; - "") extra_config+=("--disable-tls");; - esac - - # Some versions of gcc have a defective --enable-multilib. - # Since that's the default, only pass --disable-multilib. - if [ "${CT_MULTILIB}" != "y" ]; then - extra_config+=("--disable-multilib") - else - extra_config+=("--enable-multiarch") - if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then - extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}") - fi - fi - - CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" - - # We may need to modify host/build CFLAGS separately below - cflags_for_build="${cflags}" - - # Clang's default bracket-depth is 256, and building GCC - # requires somewhere between 257 and 512. - if [ "${host}" = "${CT_BUILD}" ]; then - if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then - cflags="$cflags "-fbracket-depth=512 - cflags_for_build="$cflags_for_build "-fbracket-depth=512 - fi - else - # FIXME we currently don't support clang as host compiler, only as build - if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then - cflags_for_build="$cflags_for_build "-fbracket-depth=512 - fi - fi - - CT_DoExecLog CFG \ - CC_FOR_BUILD="${CT_BUILD}-gcc" \ - CFLAGS="${cflags}" \ - CFLAGS_FOR_BUILD="${cflags_for_build}" \ - CXXFLAGS="${cflags}" \ - CXXFLAGS_FOR_BUILD="${cflags_for_build}" \ - LDFLAGS="${final_LDFLAGS[*]}" \ - CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ - CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ - LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ - ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${host} \ - --target=${CT_TARGET} \ - --prefix="${prefix}" \ - ${CC_SYSROOT_ARG} \ - "${extra_config[@]}" \ - --with-local-prefix="${CT_SYSROOT_DIR}" \ - --enable-long-long \ - "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" - - if [ "${CT_CANADIAN}" = "y" ]; then - CT_DoLog EXTRA "Building libiberty" - CT_DoExecLog ALL make ${JOBSFLAGS} all-build-libiberty - fi - - CT_DoLog EXTRA "Building final gcc compiler" - CT_DoExecLog ALL make ${JOBSFLAGS} all - - # See the note on issues with parallel 'make install' in GCC above. - CT_DoLog EXTRA "Installing final gcc compiler" - if [ "${CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES}" = "y" ]; then - CT_DoExecLog ALL make install-strip - else - CT_DoExecLog ALL make install - fi - - # Remove the libtool "pseudo-libraries": having them in the installed - # tree makes the libtoolized utilities that are built next assume - # that, for example, libsupc++ is an "accessory library", and not include - # -lsupc++ to the link flags. That breaks ltrace, for example. - CT_DoLog EXTRA "Housekeeping for final gcc compiler" - CT_Pushd "${prefix}" - find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL - CT_Popd - - if [ "${build_manuals}" = "yes" ]; then - CT_DoLog EXTRA "Building the GCC manuals" - CT_DoExecLog ALL make pdf html - CT_DoLog EXTRA "Installing the GCC manuals" - CT_DoExecLog ALL make install-{pdf,html}-gcc - fi - - # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able - # to call the C compiler with the same, somewhat canonical name. - # check whether compiler has an extension - file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )" - [ -z "${file}" ] || ext=".${file##*.}" - if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then - CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" - fi - - cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \ - host="${host}" -} diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh new file mode 100644 index 0000000..449aafb --- /dev/null +++ b/scripts/build/cc/gcc.sh @@ -0,0 +1,1156 @@ +# This file adds the function to build the gcc C compiler +# Copyright 2007 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +# Download gcc +do_gcc_get() { + local linaro_version="" + local linaro_series="" + + CT_Fetch GCC + + # Starting with GCC 4.3, ecj is used for Java, and will only be + # built if the configure script finds ecj.jar at the top of the + # GCC source tree, which will not be there unless we get it and + # put it there ourselves + if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then + CT_GetFile ecj-latest .jar http://mirrors.kernel.org/sourceware/java/ \ + ftp://gcc.gnu.org/pub/java \ + ftp://sourceware.org/pub/java + fi +} + +# Extract gcc +do_gcc_extract() { + # TBD handle xtensa overlays + CT_ExtractPatch GCC + + # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree + if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" -a ! -f "${CT_SRC_DIR}/gcc/ecj.jar" ]; then + CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc/ecj.jar" + fi +} + +#------------------------------------------------------------------------------ +# This function builds up the set of languages to enable +# No argument expected, returns the comma-separated language list on stdout +cc_gcc_lang_list() { + local lang_list + + lang_list="c" + [ "${CT_CC_LANG_CXX}" = "y" ] && lang_list+=",c++" + [ "${CT_CC_LANG_FORTRAN}" = "y" ] && lang_list+=",fortran" + [ "${CT_CC_LANG_ADA}" = "y" ] && lang_list+=",ada" + [ "${CT_CC_LANG_JAVA}" = "y" ] && lang_list+=",java" + [ "${CT_CC_LANG_OBJC}" = "y" ] && lang_list+=",objc" + [ "${CT_CC_LANG_OBJCXX}" = "y" ] && lang_list+=",obj-c++" + [ "${CT_CC_LANG_GOLANG}" = "y" ] && lang_list+=",go" + lang_list+="${CT_CC_LANG_OTHERS:+,${CT_CC_LANG_OTHERS}}" + + printf "%s" "${lang_list}" +} + +#------------------------------------------------------------------------------ +# Report the type of a GCC option +cc_gcc_classify_opt() { + # Options present in multiple architectures + case "${1}" in + -march=*) echo "arch"; return;; + -mabi=*) echo "abi"; return;; + -mcpu=*|-mmcu=*) echo "cpu"; return;; + -mtune=*) echo "tune"; return;; + -mfpu=*) echo "fpu"; return;; + -mhard-float|-msoft-float|-mno-soft-float|-mno-float|-mfloat-abi=*|\ + -mfpu|-mno-fpu) echo "float"; return;; + -EB|-EL|-mbig-endian|-mlittle-endian|-mbig|-mlittle|-meb|-mel|-mb|-ml) echo "endian"; return;; + -mthumb|-marm) echo "mode"; return;; + esac + + # Arch-specific options and aliases + case "${CT_ARCH}" in + m68k) + case "${1}" in + -m68881) echo "float"; return;; + -m5[234]*|-mcfv4e) echo "cpu"; return;; + -m68*|-mc68*) echo "arch"; return;; + esac + ;; + mips) + case "${1}" in + -mips[1234]|-mips32|-mips32r*|-mips64|-mips64r*) echo "cpu"; return;; + esac + ;; + sh) + case "${1}" in + -m[12345]*) echo "cpu"; return;; + esac + esac + + # All tried and failed + echo "unknown" +} + +evaluate_multilib_cflags() +{ + local multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_flags multi_index multi_count + local mdir mdir_os dirtop + local f + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + mdir="lib/${multi_dir}" + mdir_os="lib/${multi_os_dir_gcc}" + CT_SanitizeVarDir mdir mdir_os + CT_DoLog EXTRA " '${multi_flags}' --> ${mdir} (gcc) ${mdir_os} (os)" + for f in ${multi_flags}; do + eval ml_`cc_gcc_classify_opt ${f}`=seen + done + if [ "${CT_DEMULTILIB}" = "y" -a "${CT_USE_SYSROOT}" = "y" ]; then + case "${mdir_os}" in + lib/*) + ;; + *) + dirtop="${mdir_os%%/*}" + if [ ! -e "${multi_root}/${mdir_os}" ]; then + CT_DoExecLog ALL ln -sfv lib "${multi_root}/${mdir_os}" + fi + if [ ! -e "${multi_root}/usr/${mdir_os}" ]; then + CT_DoExecLog ALL ln -sfv lib "${multi_root}/usr/${mdir_os}" + fi + ;; + esac + fi +} + +#------------------------------------------------------------------------------ +# This function lists the multilibs configured in the compiler (even if multilib +# is disabled - so that it lists the default GCC/OS directory, which may differ +# from the default 'lib'). It then performs a few multilib checks/quirks: +# +# 1. On MIPS target, gcc (or rather, ld, which it invokes under the hood) chokes +# if supplied with two -mabi=* options. I.e., 'gcc -mabi=n32' and 'gcc -mabi=32' both +# work, but 'gcc -mabi=32 -mabi=n32' produces an internal error in ld. Thus we do +# not supply target's CFLAGS in multilib builds - and after compiling pass-1 gcc, +# attempt to determine which CFLAGS need to be filtered out. +# +# 2. If "demultilibing" is in effect, create top-level directories for any +# multilibs not in lib/ as symlinks to lib. +cc_gcc_multilib_housekeeping() { + local cc host + local ml_arch ml_abi ml_cpu ml_tune ml_fpu ml_float ml_endian ml_mode ml_unknown ml + local new_cflags + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + if [ \( "${CT_CANADIAN}" = "y" -o "${CT_CROSS_NATIVE}" = "y" \) -a "${host}" = "${CT_HOST}" ]; then + CT_DoLog EXTRA "Canadian Cross/Cross-native unable to confirm multilibs configuration "\ + "directly; will use build-compiler for housekeeping." + # Since we cannot run the desired compiler, substitute build-CC with the assumption + # that the host-CC is configured in the same way. + cc="${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}" + fi + + CT_IterateMultilibs evaluate_multilib_cflags evaluate_cflags + + # Filtering out some of the options provided in CT-NG config. Then *prepend* + # them to CT_TARGET_CFLAGS, like scripts/crosstool-NG.sh does. Zero out + # the stashed MULTILIB flags so that we don't process them again in the passes + # that follow. + CT_DoLog DEBUG "Configured target CFLAGS: '${CT_ARCH_TARGET_CFLAGS_MULTILIB}'" + ml_unknown= # Pass through anything we don't know about + for f in ${CT_ARCH_TARGET_CFLAGS_MULTILIB}; do + eval ml=\$ml_`cc_gcc_classify_opt ${f}` + if [ "${ml}" != "seen" ]; then + new_cflags="${new_cflags} ${f}" + fi + done + CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'" + CT_EnvModify CT_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}" + CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB "" + + # Currently, the only LDFLAGS are endianness-related + CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'" + if [ "${ml_endian}" != "seen" ]; then + CT_EnvModify CT_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}" + CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB "" + fi + CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'" +} + +#------------------------------------------------------------------------------ +# Core gcc pass 1 +do_gcc_core_pass_1() { + local -a core_opts + + if [ "${CT_CC_CORE_PASS_1_NEEDED}" != "y" ]; then + return 0 + fi + + core_opts+=( "mode=static" ) + core_opts+=( "host=${CT_BUILD}" ) + core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) + core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) + core_opts+=( "lang_list=c" ) + core_opts+=( "build_step=core1" ) + + CT_DoStep INFO "Installing pass-1 core C gcc compiler" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1" + + do_gcc_core_backend "${core_opts[@]}" + + CT_Popd + CT_EndStep +} + +# Core gcc pass 2 +do_gcc_core_pass_2() { + local -a core_opts + + if [ "${CT_CC_CORE_PASS_2_NEEDED}" != "y" ]; then + return 0 + fi + + # Common options: + core_opts+=( "host=${CT_BUILD}" ) + core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) + core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) + core_opts+=( "lang_list=c" ) + core_opts+=( "build_step=core2" ) + + # Different conditions are at stake here: + # - In case the threading model is NPTL, we need a shared-capable core + # gcc; in all other cases, we need a static-only core gcc. + # - In case the threading model is NPTL or win32, or gcc is 4.3 or + # later, we need to build libgcc + case "${CT_THREADS}" in + nptl) + core_opts+=( "mode=shared" ) + core_opts+=( "build_libgcc=yes" ) + ;; + win32) + core_opts+=( "mode=static" ) + core_opts+=( "build_libgcc=yes" ) + ;; + *) + core_opts+=( "mode=static" ) + core_opts+=( "build_libgcc=yes" ) + ;; + esac + + CT_DoStep INFO "Installing pass-2 core C gcc compiler" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-2" + + do_gcc_core_backend "${core_opts[@]}" + + CT_Popd + CT_EndStep +} + +#------------------------------------------------------------------------------ +# Build core gcc +# This function is used to build the core C compiler. +# Usage: do_gcc_core_backend param=value [...] +# Parameter : Definition : Type : Default +# mode : build a 'static', 'shared' or 'baremetal' : string : (none) +# host : the machine the core will run on : tuple : (none) +# prefix : dir prefix to install into : dir : (none) +# complibs : dir where complibs are installed : dir : (none) +# lang_list : the list of languages to build : string : (empty) +# build_libgcc : build libgcc or not : bool : no +# build_libstdcxx : build libstdc++ or not : bool : no +# build_libgfortran : build libgfortran or not : bool : no +# build_staticlinked : build statically linked or not : bool : no +# build_manuals : whether to build manuals or not : bool : no +# cflags : cflags to use : string : (empty) +# ldflags : ldflags to use : string : (empty) +# build_step : build step 'core1', 'core2', 'gcc_build' +# or 'gcc_host' : string : (none) +# Usage: do_gcc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no] +do_gcc_core_backend() { + local mode + local build_libgcc=no + local build_libstdcxx=no + local build_libgfortran=no + local build_staticlinked=no + local build_manuals=no + local host + local prefix + local complibs + local lang_list + local cflags + local cflags_for_build + local ldflags + local build_step + local log_txt + local tmp + local -a host_libstdcxx_flags + local -a extra_config + local -a core_LDFLAGS + local -a core_targets + local -a core_targets_all + local -a core_targets_install + local -a extra_user_config + local arg + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + # This function gets called in case of a bare metal compiler for the final gcc, too. + case "${build_step}" in + core1|core2) + CT_DoLog EXTRA "Configuring core C gcc compiler" + log_txt="gcc" + extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) + ;; + gcc_build|gcc_host) + CT_DoLog EXTRA "Configuring final gcc compiler" + extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" ) + log_txt="final gcc compiler" + # to inhibit the libiberty and libgcc tricks later on + build_libgcc=no + ;; + *) + CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'" + ;; + esac + + case "${mode}" in + static) + extra_config+=("--with-newlib") + extra_config+=("--enable-threads=no") + extra_config+=("--disable-shared") + ;; + shared) + extra_config+=("--enable-shared") + ;; + baremetal) + extra_config+=("--with-newlib") + extra_config+=("--enable-threads=no") + extra_config+=("--disable-shared") + ;; + *) + CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'" + ;; + esac + + # This is only needed when building libstdc++ in a canadian environment with + # this function being used for final step (i.e., when building for bare metal). + if [ "${build_step}" = "gcc_build" ]; then + CT_DoLog DEBUG "Copying headers to install area of core C compiler" + CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include" + fi + + for tmp in ARCH ABI CPU TUNE FPU FLOAT; do + eval tmp="\${CT_ARCH_WITH_${tmp}}" + if [ -n "${tmp}" ]; then + extra_config+=("${tmp}") + fi + done + + extra_config+=("--with-pkgversion=${CT_PKGVERSION}") + [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") + + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then + extra_config+=("--enable-__cxa_atexit") + else + extra_config+=("--disable-__cxa_atexit") + fi + + if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" \ + -a "${mode}" = "baremetal" ]; then + extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}") + fi + + extra_config+=(--disable-libgomp) + extra_config+=(--disable-libmudflap) + extra_config+=(--disable-libmpx) + + if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then + extra_config+=(--enable-libssp) + else + extra_config+=(--disable-libssp) + fi + if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then + extra_config+=(--enable-libquadmath) + extra_config+=(--enable-libquadmath-support) + else + extra_config+=(--disable-libquadmath) + extra_config+=(--disable-libquadmath-support) + fi + + core_LDFLAGS+=("${ldflags}") + + # *** WARNING ! *** + # Keep this full if-else-if-elif-fi-fi block in sync + # with the same block in do_gcc_backend, below. + if [ "${build_staticlinked}" = "yes" ]; then + core_LDFLAGS+=("-static") + host_libstdcxx_flags+=("-static-libgcc") + host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++") + host_libstdcxx_flags+=("-lm") + # Companion libraries are build static (eg !shared), so + # the libstdc++ is not pulled automatically, although it + # is needed. Shoe-horn it in our LDFLAGS + # Ditto libm on some Fedora boxen + core_LDFLAGS+=("-lstdc++") + core_LDFLAGS+=("-lm") + else + if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then + # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2 + # build script + # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++, + # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html + host_libstdcxx_flags+=("-static-libgcc") + host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic") + host_libstdcxx_flags+=("-lm") + fi + # When companion libraries are build static (eg !shared), + # the libstdc++ is not pulled automatically, although it + # is needed. Shoe-horn it in our LDFLAGS + # Ditto libm on some Fedora boxen + core_LDFLAGS+=("-lstdc++") + core_LDFLAGS+=("-lm") + fi + + extra_config+=("--with-gmp=${complibs}") + extra_config+=("--with-mpfr=${complibs}") + extra_config+=("--with-mpc=${complibs}") + if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then + if [ "${CT_ISL}" = "y" ]; then + extra_config+=("--with-isl=${complibs}") + fi + if [ "${CT_CLOOG}" = "y" ]; then + extra_config+=("--with-cloog=${complibs}") + fi + else + extra_config+=("--with-isl=no") + extra_config+=("--with-cloog=no") + fi + if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then + extra_config+=("--enable-lto") + else + extra_config+=("--disable-lto") + fi + + if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then + extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}") + fi + + if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then + extra_config+=("--enable-target-optspace") + fi + if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then + extra_config+=("--disable-libstdcxx-pch") + fi + + case "${CT_CC_GCC_LDBL_128}" in + y) extra_config+=("--with-long-double-128");; + m) ;; + "") extra_config+=("--without-long-double-128");; + esac + + if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then + extra_config+=( --enable-linker-build-id ) + fi + + case "${CT_CC_GCC_LNK_HASH_STYLE}" in + "") ;; + *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );; + esac + + case "${CT_CC_GCC_DEC_FLOATS}" in + "") ;; + *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );; + esac + + case "${CT_ARCH}" in + mips) + case "${CT_CC_GCC_mips_llsc}" in + y) extra_config+=( --with-llsc );; + m) ;; + *) extra_config+=( --without-llsc );; + esac + case "${CT_CC_GCC_mips_synci}" in + y) extra_config+=( --with-synci );; + m) ;; + *) extra_config+=( --without-synci );; + esac + if [ "${CT_CC_GCC_mips_plt}" ]; then + extra_config+=( --with-mips-plt ) + fi + ;; # ARCH is mips + esac + + if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then + extra_config+=("--with-libintl-prefix=${complibs}") + else + extra_config+=("--disable-nls") + fi + + if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then + extra_config+=("--with-system-zlib") + fi + + case "${CT_CC_GCC_CONFIG_TLS}" in + y) extra_config+=("--enable-tls");; + m) ;; + "") extra_config+=("--disable-tls");; + esac + + # Some versions of gcc have a defective --enable-multilib. + # Since that's the default, only pass --disable-multilib. For multilib, + # also enable multiarch. Without explicit --enable-multiarch, pass-1 + # compiler is configured as multilib/no-multiarch and pass-2/final + # are multilib/multiarch (because gcc autodetects multiarch based on + # multiple instances of crt*.o in the install directory - which do + # not exist in pass-1). + if [ "${CT_MULTILIB}" != "y" ]; then + extra_config+=("--disable-multilib") + else + extra_config+=("--enable-multiarch") + if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then + extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}") + fi + fi + + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" + + # We may need to modify host/build CFLAGS separately below + cflags_for_build="${CT_CFLAGS_FOR_BUILD}" + + # Clang's default bracket-depth is 256, and building GCC + # requires somewhere between 257 and 512. + if [ "${host}" = "${CT_BUILD}" ]; then + if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then + cflags="$cflags "-fbracket-depth=512 + cflags_for_build="$cflags_for_build "-fbracket-depth=512 + fi + else + # FIXME we currently don't support clang as host compiler, only as build + if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then + cflags_for_build="$cflags_for_build "-fbracket-depth=512 + fi + fi + + # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) + CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CFLAGS="${cflags}" \ + CFLAGS_FOR_BUILD="${cflags_for_build}" \ + CXXFLAGS="${cflags}" \ + CXXFLAGS_FOR_BUILD="${cflags_for_build}" \ + LDFLAGS="${core_LDFLAGS[*]}" \ + CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ + CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ + LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ + ${CONFIG_SHELL} \ + "${CT_SRC_DIR}/gcc/configure" \ + --build=${CT_BUILD} \ + --host=${host} \ + --target=${CT_TARGET} \ + --prefix="${prefix}" \ + --with-local-prefix="${CT_SYSROOT_DIR}" \ + ${CC_CORE_SYSROOT_ARG} \ + "${extra_config[@]}" \ + --enable-languages="${lang_list}" \ + "${extra_user_config[@]}" + + if [ "${build_libgcc}" = "yes" ]; then + # HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or + # gcc/config/t-libunwind so -lc is removed from the link for + # libgcc_s.so, as we do not have a target -lc yet. + # This is not as ugly as it appears to be ;-) All symbols get resolved + # during the glibc build, and we provide a proper libgcc_s.so for the + # cross toolchain during the final gcc build. + # + # As we cannot modify the source tree, nor override SHLIB_LC itself + # during configure or make, we have to edit the resultant + # gcc/libgcc.mk itself to remove -lc from the link. + # This causes us to have to jump through some hoops... + # + # To produce libgcc.mk to edit we firstly require libiberty.a, + # so we configure then build it. + # Next we have to configure gcc, create libgcc.mk then edit it... + # So much easier if we just edit the source tree, but hey... + if [ ! -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then + CT_DoExecLog CFG make ${JOBSFLAGS} configure-libiberty + CT_DoExecLog ALL make ${JOBSFLAGS} -C libiberty libiberty.a + CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp + CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp + else + CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty + CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp all-build-libiberty + fi + # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here. + if [ -d "${CT_SRC_DIR}/gcc/libdecnumber" ]; then + CT_DoExecLog CFG make ${JOBSFLAGS} configure-libdecnumber + CT_DoExecLog ALL make ${JOBSFLAGS} -C libdecnumber libdecnumber.a + fi + # HACK: gcc-4.8 uses libbacktrace to make libgcc.mvars, so make it here. + if [ -d "${CT_SRC_DIR}/gcc/libbacktrace" ]; then + CT_DoExecLog CFG make ${JOBSFLAGS} configure-libbacktrace + CT_DoExecLog ALL make ${JOBSFLAGS} -C libbacktrace + fi + + libgcc_rule="libgcc.mvars" + core_targets=( gcc target-libgcc ) + + # On bare metal and canadian build the host-compiler is used when + # actually the build-system compiler is required. Choose the correct + # compilers for canadian build and use the defaults on other + # configurations. + if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then + repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \ + CXX_FOR_BUILD=${CT_BUILD}-g++ \ + GCC_FOR_TARGET=${CT_TARGET}-${CT_CC}" + else + repair_cc="" + fi + + CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \ + ${repair_cc} + sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule} + else # build_libgcc + core_targets=( gcc ) + fi # ! build libgcc + if [ "${build_libstdcxx}" = "yes" \ + -a "${CT_CC_LANG_CXX}" = "y" \ + ]; then + core_targets+=( target-libstdc++-v3 ) + fi + + if [ "${build_libgfortran}" = "yes" \ + -a "${CT_CC_LANG_FORTRAN}" = "y" \ + ]; then + core_targets+=( target-libgfortran ) + fi + + core_targets_all="${core_targets[@]/#/all-}" + core_targets_install="${core_targets[@]/#/install-}" + + case "${build_step}" in + gcc_build|gcc_host) + core_targets_all=all + core_targets_install=install + ;; + esac + + CT_DoLog EXTRA "Building ${log_txt}" + CT_DoExecLog ALL make ${JOBSFLAGS} ${core_targets_all} + + # Do not pass ${JOBSFLAGS} here: recent GCC builds have been failing + # in parallel 'make install' at random locations: libitm, libcilk, + # always for the files that are installed more than once to the same + # location (such as libitm.info). + # The symptom is that the install command fails with "File exists" + # error; running the same command manually succeeds. It looks like + # attempts to remove the destination and re-create it, but another + # install gets in the way. + CT_DoLog EXTRA "Installing ${log_txt}" + CT_DoExecLog ALL make ${core_targets_install} + + # Remove the libtool "pseudo-libraries": having them in the installed + # tree makes the libtoolized utilities that are built next assume + # that, for example, libsupc++ is an "accessory library", and not include + # -lsupc++ to the link flags. That breaks ltrace, for example. + CT_DoLog EXTRA "Housekeeping for core gcc compiler" + CT_Pushd "${prefix}" + find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL + CT_Popd + + if [ "${build_manuals}" = "yes" ]; then + CT_DoLog EXTRA "Building the GCC manuals" + CT_DoExecLog ALL make pdf html + CT_DoLog EXTRA "Installing the GCC manuals" + CT_DoExecLog ALL make install-{pdf,html}-gcc + fi + + # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able + # to call the C compiler with the same, somewhat canonical name. + # check whether compiler has an extension + file="$( ls -1 "${prefix}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )" + [ -z "${file}" ] || ext=".${file##*.}" + if [ -f "${prefix}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then + CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" + fi + + cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \ + host="${host}" +} + +#------------------------------------------------------------------------------ +# Build complete gcc to run on build +do_gcc_for_build() { + local -a build_final_opts + local build_final_backend + + # If native or simple cross toolchain is being built, then build==host; + # nothing to do. + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + build_final_opts+=( "host=${CT_BUILD}" ) + build_final_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + build_final_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) + build_final_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + build_final_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) + build_final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) + build_final_opts+=( "build_step=gcc_build" ) + if [ "${CT_BARE_METAL}" = "y" ]; then + # In the tests I've done, bare-metal was not impacted by the + # lack of such a compiler, but better safe than sorry... + build_final_opts+=( "mode=baremetal" ) + build_final_opts+=( "build_libgcc=yes" ) + build_final_opts+=( "build_libstdcxx=yes" ) + build_final_opts+=( "build_libgfortran=yes" ) + if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then + build_final_opts+=( "build_staticlinked=yes" ) + fi + build_final_backend=do_gcc_core_backend + else + build_final_backend=do_gcc_backend + fi + + CT_DoStep INFO "Installing final gcc compiler for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-build-${CT_BUILD}" + + "${build_final_backend}" "${build_final_opts[@]}" + + CT_Popd + CT_EndStep +} + +gcc_movelibs() { + local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count + local gcc_dir dst_dir + local rel + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + # Move only files, directories are for other multilibs. We're looking inside + # GCC's directory structure, thus use unmangled multi_os_dir that GCC reports. + gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir_gcc}" + if [ ! -d "${gcc_dir}" ]; then + # GCC didn't install anything outside of sysroot + return + fi + # Depending on the selected libc, we may or may not have the ${multi_os_dir_gcc} + # created by libc installation. If we do, use it. If we don't, use ${multi_os_dir} + # to avoid creating an otherwise empty directory. + dst_dir="${multi_root}/lib/${multi_os_dir_gcc}" + if [ ! -d "${dst_dir}" ]; then + dst_dir="${multi_root}/lib/${multi_os_dir}" + fi + CT_SanitizeVarDir dst_dir gcc_dir + rel=$( echo "${gcc_dir#${CT_PREFIX_DIR}/}" | sed 's#[^/]\{1,\}#..#g' ) + + ls "${gcc_dir}" | while read f; do + case "${f}" in + *.ld) + # Linker scripts remain in GCC's directory; elf2flt insists on + # finding them there. + continue + ;; + esac + if [ -f "${gcc_dir}/${f}" ]; then + CT_DoExecLog ALL mkdir -p "${dst_dir}" + CT_DoExecLog ALL mv "${gcc_dir}/${f}" "${dst_dir}/${f}" + CT_DoExecLog ALL ln -sf "${rel}/${dst_dir#${CT_PREFIX_DIR}/}/${f}" "${gcc_dir}/${f}" + fi + done +} + +#------------------------------------------------------------------------------ +# Build final gcc to run on host +do_gcc_for_host() { + local -a final_opts + local final_backend + + final_opts+=( "host=${CT_HOST}" ) + final_opts+=( "prefix=${CT_PREFIX_DIR}" ) + final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" ) + final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) + final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) + final_opts+=( "build_step=gcc_host" ) + if [ "${CT_BUILD_MANUALS}" = "y" ]; then + final_opts+=( "build_manuals=yes" ) + fi + if [ "${CT_BARE_METAL}" = "y" ]; then + final_opts+=( "mode=baremetal" ) + final_opts+=( "build_libgcc=yes" ) + final_opts+=( "build_libstdcxx=yes" ) + final_opts+=( "build_libgfortran=yes" ) + if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then + final_opts+=( "build_staticlinked=yes" ) + fi + final_backend=do_gcc_core_backend + else + final_backend=do_gcc_backend + fi + + CT_DoStep INFO "Installing final gcc compiler" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final" + "${final_backend}" "${final_opts[@]}" + CT_Popd + + # GCC installs stuff (including libgcc) into its own /lib dir, + # outside of sysroot, breaking linking with -static-libgcc. + # Fix up by moving the libraries into the sysroot. + if [ "${CT_USE_SYSROOT}" = "y" ]; then + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-movelibs" + CT_IterateMultilibs gcc_movelibs movelibs + CT_Popd + fi + + CT_EndStep +} + +#------------------------------------------------------------------------------ +# Build the final gcc +# Usage: do_gcc_backend param=value [...] +# Parameter : Definition : Type : Default +# host : the host we run onto : tuple : (none) +# prefix : the runtime prefix : dir : (none) +# complibs : the companion libraries prefix : dir : (none) +# cflags : cflags to use : string : (empty) +# ldflags : ldflags to use : string : (empty) +# lang_list : the list of languages to build : string : (empty) +# build_manuals : whether to build manuals or not : bool : no +do_gcc_backend() { + local host + local prefix + local complibs + local lang_list + local cflags + local cflags_for_build + local ldflags + local build_manuals + local -a host_libstdcxx_flags + local -a extra_config + local -a final_LDFLAGS + local tmp + local arg + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + CT_DoLog EXTRA "Configuring final gcc compiler" + + # Enable selected languages + extra_config+=("--enable-languages=${lang_list}") + + for tmp in ARCH ABI CPU TUNE FPU FLOAT; do + eval tmp="\${CT_ARCH_WITH_${tmp}}" + if [ -n "${tmp}" ]; then + extra_config+=("${tmp}") + fi + done + + [ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared") + extra_config+=("--with-pkgversion=${CT_PKGVERSION}") + [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") + + case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in + y) extra_config+=("--enable-sjlj-exceptions");; + m) ;; + "") extra_config+=("--disable-sjlj-exceptions");; + esac + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then + extra_config+=("--enable-__cxa_atexit") + else + extra_config+=("--disable-__cxa_atexit") + fi + + if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" ]; then + extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}") + fi + + if [ "${CT_THREADS}" = "none" ]; then + extra_config+=(--disable-libatomic) + fi + if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then + extra_config+=(--enable-libmudflap) + else + extra_config+=(--disable-libmudflap) + fi + if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then + extra_config+=(--enable-libgomp) + else + extra_config+=(--disable-libgomp) + fi + if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then + extra_config+=(--enable-libssp) + else + extra_config+=(--disable-libssp) + fi + if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then + extra_config+=(--enable-libquadmath) + extra_config+=(--enable-libquadmath-support) + else + extra_config+=(--disable-libquadmath) + extra_config+=(--disable-libquadmath-support) + fi + + if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then + extra_config+=(--enable-libsanitizer) + else + extra_config+=(--disable-libsanitizer) + fi + + if [ "${CT_CC_GCC_HAS_LIBMPX}" = "y" ]; then + if [ "${CT_CC_GCC_LIBMPX}" = "y" ]; then + extra_config+=(--enable-libmpx) + else + extra_config+=(--disable-libmpx) + fi + fi + + final_LDFLAGS+=("${ldflags}") + + # *** WARNING ! *** + # Keep this full if-else-if-elif-fi-fi block in sync + # with the same block in do_gcc_core_backend, above. + if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then + final_LDFLAGS+=("-static") + host_libstdcxx_flags+=("-static-libgcc") + host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++") + host_libstdcxx_flags+=("-lm") + # Companion libraries are build static (eg !shared), so + # the libstdc++ is not pulled automatically, although it + # is needed. Shoe-horn it in our LDFLAGS + # Ditto libm on some Fedora boxen + final_LDFLAGS+=("-lstdc++") + final_LDFLAGS+=("-lm") + else + if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then + # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2 + # build script + # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++, + # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html + host_libstdcxx_flags+=("-static-libgcc") + host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic") + host_libstdcxx_flags+=("-lm") + fi + # When companion libraries are build static (eg !shared), + # the libstdc++ is not pulled automatically, although it + # is needed. Shoe-horn it in our LDFLAGS + # Ditto libm on some Fedora boxen + final_LDFLAGS+=("-lstdc++") + final_LDFLAGS+=("-lm") + fi + + extra_config+=("--with-gmp=${complibs}") + extra_config+=("--with-mpfr=${complibs}") + extra_config+=("--with-mpc=${complibs}") + if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then + if [ "${CT_ISL}" = "y" ]; then + extra_config+=("--with-isl=${complibs}") + fi + if [ "${CT_CLOOG}" = "y" ]; then + extra_config+=("--with-cloog=${complibs}") + fi + else + extra_config+=("--with-isl=no") + extra_config+=("--with-cloog=no") + fi + if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then + extra_config+=("--enable-lto") + else + extra_config+=("--disable-lto") + fi + + if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then + extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}") + fi + + if [ "${CT_THREADS}" = "none" ]; then + extra_config+=("--disable-threads") + else + if [ "${CT_THREADS}" = "win32" ]; then + extra_config+=("--enable-threads=win32") + extra_config+=("--disable-win32-registry") + else + extra_config+=("--enable-threads=posix") + fi + fi + + if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then + extra_config+=("--enable-target-optspace") + fi + if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then + extra_config+=("--disable-libstdcxx-pch") + fi + + case "${CT_CC_GCC_LDBL_128}" in + y) extra_config+=("--with-long-double-128");; + m) ;; + "") extra_config+=("--without-long-double-128");; + esac + + if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then + extra_config+=( --enable-linker-build-id ) + fi + + case "${CT_CC_GCC_LNK_HASH_STYLE}" in + "") ;; + *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );; + esac + + case "${CT_CC_GCC_DEC_FLOATS}" in + "") ;; + *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );; + esac + + if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then + extra_config+=( --enable-plugin ) + else + extra_config+=( --disable-plugin ) + fi + if [ "${CT_CC_GCC_GOLD}" = "y" ]; then + extra_config+=( --enable-gold ) + fi + + case "${CT_ARCH}" in + mips) + case "${CT_CC_GCC_mips_llsc}" in + y) extra_config+=( --with-llsc );; + m) ;; + *) extra_config+=( --without-llsc );; + esac + case "${CT_CC_GCC_mips_synci}" in + y) extra_config+=( --with-synci );; + m) ;; + *) extra_config+=( --without-synci );; + esac + if [ "${CT_CC_GCC_mips_plt}" ]; then + extra_config+=( --with-mips-plt ) + fi + ;; # ARCH is mips + esac + + if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then + extra_config+=("--with-libintl-prefix=${complibs}") + else + extra_config+=("--disable-nls") + fi + + if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then + extra_config+=("--with-system-zlib") + fi + + case "${CT_CC_GCC_CONFIG_TLS}" in + y) extra_config+=("--enable-tls");; + m) ;; + "") extra_config+=("--disable-tls");; + esac + + # Some versions of gcc have a defective --enable-multilib. + # Since that's the default, only pass --disable-multilib. + if [ "${CT_MULTILIB}" != "y" ]; then + extra_config+=("--disable-multilib") + else + extra_config+=("--enable-multiarch") + if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then + extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}") + fi + fi + + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" + + # We may need to modify host/build CFLAGS separately below + cflags_for_build="${cflags}" + + # Clang's default bracket-depth is 256, and building GCC + # requires somewhere between 257 and 512. + if [ "${host}" = "${CT_BUILD}" ]; then + if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then + cflags="$cflags "-fbracket-depth=512 + cflags_for_build="$cflags_for_build "-fbracket-depth=512 + fi + else + # FIXME we currently don't support clang as host compiler, only as build + if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then + cflags_for_build="$cflags_for_build "-fbracket-depth=512 + fi + fi + + CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CFLAGS="${cflags}" \ + CFLAGS_FOR_BUILD="${cflags_for_build}" \ + CXXFLAGS="${cflags}" \ + CXXFLAGS_FOR_BUILD="${cflags_for_build}" \ + LDFLAGS="${final_LDFLAGS[*]}" \ + CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ + CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ + LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ + ${CONFIG_SHELL} \ + "${CT_SRC_DIR}/gcc/configure" \ + --build=${CT_BUILD} \ + --host=${host} \ + --target=${CT_TARGET} \ + --prefix="${prefix}" \ + ${CC_SYSROOT_ARG} \ + "${extra_config[@]}" \ + --with-local-prefix="${CT_SYSROOT_DIR}" \ + --enable-long-long \ + "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" + + if [ "${CT_CANADIAN}" = "y" ]; then + CT_DoLog EXTRA "Building libiberty" + CT_DoExecLog ALL make ${JOBSFLAGS} all-build-libiberty + fi + + CT_DoLog EXTRA "Building final gcc compiler" + CT_DoExecLog ALL make ${JOBSFLAGS} all + + # See the note on issues with parallel 'make install' in GCC above. + CT_DoLog EXTRA "Installing final gcc compiler" + if [ "${CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES}" = "y" ]; then + CT_DoExecLog ALL make install-strip + else + CT_DoExecLog ALL make install + fi + + # Remove the libtool "pseudo-libraries": having them in the installed + # tree makes the libtoolized utilities that are built next assume + # that, for example, libsupc++ is an "accessory library", and not include + # -lsupc++ to the link flags. That breaks ltrace, for example. + CT_DoLog EXTRA "Housekeeping for final gcc compiler" + CT_Pushd "${prefix}" + find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL + CT_Popd + + if [ "${build_manuals}" = "yes" ]; then + CT_DoLog EXTRA "Building the GCC manuals" + CT_DoExecLog ALL make pdf html + CT_DoLog EXTRA "Installing the GCC manuals" + CT_DoExecLog ALL make install-{pdf,html}-gcc + fi + + # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able + # to call the C compiler with the same, somewhat canonical name. + # check whether compiler has an extension + file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )" + [ -z "${file}" ] || ext=".${file##*.}" + if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then + CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" + fi + + cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \ + host="${host}" +} diff --git a/scripts/build/companion_libs/050-zlib.sh b/scripts/build/companion_libs/050-zlib.sh index a3ba638..868bf3d 100644 --- a/scripts/build/companion_libs/050-zlib.sh +++ b/scripts/build/companion_libs/050-zlib.sh @@ -13,14 +13,12 @@ if [ "${CT_ZLIB}" = "y" ]; then # Download zlib do_zlib_get() { - CT_GetFile "zlib-${CT_ZLIB_VERSION}" \ - "http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" + CT_Fetch ZLIB } # Extract zlib do_zlib_extract() { - CT_Extract "zlib-${CT_ZLIB_VERSION}" - CT_Patch "zlib" "${CT_ZLIB_VERSION}" + CT_ExtractPatch ZLIB } # Build zlib for running on build @@ -87,7 +85,7 @@ do_zlib_backend() { # zlib treats mingw host differently and requires using a different # makefile rather than configure+make. It also does not support # out-of-tree building. - cp -av "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/." . + cp -av "${CT_SRC_DIR}/zlib/." . extra_make=( -f win32/Makefile.gcc \ PREFIX="${host}-" \ SHAREDLIB= \ @@ -107,7 +105,7 @@ do_zlib_backend() { LDFLAGS="${ldflags}" \ CHOST="${host}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \ + "${CT_SRC_DIR}/zlib/configure" \ --prefix="${prefix}" \ --static \ "${extra_config[@]}" diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index 0fc5875..272af66 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -13,15 +13,12 @@ if [ "${CT_GMP}" = "y" ]; then # Download GMP do_gmp_get() { - CT_GetFile "gmp-${CT_GMP_VERSION}" \ - https://gmplib.org/download/gmp \ - {http,ftp,https}://ftp.gnu.org/gnu/gmp + CT_Fetch GMP } # Extract GMP do_gmp_extract() { - CT_Extract "gmp-${CT_GMP_VERSION}" - CT_Patch "gmp" "${CT_GMP_VERSION}" + CT_ExtractPatch GMP } # Build GMP for running on build @@ -97,7 +94,7 @@ do_gmp_backend() { CFLAGS="${cflags} -fexceptions" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ + "${CT_SRC_DIR}/gmp/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/110-mpfr.sh b/scripts/build/companion_libs/110-mpfr.sh index 5a89077..b4be3f4 100644 --- a/scripts/build/companion_libs/110-mpfr.sh +++ b/scripts/build/companion_libs/110-mpfr.sh @@ -13,16 +13,14 @@ if [ "${CT_MPFR}" = "y" ]; then # Download MPFR do_mpfr_get() { - CT_GetFile "mpfr-${CT_MPFR_VERSION}" \ - {https,http,ftp}://ftp.gnu.org/gnu/mpfr \ - http://www.mpfr.org/mpfr-${CT_MPFR_VERSION} + CT_Fetch MPFR } # Extract MPFR do_mpfr_extract() { - CT_Extract "mpfr-${CT_MPFR_VERSION}" - CT_Patch "mpfr" "${CT_MPFR_VERSION}" + CT_ExtractPatch MPFR + # TBD is it a problem with 2.4.x? The comment says it is not, yet the code is run # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the # same version number. Unfortunately, some tarballs of MPFR are not # built sanely, and thus ./configure fails on Gentoo. @@ -115,7 +113,7 @@ do_mpfr_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ + "${CT_SRC_DIR}/mpfr/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh index 0b8777b..d96e9ce 100644 --- a/scripts/build/companion_libs/121-isl.sh +++ b/scripts/build/companion_libs/121-isl.sh @@ -13,14 +13,12 @@ if [ "${CT_ISL}" = "y" ]; then # Download ISL do_isl_get() { - CT_GetFile "isl-${CT_ISL_VERSION}" \ - http://isl.gforge.inria.fr + CT_Fetch ISL } # Extract ISL do_isl_extract() { - CT_Extract "isl-${CT_ISL_VERSION}" - CT_Patch "isl" "${CT_ISL_VERSION}" + CT_ExtractPatch ISL } # Build ISL for running on build @@ -100,7 +98,7 @@ do_isl_backend() { CXXFLAGS="${cxxflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/isl-${CT_ISL_VERSION}/configure" \ + "${CT_SRC_DIR}/isl/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/130-cloog.sh b/scripts/build/companion_libs/130-cloog.sh index 6090b27..445d259 100644 --- a/scripts/build/companion_libs/130-cloog.sh +++ b/scripts/build/companion_libs/130-cloog.sh @@ -13,18 +13,12 @@ if [ "${CT_CLOOG}" = "y" ]; then # Download CLooG do_cloog_get() { - CT_GetFile "cloog-${CT_CLOOG_VERSION}" \ - http://www.bastoul.net/cloog/pages/download \ - ftp://gcc.gnu.org/pub/gcc/infrastructure + CT_Fetch CLOOG } # Extract CLooG do_cloog_extract() { - CT_Extract "cloog-${CT_CLOOG_VERSION}" - CT_Patch "cloog" "${CT_CLOOG_VERSION}" - - # Help the autostuff in case it thinks there are things to regenerate... - CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/cloog-${CT_CLOOG_VERSION}/m4" + CT_ExtractPatch CLOOG } # Build CLooG for running on build @@ -98,7 +92,7 @@ do_cloog_backend() { LDFLAGS="${ldflags}" \ LIBS="-lm" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/cloog-${CT_CLOOG_VERSION}/configure" \ + "${CT_SRC_DIR}/cloog/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/140-mpc.sh b/scripts/build/companion_libs/140-mpc.sh index e6efb4f..3136ab4 100644 --- a/scripts/build/companion_libs/140-mpc.sh +++ b/scripts/build/companion_libs/140-mpc.sh @@ -13,15 +13,12 @@ if [ "${CT_MPC}" = "y" ]; then # Download MPC do_mpc_get() { - CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \ - {http,ftp,https}://ftp.gnu.org/gnu/mpc \ - http://www.multiprecision.org/mpc/download + CT_Fetch MPC } # Extract MPC do_mpc_extract() { - CT_Extract "mpc-${CT_MPC_VERSION}" - CT_Patch "mpc" "${CT_MPC_VERSION}" + CT_ExtractPatch MPC } # Build MPC for running on build @@ -87,7 +84,7 @@ do_mpc_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \ + "${CT_SRC_DIR}/mpc/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh index 807ce7e..d1ac0b4 100644 --- a/scripts/build/companion_libs/200-libelf.sh +++ b/scripts/build/companion_libs/200-libelf.sh @@ -9,15 +9,11 @@ do_libelf_for_target() { :; } if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then do_libelf_get() { - # The server hosting libelf will return an "HTTP 300 : Multiple Choices" - # error code if we try to download a file that does not exists there. - # So we have to request the file with an explicit extension. - CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/ + CT_Fetch LIBELF } do_libelf_extract() { - CT_Extract "libelf-${CT_LIBELF_VERSION}" - CT_Patch "libelf" "${CT_LIBELF_VERSION}" + CT_ExtractPatch LIBELF } if [ "${CT_LIBELF}" = "y" ]; then @@ -131,7 +127,7 @@ do_libelf_backend() { CFLAGS="${cflags} -fPIC" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ + "${CT_SRC_DIR}/libelf/configure" \ --build=${CT_BUILD} \ --host=${host} \ --target=${CT_TARGET} \ diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh index 5aa8e31..dcb7208 100644 --- a/scripts/build/companion_libs/210-expat.sh +++ b/scripts/build/companion_libs/210-expat.sh @@ -9,13 +9,11 @@ do_expat_for_target() { :; } if [ "${CT_EXPAT_TARGET}" = "y" -o "${CT_EXPAT}" = "y" ]; then do_expat_get() { - CT_GetFile "expat-${CT_EXPAT_VERSION}" .tar.gz \ - http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION} + CT_Fetch EXPAT } do_expat_extract() { - CT_Extract "expat-${CT_EXPAT_VERSION}" - CT_Patch "expat" "${CT_EXPAT_VERSION}" + CT_ExtractPatch EXPAT } if [ "${CT_EXPAT}" = "y" ]; then @@ -95,7 +93,7 @@ do_expat_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/expat-${CT_EXPAT_VERSION}/configure" \ + "${CT_SRC_DIR}/expat/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh index 7a1379d..815cf4b 100644 --- a/scripts/build/companion_libs/220-ncurses.sh +++ b/scripts/build/companion_libs/220-ncurses.sh @@ -9,15 +9,11 @@ do_ncurses_for_target() { :; } if [ "${CT_NCURSES_TARGET}" = "y" -o "${CT_NCURSES}" = "y" ]; then do_ncurses_get() { - CT_GetFile "ncurses-${CT_NCURSES_VERSION}" .tar.gz \ - {http,ftp,https}://ftp.gnu.org/pub/gnu/ncurses \ - ftp://invisible-island.net/ncurses + CT_Fetch NCURSES } do_ncurses_extract() { - CT_Extract "ncurses-${CT_NCURSES_VERSION}" - CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}" - CT_Patch "ncurses" "${CT_NCURSES_VERSION}" + CT_ExtractPatch NCURSES } # We need tic that runs on the build when building ncurses for host/target @@ -157,7 +153,7 @@ do_ncurses_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \ + "${CT_SRC_DIR}/ncurses/configure" \ --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/320-libiconv.sh b/scripts/build/companion_libs/320-libiconv.sh index f2f0bef..ad571a9 100644 --- a/scripts/build/companion_libs/320-libiconv.sh +++ b/scripts/build/companion_libs/320-libiconv.sh @@ -9,13 +9,11 @@ do_libiconv_for_target() { :; } if [ "${CT_LIBICONV}" = "y" ]; then do_libiconv_get() { - CT_GetFile "libiconv-${CT_LIBICONV_VERSION}" \ - http://ftp.gnu.org/pub/gnu/libiconv/ + CT_Fetch LIBICONV } do_libiconv_extract() { - CT_Extract "libiconv-${CT_LIBICONV_VERSION}" - CT_Patch "libiconv" "${CT_LIBICONV_VERSION}" + CT_ExtractPatch LIBICONV } # Build libiconv for running on build @@ -93,7 +91,7 @@ do_libiconv_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/libiconv-${CT_LIBICONV_VERSION}/configure" \ + "${CT_SRC_DIR}/libiconv/configure" \ --build=${CT_BUILD} \ --host="${host}" \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_libs/330-gettext.sh b/scripts/build/companion_libs/330-gettext.sh index 8828e5d..f3f1497 100644 --- a/scripts/build/companion_libs/330-gettext.sh +++ b/scripts/build/companion_libs/330-gettext.sh @@ -9,13 +9,11 @@ do_gettext_for_target() { :; } if [ "${CT_GETTEXT}" = "y" ]; then do_gettext_get() { - CT_GetFile "gettext-${CT_GETTEXT_VERSION}" \ - http://ftp.gnu.org/pub/gnu/gettext/ + CT_Fetch GETTEXT } do_gettext_extract() { - CT_Extract "gettext-${CT_GETTEXT_VERSION}" - CT_Patch "gettext" "${CT_GETTEXT_VERSION}" + CT_ExtractPatch GETTEXT } # Build gettext for running on build @@ -112,7 +110,7 @@ do_gettext_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/gettext-${CT_GETTEXT_VERSION}/configure" \ + "${CT_SRC_DIR}/gettext/configure" \ --build=${CT_BUILD} \ --host="${host}" \ --prefix="${prefix}" \ diff --git a/scripts/build/companion_tools/050-make.sh b/scripts/build/companion_tools/050-make.sh index 76b24aa..3253f5b 100644 --- a/scripts/build/companion_tools/050-make.sh +++ b/scripts/build/companion_tools/050-make.sh @@ -1,14 +1,11 @@ # Build script for make do_companion_tools_make_get() { - CT_GetFile "make-${CT_MAKE_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/make + CT_Fetch MAKE } do_companion_tools_make_extract() { - CT_Extract "make-${CT_MAKE_VERSION}" - CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}" - CT_Patch "make" "${CT_MAKE_VERSION}" + CT_ExtractPatch MAKE } do_companion_tools_make_for_build() { @@ -61,7 +58,7 @@ do_make_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}/configure" \ + "${CT_SRC_DIR}/make/configure" \ --host="${host}" \ --prefix="${prefix}" \ "${extra_config[@]}" diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh index e0fccd7..1707d64 100644 --- a/scripts/build/companion_tools/100-m4.sh +++ b/scripts/build/companion_tools/100-m4.sh @@ -1,13 +1,11 @@ # Build script for m4 do_companion_tools_m4_get() { - CT_GetFile "m4-${CT_M4_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/m4 + CT_Fetch M4 } do_companion_tools_m4_extract() { - CT_Extract "m4-${CT_M4_VERSION}" - CT_Patch "m4" "${CT_M4_VERSION}" + CT_ExtractPatch M4 } do_companion_tools_m4_for_build() { @@ -58,7 +56,7 @@ do_m4_backend() { CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \ + "${CT_SRC_DIR}/m4/configure" \ --host="${host}" \ --prefix="${prefix}" diff --git a/scripts/build/companion_tools/200-autoconf.sh b/scripts/build/companion_tools/200-autoconf.sh index bccef75..52149ea 100644 --- a/scripts/build/companion_tools/200-autoconf.sh +++ b/scripts/build/companion_tools/200-autoconf.sh @@ -1,14 +1,11 @@ # Build script for autoconf do_companion_tools_autoconf_get() { - CT_GetFile "autoconf-${CT_AUTOCONF_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/autoconf + CT_Fetch AUTOCONF } do_companion_tools_autoconf_extract() { - CT_Extract "autoconf-${CT_AUTOCONF_VERSION}" - CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}" - CT_Patch "autoconf" "${CT_AUTOCONF_VERSION}" + CT_ExtractPatch AUTOCONF } do_companion_tools_autoconf_for_build() { @@ -42,7 +39,7 @@ do_autoconf_backend() { CT_DoLog EXTRA "Configuring autoconf" CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}/configure" \ + "${CT_SRC_DIR}/autoconf/configure" \ --host="${host}" \ --prefix="${prefix}" diff --git a/scripts/build/companion_tools/300-automake.sh b/scripts/build/companion_tools/300-automake.sh index ee76463..2d7eded 100644 --- a/scripts/build/companion_tools/300-automake.sh +++ b/scripts/build/companion_tools/300-automake.sh @@ -1,14 +1,11 @@ # Build script for automake do_companion_tools_automake_get() { - CT_GetFile "automake-${CT_AUTOMAKE_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/automake + CT_Fetch AUTOMAKE } do_companion_tools_automake_extract() { - CT_Extract "automake-${CT_AUTOMAKE_VERSION}" - CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}" - CT_Patch "automake" "${CT_AUTOMAKE_VERSION}" + CT_ExtractPatch AUTOMAKE } do_companion_tools_automake_for_build() { @@ -38,7 +35,7 @@ do_automake_backend() { CT_DoLog EXTRA "Configuring automake" CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}/configure" \ + "${CT_SRC_DIR}/automake/configure" \ --host="${host}" \ --prefix="${prefix}" diff --git a/scripts/build/companion_tools/400-libtool.sh b/scripts/build/companion_tools/400-libtool.sh index 4461207..3733072 100644 --- a/scripts/build/companion_tools/400-libtool.sh +++ b/scripts/build/companion_tools/400-libtool.sh @@ -1,14 +1,11 @@ # Build script for libtool do_companion_tools_libtool_get() { - CT_GetFile "libtool-${CT_LIBTOOL_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/libtool + CT_Fetch LIBTOOL } do_companion_tools_libtool_extract() { - CT_Extract "libtool-${CT_LIBTOOL_VERSION}" - CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}" - CT_Patch "libtool" "${CT_LIBTOOL_VERSION}" + CT_ExtractPatch LIBTOOL } do_companion_tools_libtool_for_build() { @@ -38,7 +35,7 @@ do_libtool_backend() { CT_DoLog EXTRA "Configuring libtool" CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}/configure" \ + "${CT_SRC_DIR}/libtool/configure" \ --host="${host}" \ --prefix="${prefix}" diff --git a/scripts/build/debug/200-duma.sh b/scripts/build/debug/200-duma.sh index 2a9b01f..afaeb02 100644 --- a/scripts/build/debug/200-duma.sh +++ b/scripts/build/debug/200-duma.sh @@ -1,24 +1,12 @@ # Build script for D.U.M.A. do_debug_duma_get() { - local dl_base - - dl_base="http://downloads.sourceforge.net/project/duma/duma" - dl_base+="/${CT_DUMA_VERSION//_/.}" - - # Downloading an non-existing file from sourceforge will give you an - # HTML file containing an error message, instead of returning a 404. - # Sigh... - CT_GetFile "duma_${CT_DUMA_VERSION}" .tar.gz "${dl_base}" - # Downloading from sourceforge may leave garbage, cleanup - CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"* + # TBD need cleanup after sourceforge.net download? + CT_Fetch DUMA } do_debug_duma_extract() { - CT_Extract "duma_${CT_DUMA_VERSION}" - CT_Pushd "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" - CT_Patch nochdir "duma" "${CT_DUMA_VERSION}" - CT_Popd + CT_ExtractPatch DUMA } do_debug_duma_build() { @@ -26,7 +14,7 @@ do_debug_duma_build() { CT_DoStep INFO "Installing D.U.M.A." CT_DoLog EXTRA "Copying sources" - cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}/." "${CT_BUILD_DIR}/build-duma" + cp -a "${CT_SRC_DIR}/duma/." "${CT_BUILD_DIR}/build-duma" CT_Pushd "${CT_BUILD_DIR}/build-duma" make_args=( diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index e5276d0..cdc7047 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -1,40 +1,18 @@ # Build script for the gdb debug facility do_debug_gdb_get() { - local linaro_version="" - local linaro_series="" - - if [ "${CT_GDB_CUSTOM}" = "y" ]; then - CT_GetCustom "gdb" "${CT_GDB_CUSTOM_VERSION}" \ - "${CT_GDB_CUSTOM_LOCATION}" - else - case "${CT_GDB_VERSION}" in - linaro-*) - CT_GetLinaro "gdb" "${CT_GDB_VERSION}" - ;; - *) - CT_GetFile "gdb-${CT_GDB_VERSION}" \ - http://mirrors.kernel.org/sourceware/gdb \ - {http,ftp,https}://ftp.gnu.org/pub/gnu/gdb \ - ftp://{sourceware.org,gcc.gnu.org}/pub/gdb/releases - ;; - esac - fi + CT_Fetch GDB } do_debug_gdb_extract() { - CT_Extract "gdb-${CT_GDB_VERSION}" - CT_Patch "gdb" "${CT_GDB_VERSION}" - - if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then - CT_ConfigureXtensa "gdb" "${CT_GDB_VERSION}" - fi + # TBD xtensa overlays + CT_ExtractPatch GDB } do_debug_gdb_build() { local -a extra_config - gdb_src_dir="${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}" + gdb_src_dir="${CT_SRC_DIR}/gdb" # Version 6.3 and below behave badly with gdbmi case "${CT_GDB_VERSION}" in @@ -174,11 +152,12 @@ do_debug_gdb_build() { if [ "${CT_GDB_INSTALL_GDBINIT}" = "y" ]; then CT_DoLog EXTRA "Installing '.gdbinit' template" # See in scripts/build/internals.sh for why we do this - if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then - gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ) + # TBD GCC 3.x and older not supported + if [ -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then + gcc_version=$( cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ) else gcc_version=$(sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ - "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/version.c" \ + "${CT_SRC_DIR}/gcc/gcc/version.c" \ ) fi sed -r \ diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh index 6b860e9..ce299c2 100644 --- a/scripts/build/debug/400-ltrace.sh +++ b/scripts/build/debug/400-ltrace.sh @@ -1,19 +1,11 @@ # Build script for ltrace do_debug_ltrace_get() { - CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" .tar.gz \ - {http,ftp}://ftp.debian.org/debian/pool/main/l/ltrace/ - # Create a link so that the following steps are easier to do: - CT_Pushd "${CT_TARBALLS_DIR}" - ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig") - ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" \ - "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}" - CT_Popd + CT_Fetch LTRACE } do_debug_ltrace_extract() { - CT_Extract "ltrace-${CT_LTRACE_VERSION}" - CT_Patch "ltrace" "${CT_LTRACE_VERSION}" + CT_ExtractPatch LTRACE } do_debug_ltrace_build() { @@ -22,7 +14,7 @@ do_debug_ltrace_build() { CT_DoStep INFO "Installing ltrace" CT_DoLog EXTRA "Copying sources to build dir" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/." \ + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace/." \ "${CT_BUILD_DIR}/build-ltrace" CT_Pushd "${CT_BUILD_DIR}/build-ltrace" @@ -63,4 +55,3 @@ do_debug_ltrace_build() { CT_Popd CT_EndStep } - diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh index 6eb2357..cb4643a 100644 --- a/scripts/build/debug/500-strace.sh +++ b/scripts/build/debug/500-strace.sh @@ -1,15 +1,11 @@ # Build script for strace do_debug_strace_get() { - local base_url="http://downloads.sourceforge.net/project/strace/strace" - CT_GetFile "strace-${CT_STRACE_VERSION}" "${base_url}/${CT_STRACE_VERSION}" - # Downloading from sourceforge leaves garbage, cleanup - CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"* + CT_Fetch STRACE } do_debug_strace_extract() { - CT_Extract "strace-${CT_STRACE_VERSION}" - CT_Patch "strace" "${CT_STRACE_VERSION}" + CT_ExtractPatch STRACE } do_debug_strace_build() { @@ -23,7 +19,7 @@ do_debug_strace_build() { CPP="${CT_TARGET}-cpp" \ LD="${CT_TARGET}-ld" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \ + "${CT_SRC_DIR}/strace/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ --prefix=/usr diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index db9b1fd..07029d0 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -70,17 +70,18 @@ do_finish() { "${CT_TARGET}/debug-root/usr/bin/gdbserver${exe_suffix}" fi if [ "${CT_CC_gcc}" = "y" ]; then - # We can not use the version in CT_CC_GCC_VERSION because + # TBD GCC 3.x/2.x is no longer supported by ctng + # We can not use the version in CT_GCC_VERSION because # of the Linaro stuff. So, harvest the version string # directly from the gcc sources... # All gcc 4.x seem to have the version in gcc/BASE-VER # while version prior to 4.x have the version in gcc/version.c # Of course, here is not the better place to do that... - if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then - gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ) + if [ -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then + gcc_version=$( cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ) else gcc_version=$(sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ - "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/version.c" \ + "${CT_SRC_DIR}/gcc/gcc/version.c" \ ) fi for _t in "bin/${CT_TARGET}-"* \ diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh index cd4a456..0f04d64 100644 --- a/scripts/build/kernel/linux.sh +++ b/scripts/build/kernel/linux.sh @@ -19,58 +19,12 @@ CT_DoKernelTupleValues() { # Download the kernel do_kernel_get() { - local k_ver - local custom_name - local rel_dir - local korg_base mirror_base - - if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then - CT_GetCustom "linux" "${CT_KERNEL_LINUX_CUSTOM_VERSION}" \ - "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" - else # Not a custom tarball - case "${CT_KERNEL_VERSION}" in - 2.6.*.*|3.*.*|4.*.*) - # 4-part versions (for 2.6 stables and long-terms), and - # 3-part versions (for 3.x.y and 4.x.y stables and long-terms) - # we need to trash the last digit - k_ver="${CT_KERNEL_VERSION%.*}" - ;; - 2.6.*|3.*|4.*) - # 3-part version (for 2.6.x initial releases), and 2-part - # versions (for 3.x and 4.x initial releases), use all of it - k_ver="${CT_KERNEL_VERSION}" - ;; - esac - case "${CT_KERNEL_VERSION}" in - 2.6.*) rel_dir=v2.6;; - 3.*) rel_dir=v3.x;; - 4.*) rel_dir=v4.x;; - esac - korg_base="http://www.kernel.org/pub/linux/kernel/${rel_dir}" - CT_GetFile "linux-${CT_KERNEL_VERSION}" \ - "${korg_base}" \ - "${korg_base}/longterm/v${k_ver}" \ - "${korg_base}/longterm" - fi + CT_Fetch LINUX } # Extract kernel do_kernel_extract() { - # If using a custom directory location, nothing to do - if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then - return 0 - fi - - # Otherwise, we're using either a mainstream tarball, or a custom - # tarball; in either case, we need to extract - CT_Extract "linux-${CT_KERNEL_VERSION}" - - # If using a custom tarball, no need to patch - if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then - return 0 - fi - CT_Patch "linux" "${CT_KERNEL_VERSION}" + CT_ExtractPatch LINUX # Disable building relocs application - it needs # on the host, which may not be present on Cygwin or MacOS; it @@ -79,7 +33,8 @@ do_kernel_extract() { # This is not done as a patch, since it varies from Linux version # to version - patching each particular Linux version would be # too cumbersome. - CT_Pushd "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" + # TBD should happen before marking the sources as "patched"? + CT_Pushd "${CT_SRC_DIR}/linux" sed -i -r 's/(\$\(MAKE\) .* relocs)$/:/' arch/*/Makefile CT_Popd } @@ -93,7 +48,7 @@ do_kernel_headers() { mkdir -p "${CT_BUILD_DIR}/build-kernel-headers" - kernel_path="${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" + kernel_path="${CT_SRC_DIR}/linux" V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}" kernel_arch="${CT_ARCH}" diff --git a/scripts/build/libc/avr-libc.sh b/scripts/build/libc/avr-libc.sh index f94b601..7003f38 100644 --- a/scripts/build/libc/avr-libc.sh +++ b/scripts/build/libc/avr-libc.sh @@ -1,33 +1,11 @@ # This file adds functions to build the avr-libc C library do_libc_get() { - local libc_src - - libc_src="http://download.savannah.gnu.org/releases/avr-libc" - - if [ "${CT_LIBC_AVR_LIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "avr-libc" "${CT_LIBC_AVR_LIBC_CUSTOM_VERSION}" \ - "${CT_LIBC_AVR_LIBC_CUSTOM_LOCATION}" - else # ! custom location - CT_GetFile "avr-libc-${CT_LIBC_VERSION}" "${libc_src}" - fi # ! custom location + CT_Fetch AVR_LIBC } do_libc_extract() { - CT_Extract "avr-libc-${CT_LIBC_VERSION}" - CT_Patch "avr-libc" "${CT_LIBC_VERSION}" -} - -do_libc_configure() { - CT_DoLog EXTRA "Configuring C library" - - CT_DoExecLog CFG \ - ${CONFIG_SHELL} \ - ./configure \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=${CT_PREFIX_DIR} \ - "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}" + CT_ExtractPatch AVR_LIBC } do_libc_start_files() { @@ -42,11 +20,19 @@ do_libc_post_cc() { CT_DoStep INFO "Installing C library" CT_DoLog EXTRA "Copying sources to build directory" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc-${CT_LIBC_VERSION}/." \ + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc/." \ "${CT_BUILD_DIR}/build-libc-post-cc" cd "${CT_BUILD_DIR}/build-libc-post-cc" - do_libc_configure + CT_DoLog EXTRA "Configuring C library" + + CT_DoExecLog CFG \ + ${CONFIG_SHELL} \ + ./configure \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=${CT_PREFIX_DIR} \ + "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}" CT_DoLog EXTRA "Building C library" CT_DoExecLog ALL make ${JOBSFLAGS} diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh index 4ce5d8f..a52078d 100644 --- a/scripts/build/libc/bionic.sh +++ b/scripts/build/libc/bionic.sh @@ -3,25 +3,17 @@ # Licensed under the GPL v2. See COPYING in the root of this package do_libc_get() { - if [ "${CT_LIBC_BIONIC_CUSTOM}" = "y" ]; then - CT_GetCustom "bionic" "${CT_LIBC_BIONIC_CUSTOM_VERSION}" \ - "${CT_LIBC_BIONIC_CUSTOM_LOCATION}" - else # ! custom location - CT_GetFile "android-ndk-${CT_LIBC_VERSION}-linux-x86_64.zip" https://dl.google.com/android/repository - fi # ! custom location + CT_Fetch BIONIC } do_libc_extract() { - CT_Extract "android-ndk-${CT_LIBC_VERSION}-linux-x86_64" - CT_Pushd "${CT_SRC_DIR}/android-ndk-${CT_LIBC_VERSION}/" - CT_Patch nochdir bionic "${CT_LIBC_VERSION}" - CT_Popd + CT_ExtractPatch BIONIC } # Install Unified headers do_libc_start_files() { CT_DoStep INFO "Installing C library headers" - CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk-${CT_LIBC_VERSION}/sysroot/usr" "${CT_SYSROOT_DIR}" + CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/bionic/sysroot/usr" "${CT_SYSROOT_DIR}" } do_libc() { @@ -33,7 +25,7 @@ do_libc() { 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}" + CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/bionic/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}" CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}" } diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index e8f0445..5862759 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -7,102 +7,22 @@ do_libc_get() { local version local -a addons_list - addons_list=($(do_libc_add_ons_list " ")) - - # Main source - if [ "${CT_GLIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "glibc" "${CT_GLIBC_CUSTOM_VERSION}" \ - "${CT_GLIBC_CUSTOM_LOCATION}" - else - case "${CT_LIBC_VERSION}" in - linaro-*) - CT_GetLinaro "glibc" "${CT_LIBC_VERSION}" - ;; - *) - CT_GetFile "glibc-${CT_LIBC_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/glibc \ - ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots} - ;; - esac + CT_Fetch GLIBC + if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then + CT_Fetch GLIBC_PORTS fi - - # C library addons - for addon in "${addons_list[@]}"; do - # Never ever try to download these add-ons, - # they've always been internal - case "${addon}" in - nptl) continue;; - esac - - case "${addon}:${CT_GLIBC_PORTS_EXTERNAL}" in - ports:y) ;; - ports:*) continue;; - esac - - if ! CT_GetFile "glibc-${addon}-${CT_LIBC_VERSION}" \ - http://mirrors.kernel.org/sourceware/glibc \ - {http,ftp,https}://ftp.gnu.org/gnu/glibc \ - ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots} - then - # Some add-ons are bundled with glibc, others are - # bundled in their own tarball. Eg. NPTL is internal, - # while LinuxThreads was external. Also, for old - # versions of glibc, the libidn add-on was external, - # but with version >=2.10, it is internal. - CT_DoLog DEBUG "Addon '${addon}' could not be downloaded." - CT_DoLog DEBUG "We'll see later if we can find it in the source tree" - fi - done - return 0 } do_libc_extract() { local addon - CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}" - CT_Pushd "${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}" - # Custom glibc won't get patched, because CT_GetCustom - # marks custom glibc as patched. - CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}" - - for addon in $(do_libc_add_ons_list " "); do - # If the addon was bundled with the main archive, we do not - # need to extract it. Worse, if we were to try to extract - # it, we'd get an error. - if [ -d "${addon}" ]; then - CT_DoLog DEBUG "Add-on '${addon}' already present, skipping extraction" - continue - fi - - CT_Extract nochdir "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - - CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \ - -d "${addon}" -a -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - - # Some addons have the 'long' name, while others have the - # 'short' name, but patches are non-uniformly built with - # either the 'long' or 'short' name, whatever the addons name - # but we prefer the 'short' name and avoid duplicates. - if [ -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" ]; then - CT_DoExecLog FILE mv "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" "${addon}" - fi - - CT_DoExecLog FILE ln -s "${addon}" "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - - CT_Patch nochdir "${CT_LIBC}" "${addon}-${CT_LIBC_VERSION}" - - # Remove the long name since it can confuse configure scripts to run - # the same source twice. - rm "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - done - - # The configure files may be older than the configure.in files - # if using a snapshot (or even some tarballs). Fake them being - # up to date. - find . -type f -name configure -exec touch {} \; 2>&1 |CT_DoLog ALL - - CT_Popd + CT_ExtrachPatch GLIBC + if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then + CT_Fetch GLIBC_PORTS + fi + # TBD make patches for addons (ports? anything else?) uniformly using short names + # TBD make the configure timestamp fix in all patched packages (e.g. part of CT_ExtractPatch) } # Build and install headers and start files @@ -161,7 +81,7 @@ do_libc_backend_once() { local multi_flags multi_dir multi_os_dir multi_root multi_index multi_count multi_target local build_cflags build_cppflags build_ldflags local startfiles_dir - local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}" + local src_dir="${CT_SRC_DIR}/glibc" local -a extra_config local -a extra_make_args local glibc_cflags @@ -390,7 +310,7 @@ do_libc_backend_once() { # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html mkdir -p "${CT_HEADERS_DIR}/gnu" CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h" - CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/include/features.h" \ + CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc/include/features.h" \ "${CT_HEADERS_DIR}/features.h" # Building the bootstrap gcc requires either setting inhibit_libc, or @@ -486,18 +406,18 @@ 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_GLIBC_ADDONS_LIST}" \ - |sed -r -e "s/[[:space:],]/${sep}/g;" \ - )" - if [ "${GLIBC_HAS_NPTL_ADDON}" = "y" ]; then - case "${CT_THREADS}" in - none) ;; - *) addons_list="${addons_list}${sep}${CT_THREADS}";; - esac + local addons_list + + if [ "${CT_GLIBC_USE_PORTS_ADDON}" = "y" ]; then + addons_list="${addons_list}${sep}ports" + fi + if [ "${CT_GLIBC_USE_NPTL_ADDON}" = "y" ]; then + addons_list="${addons_list}${sep}nptl" + fi + if [ "${CT_GLIBC_USE_LIBIDN_ADDON}" = "y" ]; then + addons_list="${addons_list}${sep}libidn" fi - [ "${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}\$//;" + echo "${addons_list#${sep}}" # Remove leading separator if any } # Compute up the minimum supported Linux kernel version @@ -507,6 +427,7 @@ do_libc_min_kernel_config() { case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in *--enable-kernel*) ;; *) if [ "${CT_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then + # TBD do we support that currently? We always seem to install kernel headers # 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 @@ -536,7 +457,7 @@ do_libc_min_kernel_config() { # Build and install the libc locales do_libc_locales() { - local src_dir="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}" + local src_dir="${CT_SRC_DIR}/glibc" local -a extra_config local glibc_cflags diff --git a/scripts/build/libc/mingw.sh b/scripts/build/libc/mingw.sh index 1471785..295b313 100644 --- a/scripts/build/libc/mingw.sh +++ b/scripts/build/libc/mingw.sh @@ -1,29 +1,17 @@ # Copyright 2012 Yann Diorcet # Licensed under the GPL v2. See COPYING in the root of this package -CT_WINAPI_VERSION_DOWNLOADED= - do_libc_get() { - if [ "${CT_WINAPI_VERSION}" = "devel" ]; then - CT_GetGit "mingw-w64" "ref=HEAD" "git://git.code.sf.net/p/mingw-w64/mingw-w64" CT_WINAPI_VERSION_DOWNLOADED - CT_DoLog DEBUG "Fetched mingw-w64 as ${CT_WINAPI_VERSION_DOWNLOADED}" - else - CT_GetFile "mingw-w64-v${CT_WINAPI_VERSION}" \ - http://downloads.sourceforge.net/sourceforge/mingw-w64 - CT_WINAPI_VERSION_DOWNLOADED=v${CT_WINAPI_VERSION} - fi + CT_Fetch MINGW_W64 } do_libc_extract() { - CT_Extract "mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}" - CT_Pushd "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/" - CT_Patch nochdir mingw-w64 "${CT_WINAPI_VERSION_DOWNLOADED}" - CT_Popd + CT_ExtractPatch MINGW_W64 } do_set_mingw_install_prefix(){ MINGW_INSTALL_PREFIX=/usr/${CT_TARGET} - if [[ ${CT_WINAPI_VERSION} == 2* ]]; then + if [[ ${CT_MINGW_W64_VERSION} == 2* ]]; then MINGW_INSTALL_PREFIX=/usr fi } @@ -51,7 +39,7 @@ do_libc_start_files() { do_set_mingw_install_prefix CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-headers/configure" \ + "${CT_SRC_DIR}/mingw-w64/mingw-w64-headers/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ --prefix=${MINGW_INSTALL_PREFIX} \ @@ -75,9 +63,9 @@ do_libc_start_files() { do_check_mingw_vendor_tuple() { - if [[ ${CT_WINAPI_VERSION} == 4* ]]; then - CT_DoStep INFO "Checking vendor tuple configured in crosstool-ng .config" - if [[ ${CT_TARGET_VENDOR} == w64 ]]; then + if [ "${CT_MINGW_W64_VERSION%%.*}" -ge 4 ]; then + CT_DoStep INFO "Checking configured vendor tuple" + if [ ${CT_TARGET_VENDOR} == w64 ]; then CT_DoLog EXTRA "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers." else CT_DoLog WARN "The tuple vendor is '${CT_TARGET_VENDOR}', not equal to 'w64' and might break the toolchain!" @@ -92,7 +80,7 @@ do_mingw_tools() for f in "${CT_MINGW_TOOL_LIST_ARRAY[@]}"; do CT_mkdir_pushd "${f}" - if [ ! -d "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-tools/${f}" ]; then + if [ ! -d "${CT_SRC_DIR}/mingw-w64/mingw-w64-tools/${f}" ]; then CT_DoLog WARN "Skipping ${f}: not found" CT_Popd continue @@ -101,7 +89,7 @@ do_mingw_tools() CT_DoLog EXTRA "Configuring ${f}" CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-tools/${f}/configure" \ + "${CT_SRC_DIR}/mingw-w64/mingw-w64-tools/${f}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ --target=${CT_TARGET} \ @@ -159,7 +147,7 @@ do_mingw_pthreads() RCFLAGS="${rcflags}" \ DLLTOOLFLAGS="${dlltoolflags}" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-libraries/winpthreads/configure" \ + "${CT_SRC_DIR}/mingw-w64/mingw-w64-libraries/winpthreads/configure" \ --with-sysroot=${CT_SYSROOT_DIR} \ --prefix=${MINGW_INSTALL_PREFIX} \ --libdir=${libprefix} \ @@ -189,7 +177,7 @@ do_libc() do_set_mingw_install_prefix CT_DoExecLog CFG \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-crt/configure" \ + "${CT_SRC_DIR}/mingw-w64/mingw-w64-crt/configure" \ --with-sysroot=${CT_SYSROOT_DIR} \ --prefix=${MINGW_INSTALL_PREFIX} \ --build=${CT_BUILD} \ diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh index 5a53fd0..430fb8d 100644 --- a/scripts/build/libc/musl.sh +++ b/scripts/build/libc/musl.sh @@ -3,17 +3,11 @@ # Licensed under the GPL v2. See COPYING in the root of this package do_libc_get() { - if [ "${CT_LIBC_MUSL_CUSTOM}" = "y" ]; then - CT_GetCustom "musl" "${CT_LIBC_MUSL_CUSTOM_VERSION}" \ - "${CT_LIBC_MUSL_CUSTOM_LOCATION}" - else # ! custom location - CT_GetFile "musl-${CT_LIBC_VERSION}" http://www.musl-libc.org/releases - fi # ! custom location + CT_Fetch MUSL } do_libc_extract() { - CT_Extract "musl-${CT_LIBC_VERSION}" - CT_Patch "musl" "${CT_LIBC_VERSION}" + CT_ExtractPatch MUSL } # Build and install headers and start files @@ -62,7 +56,7 @@ do_libc_backend_once() { local libc_mode local -a extra_cflags local -a extra_config - local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}" + local src_dir="${CT_SRC_DIR}/musl" local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count local multilib_dir local hdr_install_subdir @@ -83,7 +77,7 @@ do_libc_backend_once() { # From buildroot: # gcc constant folding bug with weak aliases workaround # See http://www.openwall.com/lists/musl/2014/05/15/1 - if [ "${CT_CC_GCC_4_9_or_later}" = "y" ]; then + if [ "${CT_GCC_BUG_61144}" = "y" ]; then extra_cflags+=("-fno-toplevel-reorder") fi diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 3b48507..ff0f45b 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -6,44 +6,21 @@ # do_libc_get() { - local libc_src="{http://mirrors.kernel.org/sourceware/newlib, - ftp://sourceware.org/pub/newlib}" - - if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then - CT_GetCustom "newlib" "${CT_LIBC_NEWLIB_CUSTOM_VERSION}" \ - "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" - else # ! custom location - case "${CT_LIBC_VERSION}" in - linaro-*) - CT_GetLinaro "newlib" "${CT_LIBC_VERSION}" - ;; - *) - # kernel.org mirror is outdated, keep last as a fallback - CT_GetFile "newlib-${CT_LIBC_VERSION}" \ - ftp://sourceware.org/pub/newlib \ - http://mirrors.kernel.org/sourceware/newlib \ - http://mirrors.kernel.org/sources.redhat.com/newlib - ;; - esac - fi # ! custom location + CT_Fetch NEWLIB } do_libc_extract() { - CT_Extract "newlib-${CT_LIBC_VERSION}" - CT_Patch "newlib" "${CT_LIBC_VERSION}" - - if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then - CT_ConfigureXtensa "newlib" "${CT_LIBC_VERSION}" - fi + # TBD xtensa overlays + CT_ExtractPatch NEWLIB } do_libc_start_files() { CT_DoStep INFO "Installing C library headers & start files" - CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." \ + CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib/newlib/libc/include/." \ "${CT_HEADERS_DIR}" if [ "${CT_ARCH_xtensa}" = "y" ]; then CT_DoLog EXTRA "Installing Xtensa headers" - CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/sys/xtensa/include/." \ + CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/newlib/newlib/libc/sys/xtensa/include/." \ "${CT_HEADERS_DIR}" fi CT_EndStep @@ -131,7 +108,7 @@ ENABLE_TARGET_OPTSPACE:target-optspace AR_FOR_TARGET="`which ${CT_TARGET}-gcc-ar`" \ RANLIB_FOR_TARGET="`which ${CT_TARGET}-gcc-ranlib`" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/configure" \ + "${CT_SRC_DIR}/newlib/configure" \ --host=${CT_BUILD} \ --target=${CT_TARGET} \ --prefix=${CT_PREFIX_DIR} \ diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index a730a1d..e428349 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -7,48 +7,24 @@ uclibc_locales_version=030818 uclibc_locale_tarball="uClibc-locale-${uclibc_locales_version}" -if [ "${CT_LIBC_UCLIBC_NG}" = "y" ]; then +if [ "${CT_UCLIBC_NG_USE_UCLIBC_NG_ORG}" = "y" ]; then + # TBD make the name come from config/versions/uclibc.in uclibc_name="uClibc-ng" - libc_src="http://downloads.uclibc-ng.org/releases/${CT_LIBC_VERSION}" -else +elif [ "${CT_UCLIBC_NG_USE_UCLIBC_ORG}" = "y" ]; then uclibc_name="uClibc" - libc_src="http://www.uclibc.org/downloads - http://www.uclibc.org/downloads/old-releases" fi # Download uClibc do_libc_get() { - if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "${uclibc_name}" "${CT_LIBC_UCLIBC_CUSTOM_VERSION}" \ - "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}" - else - CT_GetFile "${uclibc_name}-${CT_LIBC_VERSION}" ${libc_src} - fi - # uClibc locales - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then - CT_GetFile "${uclibc_locale_tarball}" ${libc_src} - fi - - return 0 + # TBD allow for "default fork" selection in package.desc and select uClibc-NG (and then use just UCLIBC moniker) + CT_Fetch UCLIBC_NG + # TBD locales } # Extract uClibc do_libc_extract() { - CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}" - CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}" - - # uClibc locales - # Extracting pregen locales ourselves is kinda - # broken, so just link it in place... - if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" \ - -a ! -f "${CT_SRC_DIR}/.${uclibc_locale_tarball}.extracted" ]; then - CT_Pushd "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/extra/locale" - CT_DoExecLog ALL ln -s "${CT_TARBALLS_DIR}/${uclibc_locale_tarball}.tgz" . - CT_Popd - touch "${CT_SRC_DIR}/.${uclibc_locale_tarball}.extracted" - fi - - return 0 + CT_ExtractPatch UCLIBC_NG + # TBD locales } # Build and install headers and start files @@ -102,7 +78,7 @@ do_libc_backend_once() { # Simply copy files until uClibc has the ability to build out-of-tree CT_DoLog EXTRA "Copying sources to build dir" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/." . + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}/." . multilib_dir="lib/${multi_os_dir}" startfiles_dir="${multi_root}/usr/${multilib_dir}" diff --git a/scripts/build/test_suite/gcc.sh b/scripts/build/test_suite/gcc.sh index c829a43..6c6e5a7 100644 --- a/scripts/build/test_suite/gcc.sh +++ b/scripts/build/test_suite/gcc.sh @@ -18,7 +18,7 @@ do_test_suite_gcc_build() { CT_DoExecLog ALL cp -av "${CT_LIB_DIR}/contrib/gcc-test-suite/default.cfg" \ "${CT_LIB_DIR}/contrib/gcc-test-suite/Makefile" \ "${CT_LIB_DIR}/contrib/gcc-test-suite/README" \ - "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/testsuite" \ + "${CT_SRC_DIR}/gcc/gcc/testsuite" \ "${CT_TEST_SUITE_DIR}/gcc" CT_DoExecLog ALL sed -i -r -e "s/@@DG_TARGET@@/${CT_TARGET}/g;" \ diff --git a/scripts/functions b/scripts/functions index 972403f..50802dd 100644 --- a/scripts/functions +++ b/scripts/functions @@ -869,40 +869,6 @@ CT_GetFile() { return 1 } -# Get a component from Linaro archives. -# Usage: CT_GetLinaro -CT_GetLinaro() { - local comp="$1" - local version="$2" - local linaro_version - local yyyymm_p - local yymm - local base - - case "${version}" in - linaro-*) - linaro_version="${version#linaro-}" - ;; - *) - CT_Abort "Version ${version} is not a Linaro package" - ;; - esac - - # Recent releases reside in top of the directory tree; older releases - # are moved into the archive. Subdirectories are named differently - # in archive! - # In archive, some URLs also contain base component version - # (e.g. "gcc-linaro/4.9") while some do not (e.g. just "newlib-linaro"). - base="${linaro_version%%-*}" - # Strip base version, first two digits of the year and optional patchlevel - yymm="${linaro_version#*-??}" - yymm="${yymm%-*}" - CT_GetFile "${comp}-${version}" \ - "https://releases.linaro.org/components/toolchain/${comp}-linaro/${linaro_version}" \ - "https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro/${base}" \ - "https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro" -} - # Checkout from CVS, and build the associated tarball # The tarball will be called ${basename}.tar.bz2 # Prerequisite: either the server does not require password, @@ -1914,3 +1880,59 @@ CT_MultilibFixupLDSO() CT_Popd CT_EndStep } + +# List the download mirrors. Usage: +# CT_Mirrors ORGANIZATION PROJECT +CT_Mirrors() +{ + local org="${1}" + local project="${2}" + + case "${org}" in + GNU) + echo "https://ftpmirror.gnu.org/gnu/${project}" + echo "http://ftpmirror.gnu.org/gnu/${project}" + echo "https://ftp.gnu.org/gnu/${project}" + echo "http://ftp.gnu.org/gnu/${project}" + echo "ftp://ftp.gnu.org/gnu/${project}" + ;; + sourceware) + local subdir="${3:+/${3}}" + echo "ftp://sourceware.org/pub/${project}/releases${subdir}" + echo "http://mirrors.kernel.org/sourceware/${project}/releases${subdir}" + echo "http://gcc.gnu.org/pub/${project}/releases${subdir}" + ;; + Linaro) + local version="${3}" + base yymm + base="${version%%-*}" + yymm="${version##*-??}" + echo "https://releases.linaro.org/components/toolchain/${comp}-linaro/${version}" + echo "https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro/${base}" + echo "https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro" + ;; + linux) + local version="${3}" + case "${version}" in + [34].*) + echo "http://www.kernel.org/pub/linux/kernel/v${version%%.*}.x" + ;; + 2.6.*) + echo "http://www.kernel.org/pub/linux/kernel/v2.6" + case "${version}" in + 2.6.*.*) + echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm" + echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v${version%.*}" + ;; + esac + ;; + *) + CT_Abort "Unsupported Linux kernel version" + ;; + esac + ;; + *) + CT_Abort "Unknown mirror '${org}'" + ;; + esac +} diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index d9d999c..2c666db 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -72,8 +72,8 @@ fi # Save the uClibc .config file if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then # We save the file, and then point the saved sample to this file - CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config" - "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \ + CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_UCLIBC_NG_VERSION}.config" + "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_UCLIBC_NG_VERSION}.config"|;' \ .defconfig else # remove any dangling files diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh index 1e5d50b..b11a8d6 100644 --- a/scripts/showSamples.sh +++ b/scripts/showSamples.sh @@ -20,16 +20,30 @@ dump_single_sample() { [ "$1" = "-v" ] && verbose=1 && shift [ "$1" = "-w" ] && wiki=1 && shift local sample="$1" + # TBD use CT_LoadConfig . $(pwd)/.config.sample # libc needs some love + # TBD after conversion of gen-kconfig to template, use CT_LIBC_USE as a selector for other variables + # (i.e. whether to use CT_GLIBC_VERSION or CT_MUSL_VERSION) local libc_name="${CT_LIBC}" - local libc_ver="${CT_LIBC_VERSION}" - if [ "${CT_LIBC}" = "uClibc" -a "${CT_LIBC_UCLIBC_NG}" = "y" ]; then - libc_name="uClibc-ng" - elif [ "${CT_LIBC}" = "mingw" ]; then - libc_ver="${CT_WINAPI_VERSION}" - fi + local libc_ver ksym + + ksym=${libc_name//[^0-9A-Za-z_]/_} + ksym=${ksym^^} + case ${ksym} in + GLIBC|NEWLIB) + if eval "[ \"\${CT_${ksym}_USE_LINARO}\" = y ]"; then + ksym="${ksym}_LINARO" + fi + ;; + UCLIBC) + if [ "${UCLIBC_NG_USE_UCLIBC_NG_ORG}" = y ]; then + ksym="${ksym}_NG" + fi + ;; + esac + eval "libc_ver=\"\${CT_${ksym}_VERSION}\"" case "${sample}" in current) @@ -63,7 +77,8 @@ dump_single_sample() { printf " %-*s : %s\n" ${width} "Host" "${CT_HOST}" ;; esac - printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}" + # TBD currently only Linux is used. General handling for single-select (compiler/binutils/libc/os) and multi-select (debug/companions) components? + printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_LINUX_VERSION:+-}${CT_LINUX_VERSION}" if [ -n "${CT_GMP}" \ -o -n "${CT_MPFR}" \ -o -n "${CT_ISL}" \ @@ -139,7 +154,7 @@ dump_single_sample() { if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then printf " //custom// " else - printf " ${CT_KERNEL_VERSION} " + printf " ${CT_LINUX_VERSION} " fi fi printf "| ${CT_BINUTILS_VERSION} " -- cgit v0.10.2-6-g49f6