From 55e61ee466192c72872f96ad1fc80b878cd61bad Mon Sep 17 00:00:00 2001 From: khronosschoty Date: Fri, 23 Feb 2018 23:40:10 +0000 Subject: [PATCH] development/gcclegacy494: Updated for version 4.9.4. Signed-off-by: David Spencer --- development/gcclegacy494/gcclegacy494.SlackBuild | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/development/gcclegacy494/gcclegacy494.SlackBuild b/development/gcclegacy494/gcclegacy494.SlackBuild index af99b1cd71..38d8570f56 100644 --- a/development/gcclegacy494/gcclegacy494.SlackBuild +++ b/development/gcclegacy494/gcclegacy494.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=gcclegacy494 VERSION=${VERSION:-4.9.4} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} INSTLOC=${INSTLOC:-/opt/$PRGNAM} @@ -118,12 +118,15 @@ find -L . \ cp -v gcc/Makefile.in{,.orig} sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in -# Apply patches if we are compiling against glibc 2.26 -if [ "$(ldd --version | head -1)" = 'ldd (GNU libc) 2.26' ]; then +# Apply patches if we are compiling against glibc version greater than 2.23 +minor="$(ldd --version | head -1 | sed -e 's/.*2\.//')" +if [ "$minor" -gt "23" ]; then patch -p1 -i "$CWD/942-asan-fix-missing-include-signal-h.patch" patch -p1 -i "$CWD/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch" patch -p1 -i "$CWD/944-sanitizer-linux.patch" - export glibcxx_cv_c99_math=yes + if [ "$minor" -ge "26" ]; then + export glibcxx_cv_c99_math=yes + fi fi rm -rf $TMP/objdir