diff options
author | Jack Lloyd <[email protected]> | 2018-08-06 13:27:41 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-06 13:27:41 -0400 |
commit | b9aafd67002be96bf00eea4e7791804693ba4b1f (patch) | |
tree | 36732b8d39b9ba874f8ffa9efdaefaefac6c2e83 | |
parent | 14085fd7922103714d4f3f8e2a244eaf1cd30371 (diff) |
Add detection for RISCV compilers
-rwxr-xr-x | configure.py | 5 | ||||
-rw-r--r-- | src/build-data/detect_arch.cpp | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/configure.py b/configure.py index b1a988bdb..55bbe5d27 100755 --- a/configure.py +++ b/configure.py @@ -2950,7 +2950,10 @@ def check_compiler_arch(options, ccinfo, archinfo, source_paths): abi_flags = ccinfo.mach_abi_link_flags(options).split(' ') cc_output = run_compiler_preproc(options, ccinfo, detect_version_source, 'UNKNOWN', abi_flags).lower() - if cc_output in ['', 'unknown']: + if cc_output == '': + cc_output = run_compiler_preproc(options, ccinfo, detect_version_source, 'UNKNOWN').lower() + + if cc_output == 'unknown': logging.warning('Unable to detect target architecture via compiler macro checks') return None diff --git a/src/build-data/detect_arch.cpp b/src/build-data/detect_arch.cpp index f5e6ecd58..028e39b3b 100644 --- a/src/build-data/detect_arch.cpp +++ b/src/build-data/detect_arch.cpp @@ -57,6 +57,14 @@ #elif defined(__s390__) S390 +#elif defined(__riscv) + + #if defined(__LP64__) + RISCV64 + #else + RISCV32 + #endif + #else UNKNOWN |