* add hppa-unknown-linux-gnu-gcc-stage1
This commit is contained in:
parent
33a12a1a7e
commit
4efcc2c30c
111
cross-compilers/hppa-unknown-linux-gnu-gcc-stage1/PKGBUILD
Normal file
111
cross-compilers/hppa-unknown-linux-gnu-gcc-stage1/PKGBUILD
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||||
|
# Contributor: Alexander 'hatred' Drozdov <adrozdoff@gmail.com>
|
||||||
|
# Contributor: toha257 <toha257@gmail.com>
|
||||||
|
# Contributor: Allan McRae <allan@archlinux.org>
|
||||||
|
# Contributor: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
# Contributor: Tavian Barnes <tavianator@tavianator.com>
|
||||||
|
# Maintainer: Stefan Schmidt <thrimbor.github@gmail.com>
|
||||||
|
|
||||||
|
_target=hppa-unknown-linux-gnu
|
||||||
|
pkgname=${_target}-gcc-stage1
|
||||||
|
pkgver=14.1.1+r150+g789f05536df
|
||||||
|
_commit=789f05536df8fcea58cc3ccede4b2383e17b8be1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building (${_target})"
|
||||||
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
||||||
|
license=(GPL LGPL FDL custom)
|
||||||
|
url='http://gcc.gnu.org'
|
||||||
|
depends=(${_target}-binutils libmpc zlib libisl)
|
||||||
|
makedepends=(git)
|
||||||
|
options=(!debug !emptydirs !strip)
|
||||||
|
source=(git+https://sourceware.org/git/gcc.git#commit=${_commit}
|
||||||
|
gcc11-Wno-format-security.patch)
|
||||||
|
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
|
||||||
|
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
|
||||||
|
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
|
||||||
|
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
|
||||||
|
sha256sums=('187c930e1a02ab09425d3331125068384540df95fd401193bbf92192e39291f0'
|
||||||
|
'504e4b5a08eb25b6c35f19fdbe0c743ae4e9015d0af4759e74150006c283585e')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
|
||||||
|
cd gcc
|
||||||
|
|
||||||
|
# Do not run fixincludes
|
||||||
|
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
||||||
|
|
||||||
|
# Arch Linux installs x86_64 libraries /lib
|
||||||
|
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
|
||||||
|
sed -i 's@/lib64@/lib@g' gcc/config/rs6000/t-*
|
||||||
|
|
||||||
|
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
|
||||||
|
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
|
||||||
|
|
||||||
|
# configure.ac: When adding -Wno-format, also add -Wno-format-security
|
||||||
|
patch -Np0 < "$srcdir/gcc11-Wno-format-security.patch"
|
||||||
|
|
||||||
|
mkdir -p "$srcdir/gcc-build"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd gcc-build
|
||||||
|
|
||||||
|
# using -pipe causes spurious test-suite failures
|
||||||
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
|
||||||
|
CFLAGS=${CFLAGS/-pipe}
|
||||||
|
CFLAGS=${CFLAGS/-Wformat -Werror=format-security/}
|
||||||
|
CXXFLAGS=${CXXFLAGS/-pipe/}
|
||||||
|
CXXFLAGS=${CXXFLAGS/ -Wformat -Werror=format-security/}
|
||||||
|
|
||||||
|
"$srcdir/gcc/configure" --prefix=/usr \
|
||||||
|
--program-prefix=${_target}- \
|
||||||
|
--with-local-prefix=/usr/${_target} \
|
||||||
|
--with-sysroot=/usr/${_target} \
|
||||||
|
--with-build-sysroot=/usr/${_target}/usr \
|
||||||
|
--with-as=/usr/bin/${_target}-as \
|
||||||
|
--with-ld=/usr/bin/${_target}-ld \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
|
--disable-nls \
|
||||||
|
--with-newlib \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-threads \
|
||||||
|
--with-system-zlib \
|
||||||
|
--enable-__cxa_atexit \
|
||||||
|
--disable-libunwind-exceptions \
|
||||||
|
--enable-clocale=gnu \
|
||||||
|
--disable-libstdcxx-pch \
|
||||||
|
--disable-libssp \
|
||||||
|
--enable-gnu-unique-object \
|
||||||
|
--enable-linker-build-id \
|
||||||
|
--disable-lto \
|
||||||
|
--disable-plugin \
|
||||||
|
--enable-install-libiberty \
|
||||||
|
--with-linker-hash-style=gnu \
|
||||||
|
--enable-gnu-indirect-function \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-werror \
|
||||||
|
--enable-checking=release \
|
||||||
|
--enable-default-pie \
|
||||||
|
--enable-default-ssp \
|
||||||
|
--target=${_target} \
|
||||||
|
--host=${CHOST} \
|
||||||
|
--build=${CHOST} \
|
||||||
|
--enable-secureplt
|
||||||
|
|
||||||
|
make STAGE1_CFLAGS="-O2" all-gcc all-target-libgcc
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd gcc-build
|
||||||
|
|
||||||
|
make DESTDIR="$pkgdir" install-gcc install-target-libgcc
|
||||||
|
|
||||||
|
rm -rf "$pkgdir/usr/share"
|
||||||
|
|
||||||
|
# strip it manually
|
||||||
|
strip "$pkgdir/usr/bin/"* 2>/dev/null || true
|
||||||
|
find "$pkgdir/usr/lib" -type f -exec /usr/bin/${_target}-strip \
|
||||||
|
--strip-unneeded {} \; 2>/dev/null || true
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
2017-02-25 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* configure.ac: When adding -Wno-format, also add -Wno-format-security.
|
||||||
|
* configure: Regenerated.
|
||||||
|
|
||||||
|
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
|
||||||
|
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
|
||||||
|
@@ -480,7 +480,7 @@ AC_ARG_ENABLE(build-format-warnings,
|
||||||
|
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
|
||||||
|
[],[enable_build_format_warnings=yes])
|
||||||
|
AS_IF([test $enable_build_format_warnings = no],
|
||||||
|
- [wf_opt=-Wno-format],[wf_opt=])
|
||||||
|
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
|
||||||
|
ACX_PROG_CXX_WARNING_OPTS(
|
||||||
|
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
|
||||||
|
[-Wcast-qual -Wno-error=format-diag $wf_opt])),
|
||||||
|
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
|
||||||
|
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
|
||||||
|
@@ -6647,7 +6647,7 @@ else
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $enable_build_format_warnings = no; then :
|
||||||
|
- wf_opt=-Wno-format
|
||||||
|
+ wf_opt="-Wno-format -Wno-format-security"
|
||||||
|
else
|
||||||
|
wf_opt=
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user