From 5062e6985e9f3804280b4ae7e84d69914966489d Mon Sep 17 00:00:00 2001 From: Walter Lee Date: Tue, 19 Dec 2017 16:19:11 +0000 Subject: [PATCH] Rename sparc-myriad-elf triplet to sparc-myriad-rtems Summary: This is to be consistent with latest Movidius MDK releases. Also, don't inherit any gcc paths for shave triple. Reviewers: jyknight Subscribers: emaste, fedor.sergeev Differential Revision: https://reviews.llvm.org/D41295 llvm-svn: 321080 --- clang/lib/Driver/ToolChains/Myriad.cpp | 9 +++++---- .../lib/gcc/sparc-myriad-elf/4.8.2/crtbegin.o | 0 .../lib/gcc/sparc-myriad-elf/4.8.2/crtend.o | 0 .../lib/gcc/sparc-myriad-elf/4.8.2/crti.o | 0 .../lib/gcc/sparc-myriad-elf/4.8.2/crtn.o | 0 .../sparc-myriad-elf/lib/crt0.o | 0 .../include/c++/6.3.0}/.keep | 0 clang/test/Driver/myriad-toolchain.c | 16 ++++++++-------- 8 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtbegin.o delete mode 100644 clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtend.o delete mode 100644 clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crti.o delete mode 100644 clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtn.o delete mode 100644 clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-elf/lib/crt0.o rename clang/test/Driver/Inputs/basic_myriad_tree/{sparc-myriad-elf/include/c++/4.8.2 => sparc-myriad-rtems/include/c++/6.3.0}/.keep (100%) diff --git a/clang/lib/Driver/ToolChains/Myriad.cpp b/clang/lib/Driver/ToolChains/Myriad.cpp index 6fdb5a2248dd..06079b109dd1 100644 --- a/clang/lib/Driver/ToolChains/Myriad.cpp +++ b/clang/lib/Driver/ToolChains/Myriad.cpp @@ -199,7 +199,7 @@ void tools::Myriad::Linker::ConstructJob(Compilation &C, const JobAction &JA, } std::string Exec = - Args.MakeArgString(TC.GetProgramPath("sparc-myriad-elf-ld")); + Args.MakeArgString(TC.GetProgramPath("sparc-myriad-rtems-ld")); C.addCommand(llvm::make_unique(JA, *this, Args.MakeArgString(Exec), CmdArgs, Inputs)); } @@ -218,10 +218,11 @@ MyriadToolChain::MyriadToolChain(const Driver &D, const llvm::Triple &Triple, D.Diag(clang::diag::err_target_unsupported_arch) << Triple.getArchName() << "myriad"; LLVM_FALLTHROUGH; + case llvm::Triple::shave: + return; case llvm::Triple::sparc: case llvm::Triple::sparcel: - case llvm::Triple::shave: - GCCInstallation.init(Triple, Args, {"sparc-myriad-elf"}); + GCCInstallation.init(Triple, Args, {"sparc-myriad-rtems"}); } if (GCCInstallation.isValid()) { @@ -231,7 +232,7 @@ MyriadToolChain::MyriadToolChain(const Driver &D, const llvm::Triple &Triple, addPathIfExists(D, CompilerSupportDir, getFilePaths()); } // libstd++ and libc++ must both be found in this one place. - addPathIfExists(D, D.Dir + "/../sparc-myriad-elf/lib", getFilePaths()); + addPathIfExists(D, D.Dir + "/../sparc-myriad-rtems/lib", getFilePaths()); } MyriadToolChain::~MyriadToolChain() {} diff --git a/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtbegin.o b/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtbegin.o deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtend.o b/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtend.o deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crti.o b/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crti.o deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtn.o b/clang/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtn.o deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-elf/lib/crt0.o b/clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-elf/lib/crt0.o deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-elf/include/c++/4.8.2/.keep b/clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/include/c++/6.3.0/.keep similarity index 100% rename from clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-elf/include/c++/4.8.2/.keep rename to clang/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/include/c++/6.3.0/.keep diff --git a/clang/test/Driver/myriad-toolchain.c b/clang/test/Driver/myriad-toolchain.c index 7bd215bf1a48..26b02387093a 100644 --- a/clang/test/Driver/myriad-toolchain.c +++ b/clang/test/Driver/myriad-toolchain.c @@ -1,19 +1,19 @@ -// RUN: %clang -no-canonical-prefixes -### -target sparc-myriad-rtems-elf %s \ +// RUN: %clang -no-canonical-prefixes -### -target sparc-myriad-rtems %s \ // RUN: -ccc-install-dir %S/Inputs/basic_myriad_tree/bin \ // RUN: --gcc-toolchain=%S/Inputs/basic_myriad_tree 2>&1 | FileCheck %s -check-prefix=LINK_WITH_RTEMS // LINK_WITH_RTEMS: Inputs{{.*}}crti.o // LINK_WITH_RTEMS: Inputs{{.*}}crtbegin.o -// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2" -// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/bin/../sparc-myriad-elf/lib" +// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0" +// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/bin/../sparc-myriad-rtems/lib" // LINK_WITH_RTEMS: "--start-group" "-lc" "-lgcc" "-lrtemscpu" "-lrtemsbsp" "--end-group" // LINK_WITH_RTEMS: Inputs{{.*}}crtend.o // LINK_WITH_RTEMS: Inputs{{.*}}crtn.o -// RUN: %clang -c -no-canonical-prefixes -### -target sparc-myriad-rtems-elf -x c++ %s \ +// RUN: %clang -c -no-canonical-prefixes -### -target sparc-myriad-rtems -x c++ %s \ // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/basic_myriad_tree 2>&1 | FileCheck %s -check-prefix=COMPILE_CXX -// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../../../sparc-myriad-elf/include/c++/4.8.2" -// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../../../sparc-myriad-elf/include/c++/4.8.2/sparc-myriad-elf" -// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/../../../../sparc-myriad-elf/include/c++/4.8.2/backward" +// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/../../../../sparc-myriad-rtems/include/c++/6.3.0" +// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/../../../../sparc-myriad-rtems/include/c++/6.3.0/sparc-myriad-rtems" +// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/../../../../sparc-myriad-rtems/include/c++/6.3.0/backward" // RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=SLASH_INCLUDE @@ -85,6 +85,6 @@ // RUN: %clang -### -c -g %s -target sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %s // G_SPARC: "-debug-info-kind=limited" "-dwarf-version=2" -// RUN: %clang -### -c %s -target sparc-myriad-elf -fuse-init-array 2>&1 \ +// RUN: %clang -### -c %s -target sparc-myriad-rtems -fuse-init-array 2>&1 \ // RUN: | FileCheck -check-prefix=USE-INIT-ARRAY %s // USE-INIT-ARRAY-NOT: argument unused