Commit f0ed5f4d authored by Anatol Pomozov's avatar Anatol Pomozov
Browse files

More ARM64 cross-comipler cleanup

parent 587c2cf3
...@@ -12,7 +12,7 @@ url='http://gcc.gnu.org/' ...@@ -12,7 +12,7 @@ url='http://gcc.gnu.org/'
license=(GPL LGPL FDL) license=(GPL LGPL FDL)
depends=($_target-binutils $_target-glibc libmpc zlib) depends=($_target-binutils $_target-glibc libmpc zlib)
makedepends=(gmp mpfr) makedepends=(gmp mpfr)
options=(!emptydirs !strip staticlibs) options=(!emptydirs !strip)
source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.bz2 ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.bz2
http://isl.gforge.inria.fr/isl-$_islver.tar.bz2) http://isl.gforge.inria.fr/isl-$_islver.tar.bz2)
...@@ -33,6 +33,9 @@ prepare() { ...@@ -33,6 +33,9 @@ prepare() {
echo $pkgver > gcc/BASE-VER echo $pkgver > gcc/BASE-VER
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
# hack! - some configure tests for header files using "$CPP $CPPFLAGS" # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" "$srcdir"/$_basedir/{libiberty,gcc}/configure sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" "$srcdir"/$_basedir/{libiberty,gcc}/configure
...@@ -43,38 +46,32 @@ prepare() { ...@@ -43,38 +46,32 @@ prepare() {
build() { build() {
cd gcc-build cd gcc-build
export CFLAGS_FOR_TARGET='-O2 -pipe' # using -pipe causes spurious test-suite failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
# unfortunately CXXFLAGS_FOR_TARGET is not honored https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53579 CFLAGS=${CFLAGS/-pipe/}
#export CXXFLAGS_FOR_TARGET='-O2 -pipe' CXXFLAGS=${CXXFLAGS/-pipe/}
export CXXFLAGS='-O2 -pipe'
$srcdir/$_basedir/configure \ $srcdir/$_basedir/configure \
--prefix=/usr \ --prefix=/usr \
--libexecdir=/usr/lib \ --program-prefix=$_target- \
--target=$_target \ --with-local-prefix=/usr/$_target \
--enable-shared \ --with-sysroot=/usr/$_target \
--disable-nls \ --with-build-sysroot=/usr/$_target \
--enable-threads=posix \ --with-as=/usr/bin/${_target}-as \
--enable-languages=c,c++ \ --with-ld=/usr/bin/${_target}-ld \
--enable-multilib \ --libdir=/usr/lib --libexecdir=/usr/lib \
--disable-libssp \ --target=$_target --host=$CHOST --build=$CHOST \
--disable-libquadmath \ --disable-nls \
--with-system-zlib \ --enable-languages=c,c++ \
--with-sysroot=/usr/$_target \ --enable-shared --enable-threads=posix \
--with-build-sysroot=/usr/$_target \ --with-system-zlib --with-isl --enable-__cxa_atexit \
--with-as=/usr/bin/$_target-as \ --disable-libunwind-exceptions --enable-clocale=gnu \
--with-ld=/usr/bin/$_target-ld \ --disable-libstdcxx-pch --disable-libssp \
--disable-libgomp \ --enable-gnu-unique-object --enable-linker-build-id \
--enable-__cxa_atexit \ --enable-lto --enable-plugin --enable-install-libiberty \
--enable-addons \ --with-linker-hash-style=gnu --enable-gnu-indirect-function \
--with-libelf \ --disable-multilib --disable-werror \
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ --enable-checking=release
--with-gmp \
--with-mpfr \
--with-mpc \
--with-isl \
--enable-gnu-indirect-function
make make
} }
...@@ -82,7 +79,7 @@ build() { ...@@ -82,7 +79,7 @@ build() {
package() { package() {
cd gcc-build cd gcc-build
make DESTDIR="$pkgdir" install make DESTDIR="$pkgdir" install-gcc install-target-libgcc install-target-libstdc++-v3
# strip target binaries # strip target binaries
find "$pkgdir"/usr/lib/gcc/$_target/ "$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 '{}' \; find "$pkgdir"/usr/lib/gcc/$_target/ "$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 '{}' \;
...@@ -94,5 +91,4 @@ package() { ...@@ -94,5 +91,4 @@ package() {
rm -r "$pkgdir"/usr/share/man/man7 rm -r "$pkgdir"/usr/share/man/man7
rm -r "$pkgdir"/usr/share/info rm -r "$pkgdir"/usr/share/info
rm -r "$pkgdir"/usr/share/gcc-$pkgver rm -r "$pkgdir"/usr/share/gcc-$pkgver
rm "$pkgdir"/usr/lib/libcc1.*
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment