diff options
author | Giovanni Santini | 2015-06-23 12:15:41 +0200 |
---|---|---|
committer | Giovanni Santini | 2015-06-23 12:15:41 +0200 |
commit | 63d8efe474fd2b0495a4e6c85067918c65703c7d (patch) | |
tree | 359bdd57af7c984a3be5b35ec6f91ec0355128c7 | |
parent | 691975370f7baa2ce60675f40642a3851e34ff9c (diff) | |
download | aur-63d8efe474fd2b0495a4e6c85067918c65703c7d.tar.gz |
Fixing package stuff (version: 4.4.7-4)
* Added a patch for fixing toplevel.{c,h} compilation, thanks to carstene1ns that reviewed my patch
* Using sha256 for checksums instead of md5
* Replaced spaced with tabs
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 185 | ||||
-rw-r--r-- | gcc-fix_toplevel_inlines.patch | 104 |
3 files changed, 211 insertions, 96 deletions
@@ -1,7 +1,7 @@ pkgbase = gcc44-multilib pkgdesc = The GNU Compiler Collection, version 4.4.7 - multilib version pkgver = 4.4.7 - pkgrel = 3 + pkgrel = 4 url = http://gcc.gnu.org arch = i686 arch = x86_64 @@ -28,13 +28,15 @@ pkgbase = gcc44-multilib source = gcc-hash-style-both.patch source = siginfo_t_fix.patch source = texinfo_5_fix.patch - md5sums = 3bda0831d654964ee152c46fa8d29e46 - md5sums = 5494ba2227ccbd7c90f318723b0e7fe5 - md5sums = 2776eab5ebb7f9cc62dd2199a3a24382 - md5sums = 22cec272f9cc2801d3cd348feaca888b - md5sums = 6fd395bacbd7b6e47c7b74854b478363 - md5sums = edce21b2ce295478d14d5dd988eb3287 - md5sums = b912353cccf62a1ee3ea0ed18fadf71a + source = gcc-fix_toplevel_inlines.patch + sha256sums = c4663b7023909a4a075d3c2b2e17f6e082a9625aebfd0ce7f1d7817e44bf5542 + sha256sums = 1882ff29be51eeb3fb349cbcda9df200a5c3cd20c97dd1d593101e0998b3c469 + sha256sums = 3298757bedcf8b60f6e9b2d9aea75aac527199c6866d1b6218f706f20563b9e2 + sha256sums = 59d7a0b897e0a6e4e126319d2c4db770fe4531e5700bb7c320f0075935078204 + sha256sums = a600550d3d2b2fb8ee6a547c68c3a08a2af7579290b340c35ee5598c9bb305a5 + sha256sums = 24cb033fa363148952b5ed7cdff635fbee0ae55ecafe5dfa32206e97cb0c4af3 + sha256sums = 4f4d16d98d72c29ebccdda6a89d65fcd9357703c97c3fca65080ae3e7add762c + sha256sums = b6fa9ca644f9dc55e17d7696078fcf38ce29e6600778249d169b8dd572b01d4c pkgname = gcc44-multilib @@ -6,112 +6,121 @@ pkgname='gcc44-multilib' pkgver=4.4.7 -pkgrel=3 -_libstdcppmanver=4.5.2 # Note: check source directory name when updating this +pkgrel=4 +_libstdcppmanver=4.5.2 # Note: check source directory name when updating this pkgdesc="The GNU Compiler Collection, version 4.4.7 - multilib version" arch=('i686' 'x86_64') license=('GPL' 'LGPL' 'custom') url="http://gcc.gnu.org" makedepends=('binutils>=2.21' 'libmpc' 'cloog' 'elfutils' 'dejagnu' 'glibc>=2.11.1-2' 'lib32-glibc>=2.12.1') -conflicts=('gcc44') # Existing package from AUR +conflicts=('gcc44') # Existing package from AUR provides=('gcc44') options=('!libtool' '!buildflags' '!emptydirs' 'staticlibs') source=( - http://ftpmirror.gnu.org/gcc/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 - #ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 <- the one over is 'optimized', it chooses the right mirror for you - ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api-${_libstdcppmanver}.man.tar.bz2 # can't be automagically resolved, doh - gcc_pure64.patch - gcc-hash-style-both.patch - siginfo_t_fix.patch - texinfo_5_fix.patch) -md5sums=('3bda0831d654964ee152c46fa8d29e46' - '5494ba2227ccbd7c90f318723b0e7fe5' - '2776eab5ebb7f9cc62dd2199a3a24382' - '22cec272f9cc2801d3cd348feaca888b' - '6fd395bacbd7b6e47c7b74854b478363' - 'edce21b2ce295478d14d5dd988eb3287' - 'b912353cccf62a1ee3ea0ed18fadf71a') - -prepare() { - - cd ${srcdir}/gcc-${pkgver} - - # "Add" ppl-0.11 compatibility - sed -i "/ppl_minor_version=/s#10#11#" configure - # Do not install libiberty - sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - # Do not run fixincludes - #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in - - if [ "${CARCH}" = "x86_64" ]; then - patch -Np1 -i ${srcdir}/gcc_pure64.patch - fi - patch -Np1 -i ${srcdir}/siginfo_t_fix.patch - patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch - patch -Np1 -i ${srcdir}/texinfo_5_fix.patch - - echo ${pkgver} > gcc/BASE-VER + # ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 <- the one over is 'optimized', + # it chooses the right mirror for you + http://ftpmirror.gnu.org/gcc/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 + # If you have problems, use the source below + # http://ftp.vim.org/languages/gcc/libstdc++/doxygen/libstdc++-api-${_libstdcppmanver}.man.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api-${_libstdcppmanver}.man.tar.bz2 # can't be automagically resolved, doh + # Various patches + gcc_pure64.patch + gcc-hash-style-both.patch + siginfo_t_fix.patch + texinfo_5_fix.patch + gcc-fix_toplevel_inlines.patch + ) +sha256sums=('c4663b7023909a4a075d3c2b2e17f6e082a9625aebfd0ce7f1d7817e44bf5542' + '1882ff29be51eeb3fb349cbcda9df200a5c3cd20c97dd1d593101e0998b3c469' + '3298757bedcf8b60f6e9b2d9aea75aac527199c6866d1b6218f706f20563b9e2' + '59d7a0b897e0a6e4e126319d2c4db770fe4531e5700bb7c320f0075935078204' + 'a600550d3d2b2fb8ee6a547c68c3a08a2af7579290b340c35ee5598c9bb305a5' + '24cb033fa363148952b5ed7cdff635fbee0ae55ecafe5dfa32206e97cb0c4af3' + '4f4d16d98d72c29ebccdda6a89d65fcd9357703c97c3fca65080ae3e7add762c' + '9a43d0dfb398dc0dd42f05059718dc5ee9ab8bcf7eaf5234e420f5d3ceb8c8c5') + +prepare(){ + + cd ${srcdir}/gcc-${pkgver} + + # "Add" ppl-0.11 compatibility + sed -i "/ppl_minor_version=/s#10#11#" configure + # Do not install libiberty + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + # Do not run fixincludes + #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + if [ "${CARCH}" = "x86_64" ]; then + patch -Np1 -i ${srcdir}/gcc_pure64.patch + fi + + patch -Np1 -i ${srcdir}/siginfo_t_fix.patch + patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch + patch -Np1 -i ${srcdir}/texinfo_5_fix.patch + patch -Np1 -i ${srcdir}/gcc-fix_toplevel_inlines.patch + + echo ${pkgver} > gcc/BASE-VER } build() { - cd ${srcdir} - rm -rf gcc-build - mkdir gcc-build - cd gcc-build - ${srcdir}/gcc-${pkgver}/configure \ - --prefix=/usr \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --with-bugurl=https://bugs.archlinux.org/ \ - --enable-languages=c,c++ \ - --enable-shared \ - --enable-threads=posix \ - --enable-__cxa_atexit \ - --enable-clocale=gnu \ - --enable-gnu-unique-object \ - --enable-lto \ - --enable-plugin \ - --enable-gold \ - --with-plugin-ld=ld.gold \ - --enable-multilib \ - --disable-libstdcxx-pch \ - --with-system-zlib \ - --with-ppl \ - --with-cloog \ - --disable-libunwind-exceptions \ - --enable-linker-build-id \ - --enable-cloog-backend=isl \ - --enable-ld=default \ - --enable-checking=release \ - --disable-werror \ - --program-suffix=-4.4 \ - --enable-version-specific-runtime-libs - make - - # increase stack size to prevent test failures - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827 - # ulimit -s 32768 - - # do not abort on error as some are "expected" - # make -k check || true - # ${_basedir}/contrib/test_summary + cd ${srcdir} + rm -rf gcc-build + mkdir gcc-build + cd gcc-build + ${srcdir}/gcc-${pkgver}/configure \ + --prefix=/usr \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-bugurl=https://github.com/ItachiSan/linux_packaging/issues/ \ + --enable-languages=c,c++ \ + --enable-shared \ + --enable-threads=posix \ + --enable-__cxa_atexit \ + --enable-clocale=gnu \ + --enable-gnu-unique-object \ + --enable-lto \ + --enable-plugin \ + --enable-gold \ + --with-plugin-ld=ld.gold \ + --enable-multilib \ + --disable-libstdcxx-pch \ + --with-system-zlib \ + --with-ppl \ + --with-cloog \ + --disable-libunwind-exceptions \ + --enable-linker-build-id \ + --enable-cloog-backend=isl \ + --enable-ld=default \ + --enable-checking=release \ + --disable-werror \ + --program-suffix=-4.4 \ + --enable-version-specific-runtime-libs + + make + + # increase stack size to prevent test failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827 + # ulimit -s 32768 + + # do not abort on error as some are "expected" + # make -k check || true + # ${_basedir}/contrib/test_summary } # Used the same package() as gcc45 (AUR). -package() -{ - cd ${srcdir}/gcc-build +package(){ - make DESTDIR=${pkgdir} install + cd ${srcdir}/gcc-build - ## Lazy way of dealing with conflicting man and info pages and locales... - rm -rf ${pkgdir}/usr/share/ + make DESTDIR=${pkgdir} install - install -Dm644 ${srcdir}/gcc-${pkgver}/COPYING.RUNTIME \ - ${pkgdir}/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION + ## Lazy way of dealing with conflicting man and info pages and locales... + rm -rf ${pkgdir}/usr/share/ + install -Dm644 ${srcdir}/gcc-${pkgver}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION } diff --git a/gcc-fix_toplevel_inlines.patch b/gcc-fix_toplevel_inlines.patch new file mode 100644 index 000000000000..69e4a72ec0bf --- /dev/null +++ b/gcc-fix_toplevel_inlines.patch @@ -0,0 +1,104 @@ +Patch that fixes toplevel.{c,h} defines of {floor,exact}_log2 +aur-general discussion: https://lists.archlinux.org/pipermail/aur-general/2015-June/031034.html +Made by 'carstene1ns' +References, taken from above mail: +[1]: https://paste.xinu.at/f32k/ # This patch +[2]: https://gcc.gnu.org/gcc-5/porting_to.html ("Different semantics for +inline functions") +[3]: https://github.com/gcc-mirror/gcc/commit/4345dfaa7260253cb0d3b10b4b466f586e9d28dc +diff -Npur a/gcc/toplev.c b/gcc/toplev.c +--- a/gcc/toplev.c 2010-03-31 04:51:31.000000000 +0200 ++++ b/gcc/toplev.c 2015-06-21 20:23:54.025339943 +0200 +@@ -523,11 +523,11 @@ read_integral_parameter (const char *p, + return atoi (p); + } + +-/* When compiling with a recent enough GCC, we use the GNU C "extern inline" +- for floor_log2 and exact_log2; see toplev.h. That construct, however, +- conflicts with the ISO C++ One Definition Rule. */ ++/* The functions floor_log2 and exact_log2 are defined as inline ++ functions in toplev.h if GCC_VERSION >= 3004. The definitions here ++ are used for older versions of gcc. */ + +-#if GCC_VERSION < 3004 || !defined (__cplusplus) ++#if GCC_VERSION < 3004 + + /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. + If X is 0, return -1. */ +@@ -540,9 +540,6 @@ floor_log2 (unsigned HOST_WIDE_INT x) + if (x == 0) + return -1; + +-#ifdef CLZ_HWI +- t = HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x); +-#else + if (HOST_BITS_PER_WIDE_INT > 64) + if (x >= (unsigned HOST_WIDE_INT) 1 << (t + 64)) + t += 64; +@@ -559,7 +556,6 @@ floor_log2 (unsigned HOST_WIDE_INT x) + t += 2; + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 1)) + t += 1; +-#endif + + return t; + } +@@ -572,14 +568,10 @@ exact_log2 (unsigned HOST_WIDE_INT x) + { + if (x != (x & -x)) + return -1; +-#ifdef CTZ_HWI +- return x ? CTZ_HWI (x) : -1; +-#else + return floor_log2 (x); +-#endif + } + +-#endif /* GCC_VERSION < 3004 || !defined (__cplusplus) */ ++#endif /* GCC_VERSION < 3004 */ + + /* Handler for fatal signals, such as SIGSEGV. These are transformed + into ICE messages, which is much more user friendly. In case the +diff -Npur a/gcc/toplev.h b/gcc/toplev.h +--- a/gcc/toplev.h 2009-02-20 16:20:38.000000000 +0100 ++++ b/gcc/toplev.h 2015-06-21 20:24:35.142568303 +0200 +@@ -167,14 +167,17 @@ extern void decode_d_option (const char + extern bool fast_math_flags_set_p (void); + extern bool fast_math_flags_struct_set_p (struct cl_optimization *); + ++#if GCC_VERSION < 3004 ++ + /* Return log2, or -1 if not exact. */ + extern int exact_log2 (unsigned HOST_WIDE_INT); + + /* Return floor of log2, with -1 for zero. */ + extern int floor_log2 (unsigned HOST_WIDE_INT); + ++#else /* GCC_VERSION >= 3004 */ ++ + /* Inline versions of the above for speed. */ +-#if GCC_VERSION >= 3004 + # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG + # define CLZ_HWI __builtin_clzl + # define CTZ_HWI __builtin_ctzl +@@ -186,17 +189,18 @@ extern int floor_log2 ( + # define CTZ_HWI __builtin_ctz + # endif + +-extern inline int ++static inline int + floor_log2 (unsigned HOST_WIDE_INT x) + { + return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1; + } + +-extern inline int ++static inline int + exact_log2 (unsigned HOST_WIDE_INT x) + { + return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1; + } ++ + #endif /* GCC_VERSION >= 3004 */ + + /* Functions used to get and set GCC's notion of in what directory |