[cfe-commits] [PATCH] [5/6] Hexagon TC: add cc1 defaults for hexagon-gcc, compatibility

Matthew Curtis mcurtis at codeaurora.org
Mon Sep 24 07:46:37 PDT 2012


Fixed a trailing whitespace issue.

Matthew C.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

-------------- next part --------------
>From 79d3950e3c06bf865d3bf79ad41b68129d74cace 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 ac8d672..2e9f75d 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1204,9 +1204,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