summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/linux-ld.c
diff options
context:
space:
mode:
authorJiading Gai <jiading.gai@gmail.com>2018-07-24 06:07:22 +0000
committerJiading Gai <jiading.gai@gmail.com>2018-07-24 06:07:22 +0000
commit4a2879bd5a6904dbabad67429ad9b0527eb1cbd2 (patch)
tree5888de12adc561808306374e12c28c2304b80449 /clang/test/Driver/linux-ld.c
parent52854504cc868abed7cdfd7e22a1f51d334e6aed (diff)
downloadbcm5719-llvm-4a2879bd5a6904dbabad67429ad9b0527eb1cbd2.tar.gz
bcm5719-llvm-4a2879bd5a6904dbabad67429ad9b0527eb1cbd2.zip
For x86_64, gcc 7.2 under Amazon Linux AMI sets its path to x86_64-amazon-linux.
gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux. Adding this triple to the list of search, plus a test case to cover this. The patch fixes the following bug reported in bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35992 Reviewers: echristo Differential Revision: https://reviews.llvm.org/D46230 llvm-svn: 337811
Diffstat (limited to 'clang/test/Driver/linux-ld.c')
-rw-r--r--clang/test/Driver/linux-ld.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index 02bb88266c4..02e6618a046 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -1792,3 +1792,25 @@
// CHECK-LD-RHLE7-DTS: Selected GCC installation: [[GCC_INSTALL:[[SYSROOT]]/lib/gcc/x86_64-redhat-linux/7]]
// CHECK-LD-RHEL7-DTS-NOT: /usr/bin/ld
// CHECK-LD-RHLE7-DTS: [[GCC_INSTALL]/../../../bin/ld
+
+// Check whether gcc7 install works fine on Amazon Linux AMI
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-amazon-linux -rtlib=libgcc \
+// RUN: --gcc-toolchain="" \
+// RUN: --sysroot=%S/Inputs/ami_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LD-AMI %s
+// CHECK-LD-AMI-NOT: warning:
+// CHECK-LD-AMI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-LD-AMI: "--eh-frame-hdr"
+// CHECK-LD-AMI: "-m" "elf_x86_64"
+// CHECK-LD-AMI: "-dynamic-linker"
+// CHECK-LD-AMI: "{{.*}}/usr/lib/gcc/x86_64-amazon-linux/7{{/|\\\\}}crtbegin.o"
+// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7"
+// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7/../../../../lib64"
+// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7/../../.."
+// CHECK-LD-AMI: "-L[[SYSROOT]]/lib"
+// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib"
+// CHECK-LD-AMI: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// CHECK-LD-AMI: "-lc"
+// CHECK-LD-AMI: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+//
OpenPOWER on IntegriCloud