This follows v1.00 of the [[ https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html | LoongArch Toolchain Conventions ]], but notably with [[ https://github.com/loongson/LoongArch-Documentation/pull/80 | this patch ]] applied (a proper version bump to v2.00 was not done, so it is indistinguishable from the "original" but now incompatible v1.00 otherwise). Only `loongarch64` is implemented in `Linux::getMultiarchTriple` because support for LA32 and ILP32* ABIs are incomplete right now. The Debian sysroot layout is based on Han Gao's recent porting effort, specifically the ghcr.io/rabenda/beige:loong64-v23-preview-20230330 container image. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D142688
54 lines
2.8 KiB
C
54 lines
2.8 KiB
C
// RUN: %clang --target=loongarch32-unknown-elf %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32D %s
|
|
// RUN: %clang --target=loongarch32-unknown-elf %s -fsyntax-only -### -mabi=ilp32s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32S %s
|
|
// RUN: %clang --target=loongarch32-unknown-elf %s -fsyntax-only -### -mabi=ilp32f 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32F %s
|
|
// RUN: %clang --target=loongarch32-unknown-elf %s -fsyntax-only -### -mabi=ilp32d 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32D %s
|
|
|
|
// RUN: %clang --target=loongarch64-unknown-elf %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64D %s
|
|
// RUN: %clang --target=loongarch64-unknown-elf %s -fsyntax-only -### -mabi=lp64s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64S %s
|
|
// RUN: %clang --target=loongarch64-unknown-elf %s -fsyntax-only -### -mabi=lp64f 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64F %s
|
|
// RUN: %clang --target=loongarch64-unknown-elf %s -fsyntax-only -### -mabi=lp64d 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64D %s
|
|
|
|
// RUN: %clang --target=loongarch32-linux-gnusf %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32S %s
|
|
// RUN: %clang --target=loongarch32-linux-gnuf32 %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32F %s
|
|
// RUN: %clang --target=loongarch32-linux-gnuf64 %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32D %s
|
|
// RUN: %clang --target=loongarch32-linux-gnu %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32D %s
|
|
|
|
// RUN: %clang --target=loongarch64-linux-gnusf %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64S %s
|
|
// RUN: %clang --target=loongarch64-linux-gnuf32 %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64F %s
|
|
// RUN: %clang --target=loongarch64-linux-gnuf64 %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64D %s
|
|
// RUN: %clang --target=loongarch64-linux-gnu %s -fsyntax-only -### 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64D %s
|
|
|
|
// Check that -mabi prevails in case of conflicts with the triple-implied ABI.
|
|
// RUN: %clang --target=loongarch32-linux-gnuf64 %s -fsyntax-only -### -mabi=ilp32s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32S %s
|
|
// RUN: %clang --target=loongarch64-linux-gnuf64 %s -fsyntax-only -### -mabi=lp64s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64S %s
|
|
// RUN: %clang --target=loongarch32-linux-gnu %s -fsyntax-only -### -mabi=ilp32s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=ILP32S %s
|
|
// RUN: %clang --target=loongarch64-linux-gnu %s -fsyntax-only -### -mabi=lp64s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=LP64S %s
|
|
|
|
// ILP32S: "-target-abi" "ilp32s"
|
|
// ILP32F: "-target-abi" "ilp32f"
|
|
// ILP32D: "-target-abi" "ilp32d"
|
|
|
|
// LP64S: "-target-abi" "lp64s"
|
|
// LP64F: "-target-abi" "lp64f"
|
|
// LP64D: "-target-abi" "lp64d"
|