[PATCH] D68899: llvm/cmake/config.guess: add support for riscv32 and riscv64
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 14 03:56:05 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGde1c2877a9ff: llvm/cmake/config.guess: add support for riscv32 and riscv64 (authored by luismarques).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68899/new/
https://reviews.llvm.org/D68899
Files:
llvm/cmake/config.guess
Index: llvm/cmake/config.guess
===================================================================
--- llvm/cmake/config.guess
+++ llvm/cmake/config.guess
@@ -973,6 +973,30 @@
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ # Do not check for __GLIBC__ because uclibc defines it too
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+
+ # There is no features test macro for musl
+ # Follow the GNU's config.guess approach of
+ # checking the output of ldd
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68899.244615.patch
Type: text/x-patch
Size: 964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/f9f75702/attachment.bin>
More information about the llvm-commits
mailing list