diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 45 |
2 files changed, 14 insertions, 35 deletions
@@ -1,7 +1,7 @@ pkgbase = riscv64-unknown-elf-gcc pkgdesc = The GNU Compiler Collection - cross compiler for 32bit and 64bit RISC-V bare-metal pkgver = 9.2.0 - pkgrel = 1 + pkgrel = 2 url = http://gcc.gnu.org/ arch = i686 arch = x86_64 @@ -15,10 +15,8 @@ pkgbase = riscv64-unknown-elf-gcc options = !strip source = https://gcc.gnu.org/pub/gcc/releases/gcc-9.2.0/gcc-9.2.0.tar.xz source = http://isl.gforge.inria.fr/isl-0.21.tar.bz2 - source = https://sourceware.org/pub/newlib/newlib-3.1.0.20181231.tar.gz sha256sums = ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206 sha256sums = d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859 - sha256sums = 9e12fea7297648b114434033ed4458755afe7b9b6c7d58123389e82bd37681c0 pkgname = riscv64-unknown-elf-gcc @@ -4,8 +4,7 @@ _target=riscv64-unknown-elf pkgname=$_target-gcc pkgver=9.2.0 _islver=0.21 -_newlibver=3.1.0.20181231 -pkgrel=1 +pkgrel=2 #_snapshot=7-20170504 pkgdesc='The GNU Compiler Collection - cross compiler for 32bit and 64bit RISC-V bare-metal' arch=('i686' 'x86_64') @@ -14,11 +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" - "https://sourceware.org/pub/newlib/newlib-$_newlibver.tar.gz") + "http://isl.gforge.inria.fr/isl-$_islver.tar.bz2") sha256sums=('ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206' - 'd18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859' - '9e12fea7297648b114434033ed4458755afe7b9b6c7d58123389e82bd37681c0') + 'd18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859') if [[ -n "$_snapshot" ]]; then _basedir=gcc-$_snapshot @@ -32,11 +29,6 @@ prepare() { # link isl for in-tree builds ln -s ../isl-$_islver isl - # link newlib for in-tree builds - for i in newlib libgloss; do - ln -s ../newlib-$_newlibver/$i - done - echo $pkgver > gcc/BASE-VER # hack! - some configure tests for header files using "$CPP $CPPFLAGS" @@ -48,10 +40,9 @@ prepare() { build() { cd "$srcdir/build" - export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' - export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' - "$srcdir/$_basedir/configure" \ + CFLAGS_FOR_TARGET='-Os -mcmodel=medany -ffunction-sections -fdata-sections' \ + CXXFLAGS_FOR_TARGET='-Os -mcmodel=medany -ffunction-sections -fdata-sections' \ --target=$_target \ --prefix=/usr \ --with-sysroot=/usr/$_target \ @@ -59,17 +50,21 @@ build() { --libexecdir=/usr/lib \ --enable-languages=c,c++ \ --enable-plugins \ + --enable-multilib \ --disable-decimal-float \ --disable-libffi \ + --enable-checking=yes \ --disable-libgomp \ --disable-libmudflap \ --disable-libquadmath \ --disable-libssp \ --disable-libstdcxx-pch \ + --disable-libstdcxx \ + --disable-fixinc \ --disable-nls \ --disable-shared \ --disable-threads \ - --disable-tls \ + --enable-tls \ --with-gnu-as \ --with-gnu-ld \ --with-system-zlib \ @@ -81,20 +76,9 @@ build() { --with-mpc \ --with-isl \ --with-libelf \ - --enable-gnu-indirect-function \ - --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ - --with-pkgversion='Arch Repository' \ - --with-bugurl='https://bugs.archlinux.org/' \ - --disable-newlib-supplied-syscalls \ - --enable-newlib-reent-small \ - --disable-newlib-fvwrite-in-streamio \ - --disable-newlib-fseek-optimization \ - --disable-newlib-wide-orient \ - --enable-newlib-nano-malloc \ - --disable-newlib-unbuf-stream-opt \ - --enable-lite-exit \ - --enable-newlib-global-atexit \ - --enable-newlib-nano-formatted-io + --with-arch=rv64imafdc \ + --with-abi=lp64d \ + --with-pkgversion='Arch User Repository' make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0' } @@ -103,9 +87,6 @@ package() { cd "$srcdir/build" make -j1 DESTDIR="$pkgdir" install - # strip target binaries - find "$pkgdir/usr/lib/gcc/$_target/$pkgver" "$pkgdir/usr/$_target/lib" -type f -and \( -name \*.a -or -name \*.o \) -exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc '{}' \; - # strip host binaries find "$pkgdir/usr/bin/" "$pkgdir/usr/lib/gcc/$_target/$pkgver" -type f -and \( -executable \) -exec strip '{}' \; |