diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -2,8 +2,8 @@ _target=riscv64-unknown-elf pkgname=$_target-gcc -pkgver=9.2.0 -_islver=0.21 +pkgver=12.1.0 +_islver=0.24 pkgrel=2 #_snapshot=7-20170504 pkgdesc='The GNU Compiler Collection - cross compiler for 32bit and 64bit RISC-V bare-metal' @@ -13,9 +13,9 @@ license=(GPL LGPL FDL) depends=("$_target-binutils" 'zlib' 'libmpc') options=(!emptydirs !strip) source=("https://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.xz" - "http://isl.gforge.inria.fr/isl-$_islver.tar.bz2") -sha256sums=('ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206' - 'd18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859') + "https://libisl.sourceforge.io/isl-$_islver.tar.xz") +sha256sums=('62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b' + '043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad') if [[ -n "$_snapshot" ]]; then _basedir=gcc-$_snapshot @@ -27,19 +27,25 @@ prepare() { cd $_basedir # link isl for in-tree builds - ln -s ../isl-$_islver isl + ln -sf ../isl-$_islver isl echo $pkgver > gcc/BASE-VER # hack! - some configure tests for header files using "$CPP $CPPFLAGS" sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure - mkdir "$srcdir/build" + mkdir -p "$srcdir/build" } build() { cd "$srcdir/build" + # Credits @allanmcrae + # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD + # TODO: properly deal with the build issues resulting from this + CFLAGS=${CFLAGS/-Werror=format-security/} + CXXFLAGS=${CXXFLAGS/-Werror=format-security/} + "$srcdir/$_basedir/configure" \ CFLAGS_FOR_TARGET='-Os -mcmodel=medany -ffunction-sections -fdata-sections' \ CXXFLAGS_FOR_TARGET='-Os -mcmodel=medany -ffunction-sections -fdata-sections' \ @@ -64,6 +70,7 @@ build() { --disable-nls \ --disable-shared \ --disable-threads \ + --disable-werror \ --enable-tls \ --with-gnu-as \ --with-gnu-ld \ |