X-Git-Url: http://gitweb/?a=blobdiff_plain;f=gcc%2FPkgfile;h=325c7bb1921756685ba241cf14510a7a3c8c9ab4;hb=92f49cf55f28c205b560693205d873863ae29b17;hp=a5bf931c84189e80573dab91c38df5f6204d4ee9;hpb=ecd7d154bca2ba8fd6474c2282f19b36070d544f;p=crossrootfs.git diff --git a/gcc/Pkgfile b/gcc/Pkgfile index a5bf931..325c7bb 100644 --- a/gcc/Pkgfile +++ b/gcc/Pkgfile @@ -5,16 +5,15 @@ # Depends on: zlib libmpc name=gcc -version=5.2.0 -release=2 -source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 - $name-nocheck-fixincludes.patch $name-$version-gnueabihf.patch) +version=7.3.0 +release=1 +source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$version/$name-$version.tar.xz + $name-nocheck-fixincludes.patch) build() { cd $name-$version -# patch -p1 -i $SRC/$name-$version-gnueabihf.patch patch -p1 -i $SRC/$name-nocheck-fixincludes.patch sed -i 's|REVISION|REVISION " (CRUX-ARM)"|' $name/version.c # apply a sed substitution that will suppress the installation of libiberty.a @@ -47,6 +46,14 @@ build() { sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" -i Makefile make + + # prevent libtool from adding host lib paths for relink at install + # based on patch submitted by Vincent Cadet for libtool bug #21455 + # see https://lists.gnu.org/archive/html/bug-libtool/2015-09/msg00012.html + for lt_file in $(find $SRC/build/$CTARGET -name libtool) ; do + sed -i 's/\(add_dir=\"\)\$add_dir \(-L\$inst_prefix_dir\$libdir\"\)/\1\2/' $lt_file + done + make -j1 DESTDIR=$PKG install mkdir $PKG/lib @@ -56,9 +63,14 @@ build() { mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/ - rm $PKG/usr/lib/libstdc++.so.6.0.21-gdb.py - rm -r $PKG/usr/share + rm -r $PKG/usr/share/{info,$name-$version} + rm -r $PKG/usr/bin/*-crux-linux-* rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed} + for D in lib; do + install -d -m 0755 $PKG/usr/share/gdb/auto-load/usr/${D} + mv $PKG/usr/${D}/libstdc++.so.*-gdb.py $PKG/usr/share/gdb/auto-load/usr/${D} + done + sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la} }