Skip to content

Commit

Permalink
Add detection for RISCV compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
randombit committed Aug 6, 2018
1 parent 14085fd commit b9aafd6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion configure.py
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions src/build-data/detect_arch.cpp
Expand Up @@ -57,6 +57,14 @@
#elif defined(__s390__)
S390

#elif defined(__riscv)

#if defined(__LP64__)
RISCV64
#else
RISCV32
#endif

#else
UNKNOWN

Expand Down

0 comments on commit b9aafd6

Please sign in to comment.