From 9c3cc6a8a51c4c4f01be7149d8522a713df2149a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 29 Dec 2024 10:48:41 +0100 Subject: Enable mingw/gcc build --- src/configure.cc | 4 ++-- src/tools.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/configure.cc b/src/configure.cc index d2c1053..da5dbfd 100644 --- a/src/configure.cc +++ b/src/configure.cc @@ -27,7 +27,7 @@ const std::filesystem::path configHeaderFile("config.h"); std::map external_includedir; std::map external_libdir; -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(__MINGW32__) const ctor::configuration& __attribute__((weak)) ctor::get_configuration() #else const ctor::configuration& default_get_configuration() @@ -49,7 +49,7 @@ const ctor::configuration& default_get_configuration() } return cfg; } -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__MINGW32__) // Hack to make ctor::get_configuration "weak" linked // See: // https://stackoverflow.com/questions/2290587/gcc-style-weak-linking-in-visual-studio diff --git a/src/tools.cc b/src/tools.cc index 7f16a0e..4ae5f37 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -418,7 +418,7 @@ std::string get_arch([[maybe_unused]] ctor::output_system system) { std::string arch; // TODO popen on windows -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(__MINGW32__) std::string cmd; const auto& c = ctor::get_configuration(); switch(system) -- cgit v1.2.3