File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929#endif
3030
31- #if (defined(STDFLOAT_FLOAT64_NATIVE_TYPE) || (defined(__STDCPP_FLOAT64_T__) && (__STDCPP_FLOAT64_T__ == 1)))
31+ #if (defined(__GNUC__) && defined(__RL78__))
32+
33+ using local_float_type = std::float32_t ;
34+ static_assert ((std::numeric_limits<local_float_type>::digits >= 24 ), " Error: Incorrect local_float_type type definition" );
35+
36+ #elif (defined(STDFLOAT_FLOAT64_NATIVE_TYPE) || (defined(__STDCPP_FLOAT64_T__) && (__STDCPP_FLOAT64_T__ == 1)))
3237
3338using local_float_type = std::float64_t ;
3439static_assert ((std::numeric_limits<local_float_type>::digits >= 53 ), " Error: Incorrect local_float_type type definition" );
Original file line number Diff line number Diff line change 3838 {
3939 const std::uint_fast32_t two_j_plus_one { (j * UINT32_C (2 )) + UINT32_C (1 ) };
4040
41- sum += real_function (a + real_value_type (step * two_j_plus_one));
41+ sum += real_function (a + real_value_type (step * static_cast <real_value_type>( two_j_plus_one) ));
4242 }
4343
4444 const real_value_type tmp { result };
Original file line number Diff line number Diff line change 11///////////////////////////////////////////////////////////////////////////////
2- // Copyright Christopher Kormanyos 2021.
2+ // Copyright Christopher Kormanyos 2021 - 2025 .
33// Distributed under the Boost Software License,
44// Version 1.0. (See accompanying file LICENSE_1_0.txt
55// or copy at http://www.boost.org/LICENSE_1_0.txt)
88#ifndef CINTTYPES_2021_10_19_
99 #define CINTTYPES_2021_10_19_
1010
11+ #if (defined(__GNUC__) && defined(__RL78__))
12+ #include <stdint-gcc.h>
13+ #else
1114 #include <inttypes.h>
15+ #endif
1216 #include <cstdint>
1317
1418 namespace std
Original file line number Diff line number Diff line change 725725 template<typename FloatType>
726726 inline bool isinf_impl(FloatType x)
727727 {
728+ #if defined(__GNUC__)
729+ #pragma GCC diagnostic push
730+ #pragma GCC diagnostic ignored "-Wfloat-equal"
731+ #endif
732+
728733 using float_type = FloatType;
729734
730735 return
731736 (
732737 ( x == std::numeric_limits<float_type>::infinity())
733738 || (-x == std::numeric_limits<float_type>::infinity())
734739 );
740+
741+ #if defined(__GNUC__)
742+ #pragma GCC diagnostic pop
743+ #endif
735744 }
736745
737746 } // namespace cmath_detail
Original file line number Diff line number Diff line change 2626 #define __STDCPP_FLOAT64_T__ 1
2727 #endif
2828
29+ #elif (defined(__GNUC__) && defined(__RL78__))
30+
31+ using float64_t = long double;
32+ #define __STDCPP_FLOAT64_T__ 1
33+
2934 #else
3035
3136 using float64_t = double;
Original file line number Diff line number Diff line change 11/*
2- Copyright Christopher Kormanyos 2007 - 2024 .
2+ Copyright Christopher Kormanyos 2007 - 2025 .
33 Distributed under the Boost Software License,
44 Version 1.0. (See accompanying file LICENSE_1_0.txt
55 or copy at http://www.boost.org/LICENSE_1_0.txt)
66*/
77
8+ INPUT (libc.a libm.a libgcc.a)
9+
810OUTPUT_ARCH(rl78)
911
1012/* The beginning and end of the program ROM area */
Original file line number Diff line number Diff line change 11#
2- # Copyright Christopher Kormanyos 2014 -2024 .
2+ # Copyright Christopher Kormanyos 2014 -2025 .
33# Distributed under the Boost Software License,
44# Version 1.0. (See accompanying file LICENSE_1_0.txt
55# or copy at http://www.boost.org/LICENSE_1_0.txt)
99# compiler flags for the target architecture
1010# ------------------------------------------------------------------------------
1111
12- GCC_VERSION = 13.2 .0
12+ GCC_VERSION = 15.1 .0
1313GCC_TARGET = rl78-unknown-elf
1414GCC_PREFIX = rl78-unknown-elf
1515
@@ -18,21 +18,22 @@ TGT_SUFFIX = elf
1818TGT_ALLFLAGS = -Os \
1919 -mcpu=g13 \
2020 -mmul=g13 \
21- -fno-inline-functions
21+ -fno-inline-functions \
22+ -ffreestanding
2223
23- TGT_CFLAGS = -std=c99 \
24+ TGT_CFLAGS = -std=c11 \
2425 -Wunsuffixed-float-constants \
2526 $(TGT_ALLFLAGS)
2627
27- TGT_CXXFLAGS = -std=c++14 \
28+ TGT_CXXFLAGS = -std=c++20 \
2829 $(TGT_ALLFLAGS)
2930
30- TGT_INCLUDES = -isystem $(PATH_APP)/util/STL
31+ TGT_INCLUDES = -isystem$(PATH_APP)/util/STL
3132
3233TGT_AFLAGS =
3334
3435TGT_LDFLAGS = -nostartfiles \
36+ -nostdlib \
3537 -Wl,--gc-sections \
3638 -Wl,-Map,$(APP).map \
37- -T $(LINKER_DEFINITION_FILE) \
38- --specs=nosys.specs
39+ -T $(LINKER_DEFINITION_FILE)
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ TGT_CXXFLAGS = -std=c++14
3333 -Wno-psabi \
3434 $(TGT_ALLFLAGS)
3535
36- TGT_INCLUDES = -isystem $(PATH_APP)/util/STL
36+ INC_PREFIX := -isystem
37+
38+ TGT_INCLUDES = $(INC_PREFIX)$(PATH_APP)/util/STL
3739
3840TGT_AFLAGS =
3941
You can’t perform that action at this time.
0 commit comments