forked from Perl/docker-perl
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDevelPatchPerl.patch
More file actions
71 lines (70 loc) · 2.33 KB
/
Copy pathDevelPatchPerl.patch
File metadata and controls
71 lines (70 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff --git a/hints/linux.sh b/hints/linux.sh
index e1508c7..d5a7f25 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -106,12 +106,29 @@ case "`${cc:-cc} -V 2>&1`" in
'') optimize='-O3' ;;
esac
;;
+
+# the new Intel C/C++ compiler, LLVM based, replaces ICC which
+# is no longer maintained from around October 2023
+*"Intel(R) oneAPI DPC++/C++ Compiler"*)
+ # version from end of first line, like:
+ # Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
+ ccversion=`${cc:-cc} --version | sed -n -e 's/^Intel.*(\(.*\))/\1/p'`
+ # If we're using ICX, we usually want the best performance
+ case "$optimize" in
+ '') optimize='-O3' ;;
+ esac
+ # fp-model defaults to "fast" which mis-handles NaNs
+ ccflags="-fp-model=precise $ccflags"
+ ;;
+
*" Sun "*"C"*)
# Sun's C compiler, which might have a 'tag' name between
# 'Sun' and the 'C': Examples:
# cc: Sun C 5.9 Linux_i386 Patch 124871-01 2007/07/31
# cc: Sun Ceres C 5.10 Linux_i386 2008/07/10
- test "$optimize" || optimize='-xO2'
+ # cc: Studio 12.6 Sun C 5.15 Linux_i386 2017/05/30
+ # GH #21535 - apparent optimization bug in workshop cc
+ test "$optimize" || optimize='-O1'
cccdlflags='-KPIC'
lddlflags='-G -Bdynamic'
# Sun C doesn't support gcc attributes, but, in many cases, doesn't
@@ -123,6 +140,15 @@ case "`${cc:-cc} -V 2>&1`" in
d_attribute_pure='undef'
d_attribute_unused='undef'
d_attribute_warn_unused_result='undef'
+ case "$cc" in
+ *c99) # Without -Xa c99 errors on some Linux system headers
+ # in particular zero sized arrays at the end of structs
+ case "$ccflags" in
+ *-Xa*) ;;
+ *) ccflags="$ccflags -Xa" ;;
+ esac
+ ;;
+ esac
;;
esac
@@ -166,7 +192,7 @@ esac
if [ -x /usr/bin/gcc ] ; then
gcc=/usr/bin/gcc
# clang also provides -print-search-dirs
-elif ${cc:-cc} --version 2>/dev/null | grep -q '^clang ' ; then
+elif ${cc:-cc} --version 2>/dev/null | grep -q -e '^clang version' -e ' clang version'; then
gcc=${cc:-cc}
else
gcc=gcc
@@ -460,3 +486,10 @@ case "$libdb_needs_pthread" in
libswanted="$libswanted pthread"
;;
esac
+
+# Detect case-insensitive file systems
+echo X >UU/casesense.tmp
+if test -f UU/CASESENSE.TMP && test -f UU/CaSeSeNsE.tMp; then
+ firstmakefile='GNUmakefile'
+fi
+rm -f UU/casesense.tmp