From 2b60c04f1a18907a52cd4aef6291301b698d0c28 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 14 Jun 2019 18:18:33 -0500 Subject: [PATCH] [ox/std] Add gcc library as dependency when building with GCC --- deps/ox/src/ox/std/CMakeLists.txt | 6 ++++- deps/ox/src/ox/std/arith.cpp | 44 ------------------------------- 2 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 deps/ox/src/ox/std/arith.cpp diff --git a/deps/ox/src/ox/std/CMakeLists.txt b/deps/ox/src/ox/std/CMakeLists.txt index d945d5ba..8d2629f7 100644 --- a/deps/ox/src/ox/std/CMakeLists.txt +++ b/deps/ox/src/ox/std/CMakeLists.txt @@ -1,6 +1,5 @@ add_library( OxStd - arith.cpp assert.cpp buildinfo.cpp byteswap.cpp @@ -19,6 +18,11 @@ set_property( POSITION_INDEPENDENT_CODE ON ) +target_link_libraries( + OxStd PUBLIC + $<$:gcc> +) + install( FILES assert.hpp diff --git a/deps/ox/src/ox/std/arith.cpp b/deps/ox/src/ox/std/arith.cpp deleted file mode 100644 index ac641188..00000000 --- a/deps/ox/src/ox/std/arith.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 - 2018 gtalent2@gmail.com - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "hardware.hpp" - -// these provide software implementations of arithmetic operators expected by -// the compiler on older processors - -#if !OX_HW_DIV - -extern "C" { - -unsigned __aeabi_uldivmod(unsigned, unsigned) { - return 0; -} - -unsigned __aeabi_uidiv(unsigned, unsigned) { - return 0; -} - -unsigned __aeabi_uimod(unsigned, unsigned) { - return 0; -} - -unsigned __aeabi_uidivmod(unsigned, unsigned) { - return 0; -} - -signed __aeabi_idiv(signed, signed) { - return 0; -} - -signed __aeabi_imod(signed, signed) { - return 0; -} - -} - -#endif