diff options
Diffstat (limited to 'multilib-testing')
-rw-r--r-- | multilib-testing/gcc-multilib/PKGBUILD | 13 | ||||
-rw-r--r-- | multilib-testing/lib32-glibc/PKGBUILD | 17 | ||||
-rw-r--r-- | multilib-testing/lib32-glibc/glibc-2.15-confstr-local-buffer-extent.patch | 297 | ||||
-rw-r--r-- | multilib-testing/lib32-glibc/glibc-__i686.patch | 44 |
4 files changed, 347 insertions, 24 deletions
diff --git a/multilib-testing/gcc-multilib/PKGBUILD b/multilib-testing/gcc-multilib/PKGBUILD index adb5fbe05..b6ae4e2ea 100644 --- a/multilib-testing/gcc-multilib/PKGBUILD +++ b/multilib-testing/gcc-multilib/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 68430 2012-03-24 13:40:21Z heftig $ +# $Id: PKGBUILD 68618 2012-03-29 21:59:22Z heftig $ # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> # Contributor: Allan McRae <allan@archlinux.org> @@ -8,8 +8,8 @@ pkgbase='gcc-multilib' pkgname=('gcc-multilib' 'gcc-libs-multilib' 'lib32-gcc-libs' 'gcc-fortran-multilib' 'gcc-objc-multilib' 'gcc-ada-multilib' 'gcc-go-multilib') pkgver=4.7.0 -pkgrel=2 -#_snapshot=4.6-20120120 +pkgrel=3 +_snapshot=4.7-20120324 _libstdcppmanver=20120307 # Note: check source directory name when updating this pkgdesc="The GNU Compiler Collection for multilib" arch=('x86_64') @@ -19,16 +19,17 @@ makedepends=('binutils-multilib>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada-multilib' 'lib32-glibc>=2.14') checkdepends=('dejagnu') options=('!libtool' '!emptydirs') -source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 - #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 +source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2 gcc_pure64-multilib.patch gcc-4.7.0-cloog-0.17.patch) -md5sums=('2a0f1d99fda235c29d40b561f81d9a77' +md5sums=('947f9a70dcbb4baaf20b1e95b518048e' '489d2f5311535800a120efd8d18db719' 'ec24c32d3d1030c2bc8cb2ad2d1dc629' '575f7d17b022e609447a590e481b18b5') + if [ -n "${_snapshot}" ]; then _basedir="${srcdir}/gcc-${_snapshot}" else diff --git a/multilib-testing/lib32-glibc/PKGBUILD b/multilib-testing/lib32-glibc/PKGBUILD index e6298fdc0..a821c9be6 100644 --- a/multilib-testing/lib32-glibc/PKGBUILD +++ b/multilib-testing/lib32-glibc/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 68428 2012-03-24 13:21:15Z heftig $ +# $Id: PKGBUILD 68617 2012-03-29 21:43:51Z heftig $ # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Jan de Groot <jgc@archlinux.org> # Contributor: Allan McRae <allan@archlinux.org> @@ -9,7 +9,7 @@ _pkgbasename=glibc pkgname=lib32-$_pkgbasename pkgver=2.15 -pkgrel=8 +pkgrel=10 _glibcdate=20111227 pkgdesc="GNU C Library for multilib" arch=('x86_64') @@ -47,11 +47,12 @@ source=(ftp://ftp.archlinux.org/other/glibc/${_pkgbasename}-${pkgver}_${_glibcda glibc-2.15-non-signalling-comparisons.patch glibc-2.15-rintf-rounding.patch glibc-2.15-nearbyintf-rounding.patch + glibc-2.15-confstr-local-buffer-extent.patch lib32-glibc.conf) md5sums=('6ffdf5832192b92f98bdd125317c0dfc' '7ef69c530a15106de93e4de2df2d393e' 'b6c619e5cf91829a15ce34dccef676d5' - '40cd342e21f71f5e49e32622b25acc52' + 'addfddd648a4bf832eb126aba944ebae' 'e60e33591c9ec1447e4cddadcbb9cf3a' '6970bcfeb3bf88913436d5112d16f588' 'c5de2a946215d647c8af5432ec4b0da0' @@ -77,6 +78,7 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc' 'c483504cf404ed0b44480af627813a97' '1419d61fd1dbc6cdc48bb59da86fa66f' '7ff501435078b1a2622124fbeaafc921' + '8d1023a51e0932681b46440d5f8551ee' '6e052f1cb693d5d3203f50f9d4e8c33b') build() { @@ -89,8 +91,7 @@ build() { patch -p1 -i ${srcdir}/glibc-2.15-do-not-install-timezone-files-2.patch # undefine __i686 - # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html - # fix in http://sourceware.org/git/?p=glibc.git;a=commit;h=d4a54ac6 requires additional backporting... + # http://sourceware.org/glibc/wiki/Release/2.15#Build_Failures patch -p1 -i ${srcdir}/glibc-__i686.patch # http://www.exploit-db.com/exploits/15274/ @@ -195,6 +196,11 @@ build() { # http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47 patch -p1 -i ${srcdir}/glibc-2.15-nearbyintf-rounding.patch + # fix varaible scope issue in confstr + # http://sourceware.org/git/?p=glibc.git;a=commit;h=ac4c54f0 + # http://sourceware.org/git/?p=glibc.git;a=commit;h=d6a403f9 + patch -p1 -i ${srcdir}/glibc-2.15-confstr-local-buffer-extent.patch + cd ${srcdir} mkdir glibc-build cd glibc-build @@ -202,6 +208,7 @@ build() { export CC="gcc -m32" # Hack to fix NPTL issues with Xen, only required on 32bit platforms + # TODO: make separate glibc-xen package for i686 export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs" echo "slibdir=/usr/lib32" >> configparms diff --git a/multilib-testing/lib32-glibc/glibc-2.15-confstr-local-buffer-extent.patch b/multilib-testing/lib32-glibc/glibc-2.15-confstr-local-buffer-extent.patch new file mode 100644 index 000000000..483b28532 --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-confstr-local-buffer-extent.patch @@ -0,0 +1,297 @@ +diff --git a/posix/confstr.c b/posix/confstr.c +index 3c9566d..cad6561 100644 +--- a/posix/confstr.c ++++ b/posix/confstr.c +@@ -35,6 +34,10 @@ confstr (name, buf, len) + const char *string = ""; + size_t string_len = 1; + ++ /* Note that this buffer must be large enough for the longest strings ++ used below. */ ++ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"]; ++ + switch (name) + { + case _CS_PATH: +@@ -53,59 +56,55 @@ confstr (name, buf, len) + wint_t types are no greater than the width of type long. + + Currently this means all environment which the system allows. */ +- { +- char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"]; +- +- string_len = 0; ++ string_len = 0; + #ifndef _POSIX_V7_ILP32_OFF32 +- if (__sysconf (_SC_V7_ILP32_OFF32) > 0) ++ if (__sysconf (_SC_V7_ILP32_OFF32) > 0) + #endif + #if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0 +- { +- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32", +- sizeof "POSIX_V7_ILP32_OFF32" - 1); +- string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1; +- } ++ { ++ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32", ++ sizeof "POSIX_V7_ILP32_OFF32" - 1); ++ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1; ++ } + #endif + #ifndef _POSIX_V7_ILP32_OFFBIG +- if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0) ++ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0) + #endif + #if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG", +- sizeof "POSIX_V7_ILP32_OFFBIG" - 1); +- string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG", ++ sizeof "POSIX_V7_ILP32_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1; ++ } + #endif + #ifndef _POSIX_V7_LP64_OFF64 +- if (__sysconf (_SC_V7_LP64_OFF64) > 0) ++ if (__sysconf (_SC_V7_LP64_OFF64) > 0) + #endif + #if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64", +- sizeof "POSIX_V7_LP64_OFF64" - 1); +- string_len += sizeof "POSIX_V7_LP64_OFF64" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64", ++ sizeof "POSIX_V7_LP64_OFF64" - 1); ++ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1; ++ } + #endif + #ifndef _POSIX_V7_LPBIG_OFFBIG +- if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0) ++ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0) + #endif + #if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG", +- sizeof "POSIX_V7_LPBIG_OFFBIG" - 1); +- string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1; +- } +-#endif +- restenvs[string_len++] = '\0'; +- string = restenvs; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG", ++ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1; ++ } ++#endif ++ restenvs[string_len++] = '\0'; ++ string = restenvs; + break; + + case _CS_V6_WIDTH_RESTRICTED_ENVS: +@@ -116,59 +115,55 @@ confstr (name, buf, len) + wint_t types are no greater than the width of type long. + + Currently this means all environment which the system allows. */ +- { +- char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"]; +- +- string_len = 0; ++ string_len = 0; + #ifndef _POSIX_V6_ILP32_OFF32 +- if (__sysconf (_SC_V6_ILP32_OFF32) > 0) ++ if (__sysconf (_SC_V6_ILP32_OFF32) > 0) + #endif + #if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0 +- { +- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32", +- sizeof "POSIX_V6_ILP32_OFF32" - 1); +- string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1; +- } ++ { ++ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32", ++ sizeof "POSIX_V6_ILP32_OFF32" - 1); ++ string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1; ++ } + #endif + #ifndef _POSIX_V6_ILP32_OFFBIG +- if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0) ++ if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0) + #endif + #if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG", +- sizeof "POSIX_V6_ILP32_OFFBIG" - 1); +- string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG", ++ sizeof "POSIX_V6_ILP32_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1; ++ } + #endif + #ifndef _POSIX_V6_LP64_OFF64 +- if (__sysconf (_SC_V6_LP64_OFF64) > 0) ++ if (__sysconf (_SC_V6_LP64_OFF64) > 0) + #endif + #if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64", +- sizeof "POSIX_V6_LP64_OFF64" - 1); +- string_len += sizeof "POSIX_V6_LP64_OFF64" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64", ++ sizeof "POSIX_V6_LP64_OFF64" - 1); ++ string_len += sizeof "POSIX_V6_LP64_OFF64" - 1; ++ } + #endif + #ifndef _POSIX_V6_LPBIG_OFFBIG +- if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0) ++ if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0) + #endif + #if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG", +- sizeof "POSIX_V6_LPBIG_OFFBIG" - 1); +- string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1; +- } +-#endif +- restenvs[string_len++] = '\0'; +- string = restenvs; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG", ++ sizeof "POSIX_V6_LPBIG_OFFBIG" - 1); ++ string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1; ++ } ++#endif ++ restenvs[string_len++] = '\0'; ++ string = restenvs; + break; + + case _CS_V5_WIDTH_RESTRICTED_ENVS: +@@ -179,59 +174,55 @@ confstr (name, buf, len) + wint_t types are no greater than the width of type long. + + Currently this means all environment which the system allows. */ +- { +- char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"]; +- +- string_len = 0; ++ string_len = 0; + #ifndef _XBS5_ILP32_OFF32 +- if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0) ++ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0) + #endif + #if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0 +- { +- memcpy (restenvs + string_len, "XBS5_ILP32_OFF32", +- sizeof "XBS5_ILP32_OFF32" - 1); +- string_len += sizeof "XBS5_ILP32_OFF32" - 1; +- } ++ { ++ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32", ++ sizeof "XBS5_ILP32_OFF32" - 1); ++ string_len += sizeof "XBS5_ILP32_OFF32" - 1; ++ } + #endif + #ifndef _XBS5_ILP32_OFFBIG +- if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0) ++ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0) + #endif + #if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG", +- sizeof "XBS5_ILP32_OFFBIG" - 1); +- string_len += sizeof "XBS5_ILP32_OFFBIG" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG", ++ sizeof "XBS5_ILP32_OFFBIG" - 1); ++ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1; ++ } + #endif + #ifndef _XBS5_LP64_OFF64 +- if (__sysconf (_SC_XBS5_LP64_OFF64) > 0) ++ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0) + #endif + #if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "XBS5_LP64_OFF64", +- sizeof "XBS5_LP64_OFF64" - 1); +- string_len += sizeof "XBS5_LP64_OFF64" - 1; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "XBS5_LP64_OFF64", ++ sizeof "XBS5_LP64_OFF64" - 1); ++ string_len += sizeof "XBS5_LP64_OFF64" - 1; ++ } + #endif + #ifndef _XBS5_LPBIG_OFFBIG +- if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0) ++ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0) + #endif + #if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0 +- { +- if (string_len) +- restenvs[string_len++] = '\n'; +- memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG", +- sizeof "XBS5_LPBIG_OFFBIG" - 1); +- string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1; +- } +-#endif +- restenvs[string_len++] = '\0'; +- string = restenvs; +- } ++ { ++ if (string_len) ++ restenvs[string_len++] = '\n'; ++ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG", ++ sizeof "XBS5_LPBIG_OFFBIG" - 1); ++ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1; ++ } ++#endif ++ restenvs[string_len++] = '\0'; ++ string = restenvs; + break; + + case _CS_XBS5_ILP32_OFF32_CFLAGS: diff --git a/multilib-testing/lib32-glibc/glibc-__i686.patch b/multilib-testing/lib32-glibc/glibc-__i686.patch index 28d5dd424..16f84c536 100644 --- a/multilib-testing/lib32-glibc/glibc-__i686.patch +++ b/multilib-testing/lib32-glibc/glibc-__i686.patch @@ -1,13 +1,31 @@ -diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile ---- glibc-old//sysdeps/i386/Makefile 2010-03-18 11:52:30.000000000 +1000 -+++ glibc//sysdeps/i386/Makefile 2010-04-16 15:05:50.000000000 +1000 -@@ -1,6 +1,7 @@ - # The mpn functions need a #define for asm syntax flavor. --# Every i386 port in use uses gas syntax (I think). --asm-CPPFLAGS += -DGAS_SYNTAX -+# Every i386 port in use uses gas syntax (I think). Don't replace -+# __i686 in __i686.get_pc_thunk.bx. -+asm-CPPFLAGS += -DGAS_SYNTAX -U __i686 - - # The i386 `long double' is a distinct type we support. - long-double-fcts = yes +diff --git a/nptl/sysdeps/pthread/pt-initfini.c b/nptl/sysdeps/pthread/pt-initfini.c +index 9c00dc0..f5d4df8 100644 +--- a/nptl/sysdeps/pthread/pt-initfini.c ++++ b/nptl/sysdeps/pthread/pt-initfini.c +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h +index 64ef400..726b1df 100644 +--- a/sysdeps/unix/sysv/linux/i386/sysdep.h ++++ b/sysdeps/unix/sysv/linux/i386/sysdep.h +@@ -29,6 +29,10 @@ + #include <dl-sysdep.h> + #include <tls.h> + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h |