mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
development/gcc5: Speed up find/chmod.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
69e67750d4
commit
151eceb506
4 changed files with 29 additions and 28 deletions
|
@ -1,24 +1,25 @@
|
||||||
This gcc5 package can be installed alongside Slackware's gcc-7 packages.
|
This gcc5 package can be installed alongside Slackware's gcc-11
|
||||||
These version 7 compilers can sometimes be quite a bit more strict about
|
packages. These version 11 compilers can sometimes be quite a bit
|
||||||
what they accept as valid code. As a consequence, you will regularly run
|
more strict about what they accept as valid code. As a consequence,
|
||||||
into compilation issues with software. Not just the software made with
|
you will regularly run into compilation issues with software. Not just
|
||||||
the scripts on slackbuilds.org, but also some of the software in
|
the software made with the scripts on slackbuilds.org, but also some
|
||||||
the Slackware core distribution requires patches in order to get them
|
of the software in the Slackware core distribution requires patches in
|
||||||
to compile.
|
order to get them to compile.
|
||||||
|
|
||||||
Still having the gcc version 5 compilers can sometimes be a lifesaver.
|
Still having the gcc version 5 compilers can sometimes be a lifesaver.
|
||||||
Particulars of the gcc5 package:
|
Particulars of the gcc5 package:
|
||||||
- The gcc5 binaries were given a suffix '-5' to make them stand apart
|
- The gcc5 binaries were given a suffix '-5' to make them stand apart
|
||||||
from Slackware's default compilers.
|
from Slackware's default compilers.
|
||||||
- The gcc5 package only contains the C, C++ and Java language compilers.
|
- The gcc5 package only contains the C, C++ and Java compilers.
|
||||||
- One all-encompassing package is built by the SlackBuild script.
|
- One all-encompassing package is built by the SlackBuild script.
|
||||||
- Profile scripts are added to /etc/profile.d/. You can 'source'
|
- Profile scripts are added to /etc/profile.d/. You can 'source'
|
||||||
the profile script to prefer the gcc-5 compilers over gcc-7.
|
the profile script to prefer the gcc-5 compilers over gcc-7.
|
||||||
- On 64bit Slackware, the gcc5.SlackBuild will detect an existing gcc
|
- On 64bit Slackware, the gcc5.SlackBuild will detect an existing gcc
|
||||||
multilib compiler and will then build a multilib capable gcc5.
|
multilib compiler and will then build a multilib capable gcc5.
|
||||||
If you run pure 64bit Slackware, then a pure 64bit gcc5 package is built.
|
If you run pure 64bit Slackware, then a pure 64bit gcc5 package is
|
||||||
|
built.
|
||||||
|
|
||||||
How to use these gcc5 compilers instead of Slackware's default C and C++?
|
How to use these gcc5 compilers instead of Slackware's default ones?
|
||||||
Simple:
|
Simple:
|
||||||
In your console or terminal, you 'source' the provided profile script,
|
In your console or terminal, you 'source' the provided profile script,
|
||||||
like this (a c-shell compatible script is available as well):
|
like this (a c-shell compatible script is available as well):
|
||||||
|
@ -26,8 +27,9 @@ like this (a c-shell compatible script is available as well):
|
||||||
source /etc/profile.d/gcc5.sh
|
source /etc/profile.d/gcc5.sh
|
||||||
|
|
||||||
The command 'source' is equivalent to the dot command ' . '.
|
The command 'source' is equivalent to the dot command ' . '.
|
||||||
The profile script will (re-)define the common variables that are used
|
The profile script will (re-)define the common variables that are
|
||||||
by make and other programs to determine which binary to run as the compiler:
|
used by make and other programs to determine which binary to run as
|
||||||
|
the compiler:
|
||||||
|
|
||||||
export CC=gcc-5
|
export CC=gcc-5
|
||||||
export CPP=cpp-5
|
export CPP=cpp-5
|
||||||
|
@ -38,9 +40,9 @@ export RANLIB=gcc-ranlib-5
|
||||||
|
|
||||||
Nothing else needs to be done after sourcing the profile script.
|
Nothing else needs to be done after sourcing the profile script.
|
||||||
All you do next is run your compile job as usual in that same console.
|
All you do next is run your compile job as usual in that same console.
|
||||||
Your program will be compiled with the binaries provided by the gcc5 package.
|
Your program will be compiled with the binaries provided by the gcc5
|
||||||
|
package.
|
||||||
** WARNING:
|
|
||||||
** The temporary build location used by the script (defaulting here to /tmp/SBo)
|
|
||||||
** should *NOT* be a directory path a non-root user could create later...
|
|
||||||
|
|
||||||
|
** WARNING: The temporary build location used by the script
|
||||||
|
** (defaulting here to /tmp/SBo) should *NOT* be a directory path a
|
||||||
|
** non-root user could create later...
|
||||||
|
|
|
@ -169,7 +169,7 @@ if [ ${MULTILIB} = "YES" ]; then
|
||||||
else
|
else
|
||||||
SLDESC=""
|
SLDESC=""
|
||||||
fi
|
fi
|
||||||
cat $CWD/slack-desc.gcc5 | sed -e "s/@MULTILIB@/${SLDESC}/" \
|
cat $CWD/slack-desc | sed -e "s/@MULTILIB@/${SLDESC}/" \
|
||||||
> $PKG/install/slack-desc
|
> $PKG/install/slack-desc
|
||||||
|
|
||||||
# Unpack the gcc sources:
|
# Unpack the gcc sources:
|
||||||
|
@ -222,10 +222,10 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
|
||||||
|
|
||||||
# Fix perms/owners
|
# Fix perms/owners
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find . -perm 777 -exec chmod 755 {} \;
|
find . -perm 777 -exec chmod 755 {} \+
|
||||||
find . -perm 775 -exec chmod 755 {} \;
|
find . -perm 775 -exec chmod 755 {} \+
|
||||||
find . -perm 754 -exec chmod 755 {} \;
|
find . -perm 754 -exec chmod 755 {} \+
|
||||||
find . -perm 664 -exec chmod 644 {} \;
|
find . -perm 664 -exec chmod 644 {} \+
|
||||||
mkdir -p $PKG/usr/doc/gcc-$VERSION
|
mkdir -p $PKG/usr/doc/gcc-$VERSION
|
||||||
cp -a \
|
cp -a \
|
||||||
COPYING* ChangeLog* INSTALL \
|
COPYING* ChangeLog* INSTALL \
|
||||||
|
@ -331,9 +331,9 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find . \
|
find . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||||
-exec chmod 755 {} \; -o \
|
-exec chmod 755 {} \+ -o \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
-exec chmod 644 {} \;
|
-exec chmod 644 {} \+
|
||||||
for patch in $CWD/fastjar-patches/* ; do
|
for patch in $CWD/fastjar-patches/* ; do
|
||||||
cat $patch | patch -p1 --verbose || exit 1
|
cat $patch | patch -p1 --verbose || exit 1
|
||||||
done
|
done
|
||||||
|
@ -573,8 +573,8 @@ cat $CWD/libgcj-5.pc \
|
||||||
|
|
||||||
## Strip bloated binaries and libraries:
|
## Strip bloated binaries and libraries:
|
||||||
( cd $PKG
|
( cd $PKG
|
||||||
find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
|
find . -name "lib*so*" -exec strip --strip-unneeded "{}" \+
|
||||||
find . -name "lib*a" -exec strip -g "{}" \;
|
find . -name "lib*a" -exec strip -g "{}" \+
|
||||||
strip --strip-unneeded usr/bin/* 2> /dev/null
|
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
|
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
|
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||||
|
|
|
@ -14,4 +14,3 @@ MD5SUM_x86_64=""
|
||||||
REQUIRES=""
|
REQUIRES=""
|
||||||
MAINTAINER="Eric Hameleers"
|
MAINTAINER="Eric Hameleers"
|
||||||
EMAIL="alien@slackware.com"
|
EMAIL="alien@slackware.com"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,6 @@ gcc5: This package contains those parts of the compiler collection needed to
|
||||||
gcc5: compile C and C++ code and programs written in the Java programming
|
gcc5: compile C and C++ code and programs written in the Java programming
|
||||||
gcc5: language.@MULTILIB@
|
gcc5: language.@MULTILIB@
|
||||||
gcc5:
|
gcc5:
|
||||||
gcc5: This gcc5 package must be co-installed with Slackware's gcc7 compiler.
|
gcc5: This gcc5 package must be co-installed with Slackware's gcc11 compiler.
|
||||||
gcc5:
|
gcc5:
|
||||||
gcc5:
|
gcc5:
|
Loading…
Reference in a new issue