phosek created this revision. phosek added reviewers: sidneym, rsmith. Herald added a subscriber: cfe-commits.
Hexagon relies on hexagon-link so invoke Clang to -fuse-ld=ld to always use the default linker, otherwise tests break when the Clang default linker is set to anything other than default. Repository: rC Clang https://reviews.llvm.org/D53249 Files: clang/test/Driver/hexagon-toolchain-elf.c clang/test/Driver/linux-ld.c
Index: clang/test/Driver/linux-ld.c =================================================================== --- clang/test/Driver/linux-ld.c +++ clang/test/Driver/linux-ld.c @@ -877,7 +877,7 @@ // Check that we do not pass --hash-style=gnu or --hash-style=both to // hexagon linux linker // RUN: %clang %s -### -o %t.o 2>&1 \ -// RUN: --target=hexagon-linux-gnu \ +// RUN: --target=hexagon-linux-gnu -fuse-ld=ld \ // RUN: | FileCheck --check-prefix=CHECK-HEXAGON %s // CHECK-HEXAGON: "{{.*}}hexagon-link{{(.exe)?}}" // CHECK-HEXAGON-NOT: "--hash-style={{gnu|both}}" Index: clang/test/Driver/hexagon-toolchain-elf.c =================================================================== --- clang/test/Driver/hexagon-toolchain-elf.c +++ clang/test/Driver/hexagon-toolchain-elf.c @@ -57,63 +57,63 @@ // ----------------------------------------------------------------------------- // Test -mcpu=<cpuname> -mv<number> // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv4 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK020 %s // CHECK020: "-cc1" {{.*}} "-target-cpu" "hexagonv4" // CHECK020: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v4/crt0 -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv5 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK021 %s // CHECK021: "-cc1" {{.*}} "-target-cpu" "hexagonv5" // CHECK021: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v5/crt0 -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv55 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK022 %s // CHECK022: "-cc1" {{.*}} "-target-cpu" "hexagonv55" // CHECK022: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v55/crt0 -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK023 %s // CHECK023: "-cc1" {{.*}} "-target-cpu" "hexagonv60" // CHECK023: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0 -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv62 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK024 %s // CHECK024: "-cc1" {{.*}} "-target-cpu" "hexagonv62" // CHECK024: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v62/crt0 -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv65 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK025 %s // CHECK025: "-cc1" {{.*}} "-target-cpu" "hexagonv65" // CHECK025: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v65/crt0 -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -O3 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK026 %s // CHECK026-NOT: "-ffp-contract=fast" // CHECK026: hexagon-link -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -O3 -ffp-contract=off \ // RUN: %s 2>&1 \ @@ -128,7 +128,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Defaults for C // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: %s 2>&1 \ @@ -149,7 +149,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Defaults for C++ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: %s 2>&1 \ @@ -171,7 +171,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Additional Libraries (-L) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -Lone -L two -L three \ @@ -194,7 +194,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // -static, -shared // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -static \ @@ -212,7 +212,7 @@ // CHECK033: "--start-group" "-lstandalone" "-lc" "-lgcc" "--end-group" // CHECK033: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/fini.o" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -shared \ @@ -235,7 +235,7 @@ // CHECK034: "--end-group" // CHECK034: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/G0/pic/finiS.o" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -shared \ @@ -262,7 +262,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // -nostdlib, -nostartfiles, -nodefaultlibs // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -nostdlib \ @@ -285,7 +285,7 @@ // CHECK036-NOT: "--end-group" // CHECK036-NOT: fini.o -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -nostartfiles \ @@ -308,7 +308,7 @@ // CHECK037: "--end-group" // CHECK037-NOT: fini.o -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -nodefaultlibs \ @@ -334,7 +334,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // -moslib // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -moslib=first -moslib=second \ @@ -356,7 +356,7 @@ // CHECK039: "-lc" "-lgcc" "--end-group" // CHECK039: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/fini.o" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -moslib=first -moslib=second -moslib=standalone \ @@ -381,7 +381,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Other args to pass to linker // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -s \ @@ -410,22 +410,22 @@ // ----------------------------------------------------------------------------- // pic, small data threshold // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK040 %s // CHECK040: "-cc1" // CHECK040-NEXT: hexagon-link // CHECK040-NOT: "-G{{[0-9]+}}" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -fpic \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK041 %s -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -fPIC \ @@ -438,19 +438,19 @@ // CHECK041-NEXT: hexagon-link // CHECK041: "-G0" -// RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -G=8 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK042 %s -// RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -G 8 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK042 %s -// RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -msmall-data-threshold=8 \ @@ -467,7 +467,7 @@ // ----------------------------------------------------------------------------- // pie // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -pie \ @@ -477,7 +477,7 @@ // CHECK050-NEXT: hexagon-link // CHECK050: "-pie" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -pie -shared \ @@ -490,7 +490,7 @@ // ----------------------------------------------------------------------------- // Test Assembler related args // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=ld -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -gdwarf-2 \
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits