From d9c7e0dc04d9a12af44b8129e5a1d759cd8e1930 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sun, 15 Jan 2023 11:48:41 +0100 Subject: [PATCH] add ctyptlib 3.4.5 gcc patch --- cryptlib/gccversion-345.patch | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cryptlib/gccversion-345.patch diff --git a/cryptlib/gccversion-345.patch b/cryptlib/gccversion-345.patch new file mode 100644 index 0000000..4d97861 --- /dev/null +++ b/cryptlib/gccversion-345.patch @@ -0,0 +1,33 @@ +--- cl-original/tools/ccopts.sh 2019-11-23 17:03:39.315504598 +0100 ++++ cl-testpatch/tools/ccopts.sh 2020-01-22 18:49:01.093189548 +0100 +@@ -508,10 +508,17 @@ + # apparent version less than 10 we add a trailing zero to the string to make + # the checks that follow work. + +-GCC_VER="$($CC -dumpversion | tr -d '.' | cut -c 1-2)" +-if [ "$GCC_VER" -lt 10 ] ; then +- GCC_VER="${GCC_VER}0" ; +-fi ++GCC_VER="$($CC -dumpversion)" ++case $GCC_VER in ++ [0-9]) ++ GCC_VER="${GCC_VER}0" ;; ++ ++ [0-9][0-9]*) ++ GCC_VER="$(echo $GCC_VER | tr -d '.' | cut -c 1-3)" ;; ++ ++ *) ++ GCC_VER="$(echo $GCC_VER | tr -d '.' | cut -c 1-2)" ;; ++esac + + # Try and determine the CPU type. This is made more complex by a pile of + # *BSE's which, along with antideluvian tools like an as that doesn't +@@ -606,7 +613,7 @@ + CCARGS="$CCARGS -march=pentium" ;; + esac ; + else +- CCARGS="$CCARGS -mcpu=pentium" ; ++ CCARGS="$CCARGS -march=native" ; + fi ; + fi +