summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2018-04-15 11:59:50 +0000
committer Eric Hameleers <alien@slackware.com>2018-04-15 11:59:50 +0000
commitc42db5eefdb623570dcee08871d2dd4f4d60aa06 (patch)
tree210502ab08980d073987da52b2a97a7b0e901674
parent886e8e205c57215b9e947e0d0478114eec721841 (diff)
downloadmultilib-c42db5eefdb623570dcee08871d2dd4f4d60aa06.tar.gz
multilib-c42db5eefdb623570dcee08871d2dd4f4d60aa06.tar.xz
gcc-multilib: sync with new Slackware SlackBuild template
-rwxr-xr-xsource/current/gcc/gcc-multilib.SlackBuild19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/current/gcc/gcc-multilib.SlackBuild b/source/current/gcc/gcc-multilib.SlackBuild
index ecd3926..ed7e45a 100755
--- a/source/current/gcc/gcc-multilib.SlackBuild
+++ b/source/current/gcc/gcc-multilib.SlackBuild
@@ -57,6 +57,8 @@
# package for Slackware's 'gc' package and install that. If you do not want
# this, then change "--enable-objc-gc \" to "--disable-objc-gc \" below.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=gcc
VERSION=${VERSION:-7.3.0}
BUILD=${BUILD:-1alien}
@@ -80,6 +82,20 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "gcc-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ echo "gcc-g++-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ echo "gcc-gfortran-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ echo "gcc-gnat-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ echo "gcc-objc-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ echo "gcc-go-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ echo "gcc-brig-${VERSION}_multilib-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
SLKLDFLAGS=""
@@ -127,7 +143,6 @@ case "$ARCH" in
*) TARGET=$ARCH-slackware-linux ;;
esac
-CWD=$(pwd)
# Temporary build location. This should *NOT* be a directory
# path a non-root user could create later...
TMP=${TMP:-"/gcc-$(mcookie)"}
@@ -495,6 +510,7 @@ tar xvf $CWD/gcc-$VERSION.tar.xz || exit 1
# Strip bloated binaries and libraries:
( cd $PKG1
find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
+ find . -name "lib*so*" -exec patchelf --remove-rpath "{}" \;
find . -name "lib*a" -exec strip -g "{}" \;
strip --strip-unneeded usr/bin/* 2> /dev/null
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -613,6 +629,7 @@ tar xvf $CWD/gcc-$VERSION.tar.xz || exit 1
# Ordinarily Slackware doesn't package static libraries, but in this case
# it is useful for deploying compiled binaries on machines that do not yet
# have libgo.so.0.0.0.
+ #rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.a
mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.a usr/lib${LIBDIRSUFFIX}
if [ "$ARCH" = "x86_64" ]; then
mkdir -p usr/lib