From fea536eea4d53096eebf664a9b52e22dba38fa99 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 10 Sep 2018 13:33:24 -0400
Subject: [PATCH] P4 to Git Change 1603633 by lmoriche@lmoriche_opencl_dev2 on
2018/09/10 13:24:30
SWDEV-1 - Cleanups required to build with gcc-5.4
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#100 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#85 edit
... //depot/stg/opencl/drivers/opencl/support/libcxx/build/Makefile.libcxx#7 edit
---
rocclr/runtime/device/pal/palprintf.cpp | 6 +++---
rocclr/runtime/device/rocm/roccompiler.cpp | 1 +
rocclr/runtime/device/rocm/rocdevice.cpp | 2 +-
rocclr/runtime/device/rocm/rocprogram.cpp | 1 +
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/rocclr/runtime/device/pal/palprintf.cpp b/rocclr/runtime/device/pal/palprintf.cpp
index 085cb1bb70..c1b761f65e 100644
--- a/rocclr/runtime/device/pal/palprintf.cpp
+++ b/rocclr/runtime/device/pal/palprintf.cpp
@@ -11,7 +11,7 @@
#include "device/pal/palprintf.hpp"
#include
#include
-#include
+#include
namespace pal {
@@ -275,13 +275,13 @@ size_t PrintfDbg::outputArgument(const std::string& fmt, bool printFloat, size_t
}
float fArg = *(reinterpret_cast(argument));
float fSign = copysign(1.0, fArg);
- if (isinf(fArg) && !isnan(fArg)) {
+ if (std::isinf(fArg) && !std::isnan(fArg)) {
if (fSign < 0) {
amd::Os::printf(fmtF.data(), "-infinity");
} else {
amd::Os::printf(fmtF.data(), "infinity");
}
- } else if (isnan(fArg)) {
+ } else if (std::isnan(fArg)) {
if (fSign < 0) {
amd::Os::printf(fmtF.data(), "-nan");
} else {
diff --git a/rocclr/runtime/device/rocm/roccompiler.cpp b/rocclr/runtime/device/rocm/roccompiler.cpp
index 8400a979a0..c1011b7d35 100644
--- a/rocclr/runtime/device/rocm/roccompiler.cpp
+++ b/rocclr/runtime/device/rocm/roccompiler.cpp
@@ -17,6 +17,7 @@
#endif // defined(WITH_LIGHTNING_COMPILER)
#include "utils/options.hpp"
#include
+#include
#if defined(ATI_OS_LINUX)
#include
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index 4cd6ab352b..6707c1c689 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -438,7 +438,7 @@ bool Device::init() {
if (!roc_device) {
LogError("Error creating new instance of Device on then heap.");
- return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
+ return false;
}
uint32_t pci_id;
diff --git a/rocclr/runtime/device/rocm/rocprogram.cpp b/rocclr/runtime/device/rocm/rocprogram.cpp
index 17f2240594..7c950fb54f 100644
--- a/rocclr/runtime/device/rocm/rocprogram.cpp
+++ b/rocclr/runtime/device/rocm/rocprogram.cpp
@@ -24,6 +24,7 @@
#include
#include
#include
+#include
namespace roc {