[cfe-commits] [PATCH] [5/6] Hexagon TC: add cc1 defaults for hexagon-gcc, compatibility
Matthew Curtis
mcurtis at codeaurora.org
Fri Nov 16 11:06:55 PST 2012
Refreshing patch against current trunk.
Matthew Curtis.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
-------------- next part --------------
>From 7f9e403fb99e01b7ba0847607aa02e2a3d6a3ee5 Mon Sep 17 00:00:00 2001
From: Matthew Curtis <mcurtis at codeaurora.org>
Date: Fri, 14 Sep 2012 12:32:41 -0500
Subject: [PATCH 5/6] Hexagon TC: add cc1 defaults for hexagon-gcc
compatibility
---
lib/Driver/Tools.cpp | 5 ++---
test/Driver/hexagon-toolchain.c | 13 +++++++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index fde84a4..ee5334f 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1254,9 +1254,8 @@ void Clang::AddHexagonTargetArgs(const ArgList &Args,
"hexagon"
+ toolchains::Hexagon_TC::GetTargetCPU(Args)));
CmdArgs.push_back("-fno-signed-char");
-
- if (Args.hasArg(options::OPT_mqdsp6_compat))
- CmdArgs.push_back("-mqdsp6-compat");
+ CmdArgs.push_back("-mqdsp6-compat");
+ CmdArgs.push_back("-Wreturn-type");
std::string SmallDataThreshold = GetHexagonSmallDataThresholdValue(Args);
if (!SmallDataThreshold.empty()) {
diff --git a/test/Driver/hexagon-toolchain.c b/test/Driver/hexagon-toolchain.c
index 0940b7b..c903dbd 100644
--- a/test/Driver/hexagon-toolchain.c
+++ b/test/Driver/hexagon-toolchain.c
@@ -518,3 +518,16 @@
// CHECK027-NEXT: "[[GNU_DIR:.*]]/bin/hexagon-as"
// CHECK027-NEXT: "[[GNU_DIR]]/bin/hexagon-ld"
// CHECK027-NOT: "-pie"
+
+// -----------------------------------------------------------------------------
+// Misc Defaults
+// -----------------------------------------------------------------------------
+// RUN: %clang -### -target hexagon-unknown-linux \
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
+// RUN: %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK028 %s
+// CHECK028: "{{.*}}clang" "-cc1"
+// CHECK028: "-mqdsp6-compat"
+// CHECK028: "-Wreturn-type"
+// CHECK028-NEXT: "[[GNU_DIR:.*]]/bin/hexagon-as"
+// CHECK028-NEXT: "[[GNU_DIR]]/bin/hexagon-ld"
--
1.7.8.3
More information about the cfe-commits
mailing list