--- binutils.SlackBuild 2006-04-03 20:38:20.000000000 -0400 +++ binutils.SlackBuild.s390x 2005-12-16 18:57:51.000000000 -0500 @@ -13,7 +13,7 @@ SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" -elif [ "$ARCH" = "s390" ]; then +elif [ "$ARCH" = "s390x" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" @@ -25,7 +25,7 @@ rm -rf binutils-$VERSION tar xjvf $CWD/binutils-$VERSION.tar.bz2 cd binutils-$VERSION -chown -R root:root . +chown -R root.root . find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; @@ -37,14 +37,16 @@ find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; -if [ $ARCH = i386 -o \ +if [ $ARCH = s390x -o \ + $ARCH = i386 -o \ $ARCH = i486 -o \ $ARCH = i586 -o \ $ARCH = i686 ]; then -# Build for an x86 glibc2-based Linux system: +# Build for a glibc2-based Linux system: CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir='${exec_prefix}/lib64' \ --enable-shared \ --enable-targets=$ARCH-slackware-linux,$ARCH-slackware-linux-gnulibc1,$ARCH-slackware-linux-gnuaout \ --enable-64-bit-bfd \ @@ -64,13 +66,14 @@ # Needed to link ksymoops: make install # We need to clear ldscripts/ because binutils doesn't implement DESTDIR everywhere: -rm -rf /usr/lib/ldscripts /usr/${ARCH}-slackware-linux/lib/ldscripts +#rm -rf /usr/lib/ldscripts /usr/${ARCH}-slackware-linux/lib/ldscripts # Repopulate it: make install # Install into the $PKG location: make install DESTDIR=$PKG # Add fresh ldscripts: -cp -a /usr/${ARCH}-slackware-linux/lib/ldscripts $PKG/usr/lib +mkdir -p $PKG/usr/lib/ +cp -a $PKG/usr/${ARCH}-slackware-linux/lib/ldscripts $PKG/usr/lib/ # Missing? cp -a gas/doc/as.1 $PKG/usr/man/man1 @@ -131,6 +134,7 @@ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) +chown -R root.bin $PKG/usr/bin cd $PKG makepkg -l y -c n $TMP/binutils-$VERSION-$ARCH-$BUILD.tgz