Skip to content

Commit

Permalink
GCC13: patch and fix errors and warnings
Browse files Browse the repository at this point in the history
* downgrade fmt 10.0.0 -> 9.1.0
* patch raja for stdexcept and cstdlib
  • Loading branch information
Julien Fausty committed Jul 20, 2023
1 parent ff57a33 commit 05e2192
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ ExternalProject_Add( raja
DEPENDS ${RAJA_DEPENDS}
BUILD_COMMAND ${TPL_BUILD_COMMAND} VERBOSE=1
INSTALL_COMMAND ${TPL_INSTALL_COMMAND}
PATCH_COMMAND patch -p1 < ${TPL_MIRROR_DIR}/raja-stdexcept.patch
COMMAND patch -p1 < ${TPL_MIRROR_DIR}/raja-cstdlib.patch
CMAKE_GENERATOR ${TPL_GENERATOR}
CMAKE_ARGS -D CMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-D CMAKE_CXX_COMPILER:PATH=${CMAKE_CXX_COMPILER}
Expand Down Expand Up @@ -1244,7 +1246,7 @@ endif (ENABLE_CATALYST)
# FMT
################################
set(FMT_DIR "${CMAKE_INSTALL_PREFIX}/fmt")
set(FMT_URL "${TPL_MIRROR_DIR}/fmt-10.0.0.tar.gz")
set(FMT_URL "${TPL_MIRROR_DIR}/fmt-9.1.0.zip")

message(STATUS "Building FMT found at ${FMT_URL}")

Expand Down
3 changes: 0 additions & 3 deletions tplMirror/fmt-10.0.0.tar.gz

This file was deleted.

3 changes: 3 additions & 0 deletions tplMirror/fmt-9.1.0.zip
Git LFS file not shown
31 changes: 31 additions & 0 deletions tplMirror/raja-cstdlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/tpl/camp/include/camp/resource/host.hpp b/tpl/camp/include/camp/resource/host.hpp
index c765175..4c12f98 100644
--- a/tpl/camp/include/camp/resource/host.hpp
+++ b/tpl/camp/include/camp/resource/host.hpp
@@ -11,6 +11,8 @@ http://github.com/llnl/camp
#ifndef __CAMP_HOST_HPP
#define __CAMP_HOST_HPP

+#include <cstdlib>
+
#include "camp/resource/event.hpp"
#include "camp/resource/platform.hpp"

@@ -54,7 +56,7 @@ namespace resources
template <typename T>
T *allocate(size_t n, MemoryAccess = MemoryAccess::Device)
{
- return (T *)malloc(sizeof(T) * n);
+ return (T *)std::malloc(sizeof(T) * n);
}
void *calloc(size_t size, MemoryAccess = MemoryAccess::Device)
{
@@ -62,7 +64,7 @@ namespace resources
this->memset(p, 0, size);
return p;
}
- void deallocate(void *p, MemoryAccess = MemoryAccess::Device) { free(p); }
+ void deallocate(void *p, MemoryAccess = MemoryAccess::Device) { std::free(p); }
void memcpy(void *dst, const void *src, size_t size) { std::memcpy(dst, src, size); }
void memset(void *p, int val, size_t size) { std::memset(p, val, size); }
};
12 changes: 12 additions & 0 deletions tplMirror/raja-stdexcept.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/tpl/camp/include/camp/resource.hpp b/tpl/camp/include/camp/resource.hpp
index 58df206..05c6031 100644
--- a/tpl/camp/include/camp/resource.hpp
+++ b/tpl/camp/include/camp/resource.hpp
@@ -15,6 +15,7 @@ http://github.com/llnl/camp
#include <memory>
#include <mutex>
#include <type_traits>
+#include <stdexcept>

#include "camp/helpers.hpp"
#include "camp/resource/event.hpp"

0 comments on commit 05e2192

Please sign in to comment.