diff options
author | Jack Lloyd <[email protected]> | 2017-09-21 11:39:32 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-21 11:39:32 -0400 |
commit | a6420db31516405fb410a39830e29bfda3219ed6 (patch) | |
tree | a893e66d82d6af099d637fa5bc55716b9eebe57e | |
parent | bbbc4c59ec85ec912b482afab1eccc0fd3b1f87a (diff) |
Improve support for IBM XLC
A uint128 type is available but is apparently broken, causes
problems with x25519
-rwxr-xr-x | configure.py | 2 | ||||
-rw-r--r-- | news.rst | 2 | ||||
-rw-r--r-- | src/build-data/cc/xlc.txt | 14 | ||||
-rw-r--r-- | src/lib/utils/compiler.h | 2 | ||||
-rw-r--r-- | src/lib/utils/mul128.h | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/configure.py b/configure.py index 8a6eb2ddd..45ff3bc8c 100755 --- a/configure.py +++ b/configure.py @@ -1852,7 +1852,7 @@ class MakefileListsGenerator(object): for t in targets: src_list, src_dir = self._build_paths.src_info(t) src_list.sort() - objects = sorted(self._objectfile_list(src_list, src_dir)) + objects = list(self._objectfile_list(src_list, src_dir)) obj_key = '%s_objs' % (t) out[obj_key] = makefile_list(objects) @@ -163,6 +163,8 @@ Version 2.3.0, Not Yet Released * Fix a bug in FFI tests that caused the test files not to be found when using ``--data-dir`` option (GH #1149) +* Improved support for IBM xlc compiler. + Version 2.2.0, 2017-08-07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt index 55b9e7092..36eaf29d2 100644 --- a/src/build-data/cc/xlc.txt +++ b/src/build-data/cc/xlc.txt @@ -1,4 +1,4 @@ -macro_name IBM_XLC +macro_name XLC binary_name xlC @@ -11,17 +11,19 @@ compile_flags "-c" debug_info_flags "-g" optimization_flags "-O2" -lang_flags "" +lang_flags "-std=c++11" makefile_style gmake <mach_opt> -cellppu -> "-qarch=cell" -ppc970 -> "-qarch=ppc970" -power4 -> "-qarch=pwr4" -power5 -> "-qarch=pwr5" +power8 -> "-qarch=pwr8" +power9 -> "-qarch=pwr9" </mach_opt> +<isa_flags> +altivec -> "-qaltivec" +</isa_flags> + <so_link_commands> default -> "$(CXX) -qmkshrobj" </so_link_commands> diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index 459cb737d..ff7f36571 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -9,7 +9,7 @@ #define BOTAN_UTIL_COMPILER_FLAGS_H_ /* Should we use GCC-style inline assembler? */ -#if !defined(BOTAN_USE_GCC_INLINE_ASM) && defined(__GNUC__) +#if !defined(BOTAN_USE_GCC_INLINE_ASM) && (defined(__GNUC__) || defined(__xlc__)) #define BOTAN_USE_GCC_INLINE_ASM 1 #endif diff --git a/src/lib/utils/mul128.h b/src/lib/utils/mul128.h index ce1ef693b..1e2808254 100644 --- a/src/lib/utils/mul128.h +++ b/src/lib/utils/mul128.h @@ -12,7 +12,7 @@ namespace Botan { -#if defined(__SIZEOF_INT128__) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT) +#if defined(__SIZEOF_INT128__) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT) && !defined(__xlc__) #define BOTAN_TARGET_HAS_NATIVE_UINT128 // Prefer TI mode over __int128 as GCC rejects the latter in pendantic mode |