[arch-commits] Commit in or1k-elf-gcc/trunk (PKGBUILD)
Filipe Laíns
ffy00 at archlinux.org
Sat Mar 28 14:53:33 UTC 2020
Date: Saturday, March 28, 2020 @ 14:53:33
Author: ffy00
Revision: 605164
upgpkg: or1k-elf-gcc 9.3.0-1
Should fix the missing gcc-bootstrap
Modified:
or1k-elf-gcc/trunk/PKGBUILD
----------+
PKGBUILD | 61 +++++++++++++++++++++----------------------------------------
1 file changed, 21 insertions(+), 40 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-03-28 14:53:26 UTC (rev 605163)
+++ PKGBUILD 2020-03-28 14:53:33 UTC (rev 605164)
@@ -13,7 +13,7 @@
url='https://gcc.gnu.org/'
license=(GPL LGPL FDL)
depends=($_target-binutils zlib libmpc)
-makedepends=(gmp mpfr $_target-newlib)
+makedepends=(gmp mpfr $_target-newlib $_target-gcc)
optdepends=("$_target-newlib: Standard C library optimized for embedded systems")
options=(!emptydirs !strip)
source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
@@ -31,6 +31,8 @@
fi
prepare() {
+ mkdir build-gcc
+
cd $_basedir
# link isl for in-tree builds
@@ -40,12 +42,15 @@
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
-
- mkdir $srcdir/build-{gcc,gcc-nano}
}
-_build_gcc() {
- $srcdir/$_basedir/configure \
+build() {
+ cd build-gcc
+
+ export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
+ export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
+
+ "$srcdir"/$_basedir/configure \
--target=$_target \
--prefix=/usr \
--with-sysroot=/usr/$_target \
@@ -52,17 +57,19 @@
--with-native-system-header-dir=/include \
--libexecdir=/usr/lib \
--enable-languages=c,c++ \
+ --enable-threads=single \
--enable-plugins \
- --disable-decimal-float \
- --disable-libffi \
+ --enable-multilib \
+ --enable-libgcc \
--disable-libgomp \
- --disable-libmudflap \
--disable-libquadmath \
+ --disable-libffi \
--disable-libssp \
+ --disable-libmudflap \
+ --disable-decimal-float \
--disable-libstdcxx-pch \
--disable-nls \
--disable-shared \
- --disable-threads \
--disable-tls \
--with-newlib \
--with-gnu-as \
@@ -76,43 +83,17 @@
--with-isl \
--with-libelf \
--enable-gnu-indirect-function \
- --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \
- --with-pkgversion="FFY00's Arch Repository" \
- --with-bugurl='https://github.com/FFY00/or1k-pkgbuils/issues'
+ --with-pkgversion="Arch Linux Repositories" \
+ --with-bugurl='https://bugs.archlinux.org/'
-
- make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0'
+ make
}
-build() {
- cd $srcdir/build-gcc
- export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
- export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
- _build_gcc
+package() {
+ cd build-gcc
- # Build libstdc++ without exceptions support (the 'nano' variant)
- cd $srcdir/build-gcc-nano
- export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions'
- export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions'
- _build_gcc
-}
-
-package() {
- cd $srcdir/build-gcc
make DESTDIR="$pkgdir" install -j1
- cd $srcdir/build-gcc-nano
- make DESTDIR="$pkgdir.nano" install -j1
- # we need only libstdc nano files
- multilibs=( $($pkgdir/usr/bin/$_target-gcc -print-multi-lib 2>/dev/null) )
- for multilib in "${multilibs[@]}"; do
- dir="${multilib%%;*}"
- from_dir=$pkgdir.nano/usr/$_target/lib/$dir
- to_dir=$pkgdir/usr/$_target/lib/$dir
- cp -f $from_dir/libstdc++.a $to_dir/libstdc++_nano.a
- cp -f $from_dir/libsupc++.a $to_dir/libsupc++_nano.a
- done
-
# strip target binaries
find "$pkgdir"/usr/lib/gcc/$_target/$pkgver "$pkgdir"/usr/$_target/lib \
-type f -and \( -name \*.a -or -name \*.o \) \
More information about the arch-commits
mailing list