X-Git-Url: http://gitweb/?a=blobdiff_plain;f=gcc%2FPkgfile;h=8bddd4719008049f07d94906b874024da53de55e;hb=c95d3400a9c7cbd4b9dc1a115b847ab5671d8d54;hp=7cdd4a2b9f7b72375751a92ccd50d30a698814c5;hpb=8a0f0fa36559a66dfe5e5d6c4dff20cbe5729fcc;p=crossrootfs.git diff --git a/gcc/Pkgfile b/gcc/Pkgfile index 7cdd4a2..8bddd47 100644 --- a/gcc/Pkgfile +++ b/gcc/Pkgfile @@ -5,24 +5,23 @@ # Depends on: zlib libmpc name=gcc -version=4.7.3 +version=5.3.0 release=1 source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 - $name-nocheck-fixincludes.patch $name-$version-gnueabihf.patch) - + $name-nocheck-fixincludes.patch) build() { + patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch 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-ARMHF)"|' $name/version.c - # apply a sed substitutio that will suppress the installation of libiberty.a + sed -i 's|REVISION|REVISION " (CRUX-ARM 64b)"|' $name/version.c + # apply a sed substitution that will suppress the installation of libiberty.a sed 's|install_to_$(INSTALL_DEST) ||' -i libiberty/Makefile.in mkdir $SRC/build cd $SRC/build + export CXXFLAGS="-O2 -pipe" LDFLAGS="-Wl,-rpath-link,$CROSSTOOLS/$CTARGET/lib" \ ../$name-$version/configure --build=$CHOST \ --host=$CTARGET \ @@ -36,17 +35,23 @@ build() { --enable-__cxa_atexit \ --enable-clocale=gnu \ --enable-shared \ - --with-float=hard \ --disable-nls \ --with-x=no \ --with-system-zlib \ - --with-pkgversion="CRUX-ARMHF" + --with-pkgversion="CRUX-ARM 64b" # prevent GCC from looking in the wrong directories for headers and libraries sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" -i Makefile make - make DESTDIR=$PKG install + # 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 ln -sf ../usr/bin/cpp $PKG/lib/cpp @@ -55,9 +60,9 @@ 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.17-gdb.py + rm $PKG/usr/lib64/libstdc++.so.6.0.21-gdb.py rm -r $PKG/usr/share rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed} - sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la} + sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib64/{libstdc++.la,libsupc++.la} }