aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-22 15:15:19 -0500
committerJack Lloyd <[email protected]>2017-01-22 15:15:19 -0500
commit8775c0ad6887d39e620191a758a44d86b07449b2 (patch)
tree4be2d72b04301490d4c5fa7ab441584875e225fa /src/build-data
parentc58b07498a1fbd3678ede3006dc55502e1d862aa (diff)
Fix configure.py error when compiler doesn't support desired ISA flags
Seen with rarely tested compilers (Sun Studio, Intel, ...) that we are missing info for. Previously this led to a hard error which is pointless. Instead just disable the relevant module and warn the user that something was disabled, if they want to go look into why. Remove bogus clmul entry in x86_64 - actually we lump both AES and CLMUL flags under the same ISA ("aesni") since all known CPUs support either both or neither. Caught by new configure warning. Add Sun Studio ISA flags from GH #846
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/arch/x86_64.txt1
-rw-r--r--src/build-data/cc/sunstudio.txt15
2 files changed, 15 insertions, 1 deletions
diff --git a/src/build-data/arch/x86_64.txt b/src/build-data/arch/x86_64.txt
index b5010867d..33d9f5bd5 100644
--- a/src/build-data/arch/x86_64.txt
+++ b/src/build-data/arch/x86_64.txt
@@ -43,7 +43,6 @@ sse4.1
sse4.2
avx2
aesni
-clmul
rdrand
rdseed
sha
diff --git a/src/build-data/cc/sunstudio.txt b/src/build-data/cc/sunstudio.txt
index 9ace5107c..2a392a442 100644
--- a/src/build-data/cc/sunstudio.txt
+++ b/src/build-data/cc/sunstudio.txt
@@ -54,3 +54,18 @@ linux -> "-library=stlport4"
sparc64 -> "-xarch=v9"
x86_64 -> "-m64"
</mach_abi_linking>
+
+<isa_flags>
+# Botan needs C++11, and that requires Sun Studio 12.4 or above.
+# Sun Studio 12.4 supports upto -xarch=avx2, but the processor must support it
+# AESNI requires -xarch=aes, and RDRAND requires -xarch=avx_i.
+# https://docs.oracle.com/cd/E37069_01/html/E37074/bjapp.html#OSSCGbkazd
+sse2 -> "-xarch=sse2"
+ssse3 -> "-xarch=ssse3"
+sse4.1 -> "-xarch=sse4_1"
+sse4.2 -> "-xarch=sse4_2"
+aesni -> "-xarch=aes"
+avx -> "-xarch=avx"
+rdrand -> "-xarch=avx_i"
+avx2 -> "-xarch=avx2"
+</isa_flags>