summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2016-06-13 17:27:41 -0400
committerChris Severance2016-06-13 17:27:41 -0400
commit3bf13c127b52df0bf45b98a83876c9bf7ba81cd3 (patch)
treef43614ceaaab6b93afa7ebdaf118205fa8cef501
parenta0778eacb2d554b075812fcd6d3ac7ba819643bb (diff)
downloadaur-3bf13c127b52df0bf45b98a83876c9bf7ba81cd3.tar.gz
Unified PKGBUILD, clean build on gcc 6.1.1+i686
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD43
2 files changed, 28 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8103716c6d1c..c81cd00940ae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sun Jun 12 09:23:02 UTC 2016
+# Mon Jun 13 21:27:26 UTC 2016
pkgbase = gcc48
pkgdesc = The GNU Compiler Collection - C and C++ frontends (4.8.x)
pkgver = 4.8.5
@@ -17,6 +17,7 @@ pkgbase = gcc48
makedepends = libmpc
makedepends = doxygen
makedepends = cloog
+ depends = zlib
options = !emptydirs
options = staticlibs
options = !libtool
diff --git a/PKGBUILD b/PKGBUILD
index 6a2b1c3b402d..1f0524d58608 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,14 +8,16 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
-pkgname='gcc48'
+set -u
_pkgver='4.8'
+pkgname="gcc${_pkgver//\./}"
pkgver="${_pkgver}.5"
pkgrel='1'
pkgdesc="The GNU Compiler Collection - C and C++ frontends (${_pkgver}.x)"
arch=('i686' 'x86_64')
-url="http://gcc.gnu.org"
+url='http://gcc.gnu.org'
license=('GPL' 'LGPL' 'FDL' 'custom')
+depends=('zlib')
makedepends=('binutils>=2.24' 'libmpc' 'doxygen')
makedepends+=('cloog')
checkdepends=('dejagnu' 'inetutils')
@@ -33,6 +35,7 @@ PKGEXT='.pkg.tar.gz'
#_libdir="usr/lib/gcc/${CHOST}/${pkgver}"
prepare() {
+ set -u
cd "${_basedir}"
# Do not run fixincludes
@@ -55,11 +58,6 @@ prepare() {
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56780#c6
sed -i -e 's#@target_header_dir@#libiberty#' 'libiberty/Makefile.in'
- mkdir "${srcdir}/gcc-build"
-
- # build
- cd "${srcdir}/gcc-build"
-
# Doesn't like FORTIFY_SOURCE
export CPPFLAGS="${CPPFLAGS//-D_FORTIFY_SOURCE=?/}"
@@ -72,8 +70,12 @@ prepare() {
export CFLAGS="${CFLAGS/-pipe/}"
export CXXFLAGS="${CXXFLAGS/-pipe/}"
+ rm -rf 'gcc-build'
+ mkdir 'gcc-build'
+ cd 'gcc-build'
+
# The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
- "${srcdir}/${_basedir}/configure" \
+ ../configure \
--build="${CHOST}" \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions \
@@ -104,21 +106,25 @@ prepare() {
--with-system-zlib \
--prefix='/usr'
# CXX='g++-4.9' CC='gcc-4.9'
+ set +u
}
build() {
- cd "${srcdir}/gcc-build"
+ set -u
+ cd "${_basedir}/gcc-build"
local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
- LD_PRELOAD='/usr/lib/libstdc++.so' \
+ # LD_PRELOAD='/usr/lib/libstdc++.so' \\
make -s -j "${_nproc}"
# make documentation
make -s -j1 -C "${CHOST}/libstdc++-v3/doc" 'doc-man-doxygen'
+ set +u
}
_fn_check() {
- cd "${srcdir}/gcc-build"
+ set -u
+ cd "${_basedir}/gcc-build"
# increase stack size to prevent test failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827
@@ -127,11 +133,12 @@ _fn_check() {
# do not abort on error as some are "expected"
make -k check || :
"${srcdir}/${_basedir}/contrib/test_summary"
+ set +u
}
-package()
-{
- cd "${srcdir}/gcc-build"
+package() {
+ set -u
+ cd "${_basedir}/gcc-build"
make -s -j1 DESTDIR="${pkgdir}" install
@@ -140,9 +147,11 @@ package()
find "${pkgdir}/" -name '*iberty*' | xargs rm
# Move potentially conflicting stuff to version specific subdirectory
- mv "${pkgdir}/usr/lib/gcc/${CHOST}"/lib*/ "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/"
+ mv "${pkgdir}/usr/lib/gcc/${CHOST}"/lib*/ "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/" || : # Not needed for 32 bit compile
# Install Runtime Library Exception
- install -Dm644 "${srcdir}/gcc-${pkgver}/COPYING.RUNTIME" \
- "${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION"
+ install -Dpm644 '../COPYING.RUNTIME' \
+ "${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION" || :
+ set +u
}
+set +u