[ox/std] Add gcc library as dependency when building with GCC

This commit is contained in:
Gary Talent 2019-06-14 18:18:33 -05:00
parent 1bf3809b47
commit 2b60c04f1a
2 changed files with 5 additions and 45 deletions

View File

@ -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
$<$<CXX_COMPILER_ID:GNU>:gcc>
)
install(
FILES
assert.hpp

View File

@ -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