Index: test/Driver/hexagon-toolchain-elf.c =================================================================== --- test/Driver/hexagon-toolchain-elf.c +++ test/Driver/hexagon-toolchain-elf.c @@ -57,69 +57,69 @@ // ----------------------------------------------------------------------------- // Test -mcpu= -mv // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // 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|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v4/crt0 +// 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=hexagon-link \ // 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|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v5/crt0 +// 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=hexagon-link \ // 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|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v55/crt0 +// 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=hexagon-link \ // 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|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0 +// 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=hexagon-link \ // 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|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v62/crt0 +// 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=hexagon-link \ // 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|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v65/crt0 +// 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=hexagon-link \ // 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|ld}} +// CHECK026: hexagon-link -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -O3 -ffp-contract=off \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK027 %s // CHECK027-NOT: "-ffp-contract=fast" -// CHECK027: {{hexagon-link|ld}} +// CHECK027: hexagon-link // ----------------------------------------------------------------------------- // Test Linker related args @@ -128,13 +128,13 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Defaults for C // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK030 %s // CHECK030: "-cc1" -// CHECK030: {{hexagon-link|ld}} +// CHECK030-NEXT: hexagon-link // CHECK030-NOT: "-static" // CHECK030-NOT: "-shared" // CHECK030: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" @@ -149,13 +149,13 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Defaults for C++ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK031 %s // CHECK031: "-cc1" -// CHECK031: {{hexagon-link|ld}} +// CHECK031-NEXT: hexagon-link // CHECK031-NOT: "-static" // CHECK031-NOT: "-shared" // CHECK031: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" @@ -171,14 +171,14 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Additional Libraries (-L) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -Lone -L two -L three \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK032 %s // CHECK032: "-cc1" -// CHECK032: {{hexagon-link|ld}} +// CHECK032-NEXT: hexagon-link // CHECK032-NOT: "-static" // CHECK032-NOT: "-shared" // CHECK032: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" @@ -194,14 +194,14 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // -static, -shared // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -static \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK033 %s // CHECK033: "-cc1" -// CHECK033: {{hexagon-link|ld}} +// CHECK033-NEXT: hexagon-link // CHECK033: "-static" // CHECK033: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" // CHECK033: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0.o" @@ -212,14 +212,14 @@ // 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=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -shared \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK034 %s // CHECK034: "-cc1" -// CHECK034: {{hexagon-link|ld}} +// CHECK034-NEXT: hexagon-link // CHECK034: "-shared" "-call_shared" // CHECK034-NOT: crt0_standalone.o // CHECK034-NOT: crt0.o @@ -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=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -shared \ @@ -243,7 +243,7 @@ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK035 %s // CHECK035: "-cc1" -// CHECK035: {{hexagon-link|ld}} +// CHECK035-NEXT: hexagon-link // CHECK035: "-shared" "-call_shared" "-static" // CHECK035-NOT: crt0_standalone.o // CHECK035-NOT: crt0.o @@ -262,14 +262,14 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // -nostdlib, -nostartfiles, -nodefaultlibs // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -nostdlib \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK036 %s // CHECK036: "-cc1" -// CHECK036: {{hexagon-link|ld}} +// CHECK036-NEXT: hexagon-link // CHECK036-NOT: crt0_standalone.o // CHECK036-NOT: crt0.o // CHECK036-NOT: init.o @@ -285,14 +285,14 @@ // CHECK036-NOT: "--end-group" // CHECK036-NOT: fini.o -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -nostartfiles \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK037 %s // CHECK037: "-cc1" -// CHECK037: {{hexagon-link|ld}} +// CHECK037-NEXT: hexagon-link // CHECK037-NOT: crt0_standalone.o // CHECK037-NOT: crt0.o // CHECK037-NOT: init.o @@ -308,14 +308,14 @@ // CHECK037: "--end-group" // CHECK037-NOT: fini.o -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -nodefaultlibs \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK038 %s // CHECK038: "-cc1" -// CHECK038: {{hexagon-link|ld}} +// CHECK038-NEXT: hexagon-link // CHECK038: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" // CHECK038: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0.o" // CHECK038: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/init.o" @@ -334,14 +334,14 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // -moslib // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -moslib=first -moslib=second \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK039 %s // CHECK039: "-cc1" -// CHECK039: {{hexagon-link|ld}} +// CHECK039-NEXT: hexagon-link // CHECK039-NOT: "-static" // CHECK039-NOT: "-shared" // CHECK039-NOT: crt0_standalone.o @@ -356,14 +356,14 @@ // 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=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -moslib=first -moslib=second -moslib=standalone \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK03A %s // CHECK03A: "-cc1" -// CHECK03A: {{hexagon-link|ld}} +// CHECK03A-NEXT: hexagon-link // CHECK03A-NOT: "-static" // CHECK03A-NOT: "-shared" // CHECK03A: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" @@ -381,7 +381,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Other args to pass to linker // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// RUN: %clangxx -### -target hexagon-unknown-elf \ +// RUN: %clangxx -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -s \ @@ -392,7 +392,7 @@ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK03B %s // CHECK03B: "-cc1" -// CHECK03B: {{hexagon-link|ld}} +// CHECK03B-NEXT: hexagon-link // CHECK03B: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0_standalone.o" // CHECK03B: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/crt0.o" // CHECK03B: "{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v60/init.o" @@ -410,16 +410,16 @@ // ----------------------------------------------------------------------------- // pic, small data threshold // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // 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: {{hexagon-link|ld}} +// CHECK040-NEXT: hexagon-link // CHECK040-NOT: "-G{{[0-9]+}}" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -fpic \ @@ -435,24 +435,24 @@ // CHECK041-NOT: "-mrelocation-model" "static" // CHECK041: "-pic-level" "{{[12]}}" // CHECK041: "-mllvm" "-hexagon-small-data-threshold=0" -// CHECK041: {{hexagon-link|ld}} +// CHECK041-NEXT: hexagon-link // CHECK041: "-G0" // RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ -// RUN: -mcpu=hexagonv60 \ +// RUN: -mcpu=hexagonv60 -fuse-ld=hexagon-link \ // RUN: -G=8 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK042 %s // RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ -// RUN: -mcpu=hexagonv60 \ +// RUN: -mcpu=hexagonv60 -fuse-ld=hexagon-link \ // RUN: -G 8 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK042 %s // RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ -// RUN: -mcpu=hexagonv60 \ +// RUN: -mcpu=hexagonv60 -fuse-ld=hexagon-link \ // RUN: -msmall-data-threshold=8 \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK042 %s @@ -461,30 +461,30 @@ // CHECK042: "-mllvm" "-hexagon-small-data-threshold=8" // CHECK042-NEXT: llvm-mc // CHECK042: "-gpsize=8" -// CHECK042: {{hexagon-link|ld}} +// CHECK042-NEXT: hexagon-link // CHECK042: "-G8" // ----------------------------------------------------------------------------- // pie // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -pie \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK050 %s // CHECK050: "-cc1" -// CHECK050: {{hexagon-link|ld}} +// CHECK050-NEXT: hexagon-link // CHECK050: "-pie" -// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: %clang -### -target hexagon-unknown-elf -fuse-ld=hexagon-link \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv60 \ // RUN: -pie -shared \ // RUN: %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK051 %s // CHECK051: "-cc1" -// CHECK051 {{hexagon-link|ld}} +// CHECK051-NEXT: hexagon-link // CHECK051-NOT: "-pie" // ----------------------------------------------------------------------------- @@ -492,7 +492,7 @@ // ----------------------------------------------------------------------------- // RUN: %clang -### -target hexagon-unknown-elf -fno-integrated-as \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ -// RUN: -mcpu=hexagonv60 \ +// RUN: -mcpu=hexagonv60 -fuse-ld=hexagon-link \ // RUN: -gdwarf-2 \ // RUN: -Wa,--noexecstack,--trap \ // RUN: -Xassembler --keep-locals \ @@ -501,7 +501,7 @@ // CHECK060: "-cc1" // CHECK060-NEXT: llvm-mc // CHECK060: "--noexecstack" "--trap" "--keep-locals" -// CHECK060 {{hexagon-link|ld}} +// CHECK060-NEXT: hexagon-link // ----------------------------------------------------------------------------- // ffixed-r19 Index: test/Driver/linux-ld.c =================================================================== --- test/Driver/linux-ld.c +++ test/Driver/linux-ld.c @@ -876,10 +876,10 @@ // // 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: %clang %s -### -o %t.o -fuse-ld=hexagon-link 2>&1 \ // RUN: --target=hexagon-linux-gnu \ // RUN: | FileCheck --check-prefix=CHECK-HEXAGON %s -// CHECK-HEXAGON: "{{.*}}{{hexagon-link|ld}}{{(.exe)?}}" +// CHECK-HEXAGON: "{{.*}}hexagon-link{{(.exe)?}}" // CHECK-HEXAGON-NOT: "--hash-style={{gnu|both}}" // // Check that we do not pass --hash-style=gnu and --hash-style=both to linker