- GCC ARM64 Support, i.e. natively compiled with gcc on arm64
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
# ======================================================================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
|
||||
project(fennec)
|
||||
set(FENNEC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
@@ -114,6 +114,7 @@ add_library(fennec STATIC
|
||||
include/fennec/containers/object_pool.h
|
||||
include/fennec/containers/optional.h
|
||||
include/fennec/containers/pair.h
|
||||
include/fennec/containers/priority_queue.h
|
||||
include/fennec/containers/rdtree.h
|
||||
include/fennec/containers/sequence.h
|
||||
include/fennec/containers/set.h
|
||||
@@ -226,6 +227,9 @@ add_library(fennec STATIC
|
||||
include/fennec/langproc/filesystem/file.h source/langproc/filesystem/file.cpp
|
||||
include/fennec/langproc/filesystem/path.h source/langproc/filesystem/path.cpp
|
||||
|
||||
# Compile
|
||||
include/fennec/langproc/compile/tokenizer.h
|
||||
|
||||
|
||||
# PLATFORM =============================================================================================================
|
||||
|
||||
@@ -233,13 +237,13 @@ add_library(fennec STATIC
|
||||
include/fennec/platform/interface/platform.h source/platform/interface/platform.cpp
|
||||
include/fennec/platform/interface/window.h
|
||||
|
||||
# RENDERER =============================================================================================================
|
||||
|
||||
include/fennec/renderers/interface/gfxresourcepool.h
|
||||
|
||||
# EXTRA SOURCES ========================================================================================================
|
||||
|
||||
${FENNEC_EXTRA_SOURCES}
|
||||
include/fennec/renderers/interface/gfxresourcepool.h
|
||||
include/fennec/langproc/format/tokenizer.h
|
||||
include/fennec/containers/priority_queue.h
|
||||
)
|
||||
|
||||
add_dependencies(fennec metaprogramming fennec-dependencies)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
# this script finds the compiler being used
|
||||
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
||||
set(FENNEC_COMPILER "GCC")
|
||||
include("${FENNEC_SOURCE_DIR}/cmake/gcc.cmake")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
# this script sets flags and variables for gnu and gnu-like compilers
|
||||
|
||||
add_compile_options("-mxsave" "-Wall" "-Wextra" "-pedantic" "-Werror")
|
||||
add_compile_options("-Wall" "-Wextra" "-pedantic" "-Werror")
|
||||
|
||||
fennec_add_link_options("-nostdlib" "-fno-exceptions" "-fno-rtti" "-fdiagnostics-all-candidates")
|
||||
|
||||
|
||||
@@ -51,25 +51,25 @@
|
||||
#undef ULLONG_MIN
|
||||
#undef ULLONG_MAX
|
||||
|
||||
#define CHAR_IS_SIGNED true
|
||||
#define CHAR_IS_SIGNED false
|
||||
#define CHAR_ROUNDS 0x0
|
||||
#define CHAR_RADIX_DIG 0x7
|
||||
#define CHAR_RADIX_DIG 0x8
|
||||
#define CHAR_DIG 0x2
|
||||
#define CHAR_DECIMAL_DIG 0x0
|
||||
#define CHAR_RADIX 0x2
|
||||
#define CHAR_TRAPS 0xtrue
|
||||
#define CHAR_MIN 0x80
|
||||
#define CHAR_MAX 0x7f
|
||||
#define CHAR_MIN 0x0
|
||||
#define CHAR_MAX 0xff
|
||||
|
||||
#define WCHAR_IS_SIGNED true
|
||||
#define WCHAR_IS_SIGNED false
|
||||
#define WCHAR_ROUNDS 0x0
|
||||
#define WCHAR_RADIX_DIG 0x1f
|
||||
#define WCHAR_RADIX_DIG 0x20
|
||||
#define WCHAR_DIG 0x9
|
||||
#define WCHAR_DECIMAL_DIG 0x0
|
||||
#define WCHAR_RADIX 0x2
|
||||
#define WCHAR_TRAPS 0xtrue
|
||||
#define WCHAR_MIN 0x80000000
|
||||
#define WCHAR_MAX 0x7fffffff
|
||||
#define WCHAR_MIN 0x0
|
||||
#define WCHAR_MAX 0xffffffff
|
||||
|
||||
#define SCHAR_ROUNDS 0x0
|
||||
#define SCHAR_RADIX_DIG 0x7
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
/// </table>
|
||||
///
|
||||
|
||||
#include <fennec/lang/intrinsics.h>
|
||||
#include <fennec/lang/type_transforms.h>
|
||||
#include <fennec/lang/detail/_type_traits.h>
|
||||
|
||||
@@ -181,7 +182,7 @@ template<typename T> constexpr bool_t is_null_pointer_v = is_null_pointer<T>::va
|
||||
|
||||
// fennec::is_array ====================================================================================================
|
||||
|
||||
#if FENNEC_HAS_BUILTIN_IS_ARRAY
|
||||
#ifdef FENNEC_BUILTIN_IS_ARRAY
|
||||
|
||||
///
|
||||
/// \brief check if \p T is of an array type
|
||||
|
||||
@@ -80,13 +80,13 @@ struct tokenizer {
|
||||
using token = pair<string, uint8_t>;
|
||||
|
||||
private:
|
||||
list<token> operator()(const string& line) {
|
||||
list<token> res;
|
||||
|
||||
for (size_t i = 0; i < )
|
||||
|
||||
return res;
|
||||
}
|
||||
// list<token> operator()(const string& line) {
|
||||
// list<token> res;
|
||||
//
|
||||
// for (size_t i = 0; i < )
|
||||
//
|
||||
// return res;
|
||||
// }
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
project(fennec-metaprogramming)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
@@ -1040,7 +1040,7 @@ bool file::putc(char c) {
|
||||
}
|
||||
|
||||
int res;
|
||||
if ((res = fputc(c, _handle)) != c && res != EOF) {
|
||||
if ((char)(res = fputc(c, _handle)) != c && res != EOF) {
|
||||
_error = strerror(errno);
|
||||
return true;
|
||||
}
|
||||
@@ -1058,7 +1058,7 @@ bool file::putwc(wchar_t c) {
|
||||
}
|
||||
|
||||
int res;
|
||||
if ((res = fputc(c, _handle)) != c && res != EOF) {
|
||||
if ((wchar_t)(res = fputwc(c, _handle)) != c && res != EOF) {
|
||||
_error = strerror(errno);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
project(fennec-test)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#ifndef FENNEC_TEST_LANGPROC_FORMAT_H
|
||||
#define FENNEC_TEST_LANGPROC_FORMAT_H
|
||||
#include <fennec/langproc/format/tokenizer.h>
|
||||
#include <fennec/langproc/compile/tokenizer.h>
|
||||
|
||||
namespace fennec
|
||||
{
|
||||
@@ -40,20 +40,20 @@ namespace test
|
||||
|
||||
inline void fennec_test_langproc_format() {
|
||||
|
||||
tokenizer math = {
|
||||
.delimiter { " " },
|
||||
.operators {"+-/*="},
|
||||
.braces { "()" },
|
||||
.escapes { "" },
|
||||
.terminator { "" },
|
||||
};
|
||||
|
||||
const auto res = math.parse("1 + 2 = 3");
|
||||
fennec_test_run(res.size(), size_t(5));
|
||||
|
||||
for (const auto& token : res) {
|
||||
std::cout << token.second << ", ";
|
||||
}
|
||||
// tokenizer math = {
|
||||
// .delimiter { " " },
|
||||
// .operators {"+-/*="},
|
||||
// .braces { "()" },
|
||||
// .escapes { "" },
|
||||
// .terminator { "" },
|
||||
// };
|
||||
//
|
||||
// const auto res = math.parse("1 + 2 = 3");
|
||||
// fennec_test_run(res.size(), size_t(5));
|
||||
//
|
||||
// for (const auto& token : res) {
|
||||
// std::cout << token.second << ", ";
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user