aboutsummaryrefslogtreecommitdiff
path: root/games/opendune/gcc10fix.diff
diff options
context:
space:
mode:
Diffstat (limited to 'games/opendune/gcc10fix.diff')
-rw-r--r--games/opendune/gcc10fix.diff27
1 files changed, 27 insertions, 0 deletions
diff --git a/games/opendune/gcc10fix.diff b/games/opendune/gcc10fix.diff
new file mode 100644
index 0000000000000..a5878852f63bb
--- /dev/null
+++ b/games/opendune/gcc10fix.diff
@@ -0,0 +1,27 @@
+diff --git a/config.lib b/config.lib
+index 7824dfc2..757bda4a 100644
+--- a/config.lib
++++ b/config.lib
+@@ -605,7 +605,7 @@ make_compiler_cflags() {
+
+ if [ `basename $1 | cut -c 1-3` = "icc" ]; then
+ # Enable some things only for certain ICC versions
+- cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g`
++ cc_version=`$1 -dumpversion | cut -d. -f 1-2 | sed s@\\\.@@g`
+
+ flags="$flags -rdynamic"
+ ldflags="$ldflags -rdynamic"
+@@ -736,8 +736,11 @@ make_compiler_cflags() {
+ ldflags="$ldflags -rdynamic"
+ else
+ # Enable some things only for certain GCC versions
+- cc_version=`$1 -dumpversion | cut -c 1,3`
+- if [ $(echo -n "$cc_version" | wc -c) -eq 1 ] ; then
++ cc_version=`$1 -dumpversion | cut -d. -f 1-2`
++ if echo "$cc_version" | grep -q '\.' ; then
++ # remove the dot
++ cc_version=`echo "$cc_version" | sed s@\\\.@@g`
++ else
+ # add a 0 if the version had only one digit
+ cc_version="${cc_version}0"
+ fi