[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
cryptoad marked 4 inline comments as done. cryptoad added a comment. Thank you for the review Renato! https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
rengolin accepted this revision. rengolin added a reviewer: rengolin. rengolin added a comment. This revision is now accepted and ready to land. Sounds good. Thanks! https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
cryptoad added inline comments. Comment at: test/Driver/linux-ld.c:623 +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=arm64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ rengolin wrote: > cryptoad wrote: > > rengolin wrote: > > > shouldn't you have used your triple? > > The similar Fedora and Ubuntu tests appear to be using an unknown target as > > well, I based myself on that. > This is odd... Just be sure the test doesn't pass without your patch. Confirming that without the patch the test fails, with the following (slightly sanitized) output: ``` Command Output (stderr): -- [...]/llvm/tools/clang/test/Driver/linux-ld.c:633:33: error: expected string not found in input // CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|}}crt1.o" ^ :6:127: note: scanning from here "/usr/bin/ld" "--sysroot=[...]/llvm/tools/clang/test/Driver/Inputs/opensuse_42.2_aarch64_tree" " -z" "relro" "--hash-style=gnu" "--eh-frame-hdr" "-m" "aarch64linux" "-dynamic-linker" "/lib/ld-linux-aarch64.so.1" "-o" "[...]/llvm-build/clang/tools/clang/test/Driver/Output/linux-ld.c.tmp.o" "crt1.o" "crti.o" "crtbegin.o" "/tmp /lit_tmp_V096EA/linux-ld-7a7333.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no -as-needed" "crtend.o" "crtn.o" ``` Tests pass with the patch. https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
rengolin added inline comments. Comment at: test/Driver/linux-ld.c:623 +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=arm64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ cryptoad wrote: > rengolin wrote: > > shouldn't you have used your triple? > The similar Fedora and Ubuntu tests appear to be using an unknown target as > well, I based myself on that. This is odd... Just be sure the test doesn't pass without your patch. https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
cryptoad added inline comments. Comment at: test/Driver/linux-ld.c:623 +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=arm64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ rengolin wrote: > shouldn't you have used your triple? The similar Fedora and Ubuntu tests appear to be using an unknown target as well, I based myself on that. https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
rengolin added inline comments. Comment at: test/Driver/linux-ld.c:623 +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=arm64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ shouldn't you have used your triple? https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
cryptoad updated this revision to Diff 83376. cryptoad added a comment. Adding tests to test/Driver. https://reviews.llvm.org/D28238 Files: lib/Driver/ToolChains.cpp test/Driver/Inputs/opensuse_42.2_aarch64_tree/ test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/ test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/ test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/ test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/ test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/ test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o test/Driver/linux-ld.c Index: test/Driver/linux-ld.c === --- test/Driver/linux-ld.c +++ test/Driver/linux-ld.c @@ -618,6 +618,26 @@ // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64" // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64" // +// Check openSuse Leap 42.2 on AArch64 +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=arm64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \ +// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \ +// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|}}crt1.o" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|}}crti.o" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|}}crtbegin.o" +// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8" +// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|}}crtend.o" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|}}crtn.o" +// // Check dynamic-linker for different archs // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=arm-linux-gnueabi \ Index: lib/Driver/ToolChains.cpp === --- lib/Driver/ToolChains.cpp +++ lib/Driver/ToolChains.cpp @@ -1531,7 +1531,7 @@ static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-linux-android", - "aarch64-redhat-linux"}; + "aarch64-redhat-linux", "aarch64-suse-linux"}; static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu"}; Index: test/Driver/linux-ld.c === --- test/Driver/linux-ld.c +++ test/Driver/linux-ld.c @@ -618,6 +618,26 @@ // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64" // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64" // +// Check openSuse Leap 42.2 on AArch64 +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=arm64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \ +// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \ +// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|}}crt1.o" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|}}crti.o" +// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|}}crtbegin.o" +// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8" +// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64" +//
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
rengolin added a comment. Please, add tests to test/Driver. https://reviews.llvm.org/D28238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D28238: [Driver] Add openSuse AArch64 Triple
cryptoad created this revision. cryptoad added reviewers: chandlerc, bruno, bkramer. cryptoad added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. openSuse has AArch64 support, with images running on the Raspberry Pi 3. The libraries and headers live under the aarch64-suse-linux subdirectory, which is currently not in the AArch64 triples list. Address this by adding the corresponding string to AArch64Triples. https://reviews.llvm.org/D28238 Files: lib/Driver/ToolChains.cpp Index: lib/Driver/ToolChains.cpp === --- lib/Driver/ToolChains.cpp +++ lib/Driver/ToolChains.cpp @@ -1531,7 +1531,7 @@ static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-linux-android", - "aarch64-redhat-linux"}; + "aarch64-redhat-linux", "aarch64-suse-linux"}; static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu"}; Index: lib/Driver/ToolChains.cpp === --- lib/Driver/ToolChains.cpp +++ lib/Driver/ToolChains.cpp @@ -1531,7 +1531,7 @@ static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-linux-android", - "aarch64-redhat-linux"}; + "aarch64-redhat-linux", "aarch64-suse-linux"}; static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu"}; ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits