-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add loongarch64 support #1565
Add loongarch64 support #1565
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LLVM version needs to be bumped to 16 too before we can enable the build. Also, rust-lang/rust#96971 is still not merged yet, let's at least wait for that so we can build anything at all.
include/ring-core/base.h
Outdated
@@ -83,6 +83,9 @@ | |||
#elif defined(__ARMEL__) || defined(_M_ARM) | |||
#define OPENSSL_32_BIT | |||
#define OPENSSL_ARM | |||
#elif defined(__loongarch64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#elif defined(__loongarch64) | |
#elif defined(__loongarch_lp64) |
mk/cargo.sh
Outdated
@@ -108,6 +108,11 @@ case $target in | |||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="$rustflags_self_contained" | |||
fi | |||
;; | |||
loongarch64-unknown-linux-gnuf64) | |||
export CC_loongarch64_unknown_linux_gnuf64=clang-$llvm_version | |||
export CC_loongarch64_unknown_linux_gnuf64=llvm-ar-$llvm_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to become loongarch64-unknown-linux-gnu
after loongson/LoongArch-Documentation#80.
mk/install-build-tools.sh
Outdated
@@ -72,6 +72,9 @@ case $target in | |||
--target=i686-unknown-linux-musl|--target=x86_64-unknown-linux-musl) | |||
use_clang=1 | |||
;; | |||
--target=loongarch64-unknown-linux-gnuf64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
9c2d122
to
8628219
Compare
RFR, Thanks~ |
mk/cargo.sh
Outdated
loongarch64-unknown-linux-gnu) | ||
export CC_loongarch64_unknown_linux_gnu=clang-$llvm_version | ||
export CC_loongarch64_unknown_linux_gnu=llvm-ar-$llvm_version | ||
export CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNUF64_LINKER=clang-$llvm_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNUF64_LINKER=clang-$llvm_version | |
export CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER=clang-$llvm_version |
8628219
to
d7d319e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the only remaining piece is the $llvm_version
bump. Ideally that should be done for all arches, so you could do it in a separate PR.
@@ -109,6 +109,11 @@ case $target in | |||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="$rustflags_self_contained" | |||
fi | |||
;; | |||
loongarch64-unknown-linux-gnu) | |||
export CC_loongarch64_unknown_linux_gnu=clang-$llvm_version | |||
export CC_loongarch64_unknown_linux_gnu=llvm-ar-$llvm_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export CC_loongarch64_unknown_linux_gnu=llvm-ar-$llvm_version | |
export AR_loongarch64_unknown_linux_gnu=llvm-ar-$llvm_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will create a new PR to do this since I have lost authentication to the current PR repository.
Tracked in new PR: #1632 |
Thanks. I am closing this one. |
No description provided.