add ctyptlib 3.4.5 gcc patch

This commit is contained in:
Mario Fetka 2023-01-15 11:48:41 +01:00
parent 96cc06302b
commit d9c7e0dc04

View File

@ -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