This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Add openSuse AArch64 Triple
ClosedPublic

Authored by cryptoad on Jan 3 2017, 8:51 AM.

Details

Summary

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.

Event Timeline

cryptoad updated this revision to Diff 82899.Jan 3 2017, 8:51 AM
cryptoad retitled this revision from to [Driver] Add openSuse AArch64 Triple.
cryptoad updated this object.
cryptoad added reviewers: chandlerc, bruno, bkramer.
cryptoad added a subscriber: cfe-commits.

Please, add tests to test/Driver.

cryptoad updated this revision to Diff 83376.Jan 6 2017, 9:37 AM

Adding tests to test/Driver.

rengolin added inline comments.Jan 6 2017, 9:40 AM
test/Driver/linux-ld.c
623

shouldn't you have used your triple?

cryptoad added inline comments.Jan 7 2017, 8:18 AM
test/Driver/linux-ld.c
623

The similar Fedora and Ubuntu tests appear to be using an unknown target as well, I based myself on that.

rengolin added inline comments.Jan 7 2017, 10:36 AM
test/Driver/linux-ld.c
623

This is odd... Just be sure the test doesn't pass without your patch.

cryptoad added inline comments.Jan 7 2017, 3:09 PM
test/Driver/linux-ld.c
623

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"
                                ^
<stdin>: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.

rengolin accepted this revision.Jan 9 2017, 1:07 PM
rengolin added a reviewer: rengolin.

Sounds good. Thanks!

This revision is now accepted and ready to land.Jan 9 2017, 1:07 PM
cryptoad marked 4 inline comments as done.Jan 10 2017, 1:09 PM

Thank you for the review Renato!

cryptoad closed this revision.Jan 10 2017, 1:23 PM