diff --git a/kconfigs/Kconfig.features b/kconfigs/Kconfig.features index d149f38fd2a9..487dce9968e3 100644 --- a/kconfigs/Kconfig.features +++ b/kconfigs/Kconfig.features @@ -22,6 +22,11 @@ config HAS_ARCH_32BIT help Indicates that the CPU has a 32-bits architecture. +config HAS_ARCH_64BIT + bool + help + Indicates that the CPU has a 64-bits architecture. + config HAS_ARCH_ARM bool help diff --git a/pkg/ccn-lite/patches/0007-print-fix-for-64-bit.patch b/pkg/ccn-lite/patches/0007-print-fix-for-64-bit.patch new file mode 100644 index 000000000000..edcd2d82571f --- /dev/null +++ b/pkg/ccn-lite/patches/0007-print-fix-for-64-bit.patch @@ -0,0 +1,25 @@ +From 5bdce82958a7fa1596f69ac4ed75948e8bfdb83b Mon Sep 17 00:00:00 2001 +From: Frederik Haxel +Date: Mon, 14 Aug 2023 14:53:59 +0200 +Subject: [PATCH] print fix for 64-bit native + +--- + src/ccnl-riot/src/ccn-lite-riot.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ccnl-riot/src/ccn-lite-riot.c b/src/ccnl-riot/src/ccn-lite-riot.c +index fde0a44..0ddb488 100644 +--- a/src/ccnl-riot/src/ccn-lite-riot.c ++++ b/src/ccnl-riot/src/ccn-lite-riot.c +@@ -278,7 +278,7 @@ int + ccnl_app_RX(struct ccnl_relay_s *ccnl, struct ccnl_content_s *c) + { + (void) ccnl; +- DEBUGMSG(DEBUG, "Received something of size %u for the application\n", c->pkt->contlen); ++ DEBUGMSG(DEBUG, "Received something of size %u for the application\n", (unsigned)c->pkt->contlen); + + gnrc_pktsnip_t *pkt= gnrc_pktbuf_add(NULL, c->pkt->content, + c->pkt->contlen, +-- +2.34.1 + diff --git a/pkg/cifra/Kconfig b/pkg/cifra/Kconfig index 7f1b4400debb..279f3ec5f280 100644 --- a/pkg/cifra/Kconfig +++ b/pkg/cifra/Kconfig @@ -8,7 +8,7 @@ config PACKAGE_CIFRA bool "Cifra cryptographic primitives" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT help Cifra is a collection of cryptographic primitives targeted at embedded use. diff --git a/pkg/cifra/Makefile.dep b/pkg/cifra/Makefile.dep index 57d8d54026fe..bbb39611d8b1 100644 --- a/pkg/cifra/Makefile.dep +++ b/pkg/cifra/Makefile.dep @@ -1,2 +1,2 @@ # Cifra is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/cn-cbor/Kconfig b/pkg/cn-cbor/Kconfig index 89d0c8af9b5a..1c6a3ecc8b6e 100644 --- a/pkg/cn-cbor/Kconfig +++ b/pkg/cn-cbor/Kconfig @@ -8,7 +8,7 @@ config PACKAGE_CN-CBOR bool "Constrained Node CBOR" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT select MODULE_POSIX_HEADERS help A constrained node implementation of CBOR in C. diff --git a/pkg/cn-cbor/Makefile.dep b/pkg/cn-cbor/Makefile.dep index d2baa35dfe2b..ff9e6dbea54f 100644 --- a/pkg/cn-cbor/Makefile.dep +++ b/pkg/cn-cbor/Makefile.dep @@ -1,4 +1,4 @@ USEMODULE += posix_headers # CN-CBOR is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/flashdb/Makefile.dep b/pkg/flashdb/Makefile.dep index 98f771e1a2cd..e85e9b7ac89d 100644 --- a/pkg/flashdb/Makefile.dep +++ b/pkg/flashdb/Makefile.dep @@ -1,5 +1,5 @@ # FlashDB is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit CFLAGS += -DFDB_USING_NATIVE_ASSERT ifneq (,$(filter flashdb_tsdb,$(USEMODULE))) diff --git a/pkg/flashdb/patches/0002-64bit-fix.patch b/pkg/flashdb/patches/0002-64bit-fix.patch new file mode 100644 index 000000000000..58a879669592 --- /dev/null +++ b/pkg/flashdb/patches/0002-64bit-fix.patch @@ -0,0 +1,25 @@ +From e51bbd7efb1d01f052efef756a0a7423d7b8078a Mon Sep 17 00:00:00 2001 +From: Frederik Haxel +Date: Mon, 14 Aug 2023 17:26:11 +0200 +Subject: [PATCH] 64bit fix + +--- + src/fdb_kvdb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fdb_kvdb.c b/src/fdb_kvdb.c +index 393c463..7905fda 100644 +--- a/src/fdb_kvdb.c ++++ b/src/fdb_kvdb.c +@@ -341,7 +341,7 @@ static fdb_err_t read_kv(fdb_kvdb_t db, fdb_kv_t kv) + kv->status = (fdb_kv_status_t) _fdb_get_status(kv_hdr.status_table, FDB_KV_STATUS_NUM); + kv->len = kv_hdr.len; + +- if (kv->len == ~0UL || kv->len > db_max_size(db) || kv->len < KV_HDR_DATA_SIZE) { ++ if (kv->len == UINT32_MAX || kv->len > db_max_size(db) || kv->len < KV_HDR_DATA_SIZE) { + /* the KV length was not write, so reserved the info for current KV */ + kv->len = KV_HDR_DATA_SIZE; + if (kv->status != FDB_KV_ERR_HDR) { +-- +2.34.1 + diff --git a/pkg/hacl/Kconfig b/pkg/hacl/Kconfig index 162edb9b8cf9..e15e9e0e5d08 100644 --- a/pkg/hacl/Kconfig +++ b/pkg/hacl/Kconfig @@ -9,4 +9,4 @@ config PACKAGE_HACL bool "High Assurance Cryptographic Library package" depends on TEST_KCONFIG depends on MODULE_RANDOM - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT diff --git a/pkg/hacl/Makefile.dep b/pkg/hacl/Makefile.dep index f9aabaca2e9e..4d3de698e326 100644 --- a/pkg/hacl/Makefile.dep +++ b/pkg/hacl/Makefile.dep @@ -1,4 +1,4 @@ USEMODULE+=random # HACL is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/hacl/patches/0003-64-bit-fix.patch b/pkg/hacl/patches/0003-64-bit-fix.patch new file mode 100644 index 000000000000..64be9a564c6a --- /dev/null +++ b/pkg/hacl/patches/0003-64-bit-fix.patch @@ -0,0 +1,25 @@ +From 286677362a0f78f799e71e12614f72c02b007640 Mon Sep 17 00:00:00 2001 +From: Frederik Haxel +Date: Mon, 14 Aug 2023 17:32:51 +0200 +Subject: [PATCH] 64 bit fix + +--- + haclnacl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/haclnacl.c b/haclnacl.c +index 072a2db..e7c25e7 100644 +--- a/haclnacl.c ++++ b/haclnacl.c +@@ -149,7 +149,7 @@ int crypto_box(unsigned char *cipher, const unsigned char *msg, unsigned long lo + return crypto_box_easy(cipher, (unsigned char *)msg, msg_len - 32, (unsigned char *)nonce, (unsigned char *)pk, (unsigned char *)sk); + } + +-int crypto_box_open(uint8_t *msg, const uint8_t *cipher, uint64_t cipher_len, const uint8_t *nonce, const uint8_t *pk, const uint8_t *sk){ ++int crypto_box_open(unsigned char *msg, const unsigned char *cipher, unsigned long long cipher_len, const unsigned char *nonce, const unsigned char *pk, const unsigned char *sk){ + return crypto_box_open_easy(msg, cipher, cipher_len - 32, nonce, pk, sk); + } + +-- +2.34.1 + diff --git a/pkg/jerryscript/Kconfig b/pkg/jerryscript/Kconfig index c753a5882a65..9de6349ba5a6 100644 --- a/pkg/jerryscript/Kconfig +++ b/pkg/jerryscript/Kconfig @@ -8,7 +8,7 @@ config PACKAGE_JERRYSCRIPT bool "Ultra-lightweight Javascript interpreter" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT select MODULE_JERRYSCRIPT-PORT-DEFAULT select MODULE_JERRYSCRIPT-EXT diff --git a/pkg/jerryscript/Makefile.dep b/pkg/jerryscript/Makefile.dep index 6a37b67a1b85..5c9e84348354 100644 --- a/pkg/jerryscript/Makefile.dep +++ b/pkg/jerryscript/Makefile.dep @@ -2,4 +2,4 @@ USEMODULE += jerryscript-port-default USEMODULE += jerryscript-ext # Jerryscript is only supported by 32-bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/libhydrogen/Kconfig b/pkg/libhydrogen/Kconfig index 5bace30062bd..a539125cda04 100644 --- a/pkg/libhydrogen/Kconfig +++ b/pkg/libhydrogen/Kconfig @@ -9,4 +9,4 @@ config PACKAGE_LIBHYDROGEN bool "LibHydrogen Crypto Library package" depends on TEST_KCONFIG depends on MODULE_RANDOM - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT diff --git a/pkg/libhydrogen/Makefile.dep b/pkg/libhydrogen/Makefile.dep index caba98824efa..ba806eab6bce 100644 --- a/pkg/libhydrogen/Makefile.dep +++ b/pkg/libhydrogen/Makefile.dep @@ -3,4 +3,4 @@ USEMODULE += random # libhydrogen is only supported by 32 bit architectures # AVR boards: require avr-gcc >= 7.0 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040) # MSP430 boards: invalid alignment of 'hydro_random_context' -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/lorabasics/Makefile.dep b/pkg/lorabasics/Makefile.dep index 08222d5ccd7c..afc70f28db57 100644 --- a/pkg/lorabasics/Makefile.dep +++ b/pkg/lorabasics/Makefile.dep @@ -7,5 +7,5 @@ ifneq (,$(filter lorabasics_sx1280_driver,$(USEMODULE))) USEMODULE += lorabasics_driver_sx1280_hal endif # This package has assumptions that only work for 32-bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit USEMODULE += lorabasics_smtc_ral diff --git a/pkg/lua/Kconfig b/pkg/lua/Kconfig index 66422b3f26bb..925c5a62ab8b 100644 --- a/pkg/lua/Kconfig +++ b/pkg/lua/Kconfig @@ -8,7 +8,7 @@ config PACKAGE_LUA bool "LUA language package" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT depends on !HAS_ARCH_RISCV depends on !MODULE_PICOLIBC diff --git a/pkg/lua/Makefile.dep b/pkg/lua/Makefile.dep index d2cab70e557a..62104e0b47cf 100644 --- a/pkg/lua/Makefile.dep +++ b/pkg/lua/Makefile.dep @@ -3,7 +3,7 @@ USEMODULE += lua-contrib USEMODULE += printf_float # LUA is only supported by 32-bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit # LUA is not supported on RISCV because of build issues with the toolchain # (undefined reference to _times, _unlink and _link functions in provided diff --git a/pkg/lwip/Makefile.dep b/pkg/lwip/Makefile.dep index 29a1089e9e11..5be5109d8ba9 100644 --- a/pkg/lwip/Makefile.dep +++ b/pkg/lwip/Makefile.dep @@ -1,6 +1,6 @@ # lwIP's memory management doesn't seem to work on non 32-bit platforms at the # moment. -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit DEFAULT_MODULE += auto_init_lwip diff --git a/pkg/lwip/Makefile.include b/pkg/lwip/Makefile.include index c2fac0ad53ab..f5292f97a69d 100644 --- a/pkg/lwip/Makefile.include +++ b/pkg/lwip/Makefile.include @@ -17,6 +17,11 @@ PSEUDOMODULES += lwip_udp PSEUDOMODULES += lwip_udplite PSEUDOMODULES += lwip_sock_async +ifneq (,$(filter arch_64bit,$(FEATURES_USED))) +# Required for platforms where sizeof(void*) > 4 + CFLAGS += -DIPV6_FRAG_COPYHEADER=1 +endif + ifneq (,$(filter lwip_contrib,$(USEMODULE))) DIRS += $(RIOTBASE)/pkg/lwip/contrib endif diff --git a/pkg/micro-ecc/patches/0001-No-128-Bit-types-on-gcc.patch b/pkg/micro-ecc/patches/0001-No-128-Bit-types-on-gcc.patch new file mode 100644 index 000000000000..182d0fc0e959 --- /dev/null +++ b/pkg/micro-ecc/patches/0001-No-128-Bit-types-on-gcc.patch @@ -0,0 +1,25 @@ +From ea5b0ba330ccf246317087e5eef4736c36b17158 Mon Sep 17 00:00:00 2001 +From: Leon Hielscher +Date: Mon, 8 Oct 2018 18:40:39 +0200 +Subject: [PATCH 4/4] No 128 Bit types on gcc. + +--- + types.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/types.h b/types.h +index 7cb1a28..0a0ff2d 100644 +--- a/types.h ++++ b/types.h +@@ -51,7 +51,7 @@ + #define uECC_WORD_SIZE 4 + #endif + +-#if defined(__SIZEOF_INT128__) || ((__clang_major__ * 100 + __clang_minor__) >= 302) ++#if ((__clang_major__ * 100 + __clang_minor__) >= 302) + #define SUPPORTS_INT128 1 + #else + #define SUPPORTS_INT128 0 +-- +2.7.4 + diff --git a/pkg/micropython/patches/0001-Ensure-mp-int-and-uint-have-pointer-size.patch b/pkg/micropython/patches/0001-Ensure-mp-int-and-uint-have-pointer-size.patch new file mode 100644 index 000000000000..13ee56b28155 --- /dev/null +++ b/pkg/micropython/patches/0001-Ensure-mp-int-and-uint-have-pointer-size.patch @@ -0,0 +1,35 @@ +From 9333396d68f328b84a973757fd36522aec74a0f5 Mon Sep 17 00:00:00 2001 +From: Leon Hielscher +Date: Tue, 11 Aug 2020 23:58:10 +0200 +Subject: [PATCH 1/2] Ensure mp int and uint have pointer size. + +--- + ports/riot/mpconfigport.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ports/riot/mpconfigport.h b/ports/riot/mpconfigport.h +index d02e96653..0387ea597 100644 +--- a/ports/riot/mpconfigport.h ++++ b/ports/riot/mpconfigport.h +@@ -24,6 +24,7 @@ + * THE SOFTWARE. + */ + #include ++#include + + #include "irq.h" + +@@ -96,8 +97,8 @@ + + #define MICROPY_MODULE_FROZEN_STR (1) + +-typedef int mp_int_t; // must be pointer size +-typedef unsigned mp_uint_t; // must be pointer size ++typedef intptr_t mp_int_t; // must be pointer size ++typedef uintptr_t mp_uint_t; // must be pointer size + typedef long mp_off_t; + + #define MICROPY_BEGIN_ATOMIC_SECTION() irq_disable() +-- +2.17.1 + diff --git a/pkg/micropython/patches/0002-Use-proper-function-signatures.patch b/pkg/micropython/patches/0002-Use-proper-function-signatures.patch new file mode 100644 index 000000000000..6aa3c34606a0 --- /dev/null +++ b/pkg/micropython/patches/0002-Use-proper-function-signatures.patch @@ -0,0 +1,39 @@ +From 623283c16cf22a808f0d37832d91cb596f9401c4 Mon Sep 17 00:00:00 2001 +From: Leon Hielscher +Date: Wed, 12 Aug 2020 00:12:18 +0200 +Subject: [PATCH 2/2] Use proper function signatures. + +--- + ports/riot/help.c | 2 +- + ports/riot/mp_riot.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ports/riot/help.c b/ports/riot/help.c +index a39877925..c83acb001 100644 +--- a/ports/riot/help.c ++++ b/ports/riot/help.c +@@ -52,7 +52,7 @@ STATIC void pyb_help_print_info_about_object(mp_obj_t name_o, mp_obj_t value) { + printf("\n"); + } + +-STATIC mp_obj_t pyb_help(uint n_args, const mp_obj_t *args) { ++STATIC mp_obj_t pyb_help(size_t n_args, const mp_obj_t *args) { + if (n_args == 0) { + // print a general help message + printf("%s", help_text); +diff --git a/ports/riot/mp_riot.c b/ports/riot/mp_riot.c +index e339da26c..d87fa416d 100644 +--- a/ports/riot/mp_riot.c ++++ b/ports/riot/mp_riot.c +@@ -60,7 +60,7 @@ mp_import_stat_t mp_import_stat(const char *path) { + return MP_IMPORT_STAT_NO_EXIST; + } + +-mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) { ++mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { + puts("mp_builtin_open() stub"); + return mp_const_none; + } +-- +2.17.1 + diff --git a/pkg/monocypher/Kconfig b/pkg/monocypher/Kconfig index 689fbe732f63..ea4992eaa4a2 100644 --- a/pkg/monocypher/Kconfig +++ b/pkg/monocypher/Kconfig @@ -8,7 +8,7 @@ config PACKAGE_MONOCYPHER bool "Monocypher high performance cryptographic library package" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT select MODULE_MONOCYPHER_OPTIONAL help Provides functions for authenticated encryption, hashing, diff --git a/pkg/monocypher/Makefile.dep b/pkg/monocypher/Makefile.dep index 21096b0b43e8..be8438f94735 100644 --- a/pkg/monocypher/Makefile.dep +++ b/pkg/monocypher/Makefile.dep @@ -2,4 +2,4 @@ USEMODULE += monocypher_optional # monocypher is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/qcbor/Kconfig b/pkg/qcbor/Kconfig index 016dbb926458..6ed49ee5cdf1 100644 --- a/pkg/qcbor/Kconfig +++ b/pkg/qcbor/Kconfig @@ -8,4 +8,4 @@ config PACKAGE_QCBOR bool "QCBOR CBOR encoder/decoder" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT diff --git a/pkg/qcbor/Makefile.dep b/pkg/qcbor/Makefile.dep index bdbbad5895f4..ddb8a6ad1db1 100644 --- a/pkg/qcbor/Makefile.dep +++ b/pkg/qcbor/Makefile.dep @@ -1 +1 @@ -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/tinycbor/Kconfig b/pkg/tinycbor/Kconfig index b63d52e830a7..5b2778b30000 100644 --- a/pkg/tinycbor/Kconfig +++ b/pkg/tinycbor/Kconfig @@ -8,7 +8,7 @@ menuconfig PACKAGE_TINYCBOR bool "Tiny CBOR encode/decoder package" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT help TinyCBOR is a CBOR encoder and decoder with a very small footprint, optimized for very fast operation. diff --git a/pkg/tinycbor/Makefile.dep b/pkg/tinycbor/Makefile.dep index 10f81a15ca01..b33f081360c3 100644 --- a/pkg/tinycbor/Makefile.dep +++ b/pkg/tinycbor/Makefile.dep @@ -1,2 +1,2 @@ # tinycbor is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/tinycrypt/Kconfig b/pkg/tinycrypt/Kconfig index afbaf3c56036..e0e7a90c12e3 100644 --- a/pkg/tinycrypt/Kconfig +++ b/pkg/tinycrypt/Kconfig @@ -8,4 +8,4 @@ config PACKAGE_TINYCRYPT bool "TinyCrypt crypto library package" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT diff --git a/pkg/tinycrypt/Makefile.dep b/pkg/tinycrypt/Makefile.dep index bdbbad5895f4..ddb8a6ad1db1 100644 --- a/pkg/tinycrypt/Makefile.dep +++ b/pkg/tinycrypt/Makefile.dep @@ -1 +1 @@ -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/tinydtls/patches/0002-fix-printf-warning-for-64-bit-systems.patch b/pkg/tinydtls/patches/0002-fix-printf-warning-for-64-bit-systems.patch new file mode 100644 index 000000000000..97569bc6428b --- /dev/null +++ b/pkg/tinydtls/patches/0002-fix-printf-warning-for-64-bit-systems.patch @@ -0,0 +1,27 @@ +From df0fd3c00918f1698a87c2786590dcd097ee0625 Mon Sep 17 00:00:00 2001 +From: Frederik Haxel +Date: Mon, 14 Aug 2023 09:54:35 +0200 +Subject: [PATCH] Fix printf warning for 64 bit systems + +--- + dtls_debug.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dtls_debug.h b/dtls_debug.h +index 5b58acb..3bf04f0 100644 +--- a/dtls_debug.h ++++ b/dtls_debug.h +@@ -139,8 +139,8 @@ void dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr); + #define dtls_notice(...) LOG_INFO(__VA_ARGS__) + #define dtls_info(...) LOG_INFO(__VA_ARGS__) + #define dtls_debug(...) LOG_DEBUG(__VA_ARGS__) +-#define dtls_debug_hexdump(name, buf, length) { if (LOG_DEBUG <= LOG_LEVEL) { LOG_DEBUG("-= %s (%zu bytes) =-\n", name, length); od_hex_dump(buf, length, 0); }} +-#define dtls_debug_dump(name, buf, length) { if (LOG_DEBUG <= LOG_LEVEL) { LOG_DEBUG("%s (%zu bytes):", name, length); od_hex_dump(buf, length, 0); }} ++#define dtls_debug_hexdump(name, buf, length) { if (LOG_DEBUG <= LOG_LEVEL) { LOG_DEBUG("-= %s (%zu bytes) =-\n", name, (size_t) length); od_hex_dump(buf, length, 0); }} ++#define dtls_debug_dump(name, buf, length) { if (LOG_DEBUG <= LOG_LEVEL) { LOG_DEBUG("%s (%zu bytes):", name, (size_t) length); od_hex_dump(buf, length, 0); }} + #else /* neither RIOT nor Zephyr */ + #define dtls_emerg(...) dsrv_log(DTLS_LOG_EMERG, __VA_ARGS__) + #define dtls_alert(...) dsrv_log(DTLS_LOG_ALERT, __VA_ARGS__) +-- +2.34.1 + diff --git a/pkg/tinyusb/Kconfig b/pkg/tinyusb/Kconfig index 22bf0bf29ac4..1d35b34855eb 100644 --- a/pkg/tinyusb/Kconfig +++ b/pkg/tinyusb/Kconfig @@ -32,7 +32,7 @@ choice USB_IMPLEMENTATION menuconfig PACKAGE_TINYUSB bool "TinyUSB stack package" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT depends on HAS_TINYUSB_DEVICE || HAS_TINYUSB_HOST select MODULE_FMT select MODULE_LUID diff --git a/pkg/tlsf/Kconfig b/pkg/tlsf/Kconfig index 56392395c2a4..f6b34d41b2f4 100644 --- a/pkg/tlsf/Kconfig +++ b/pkg/tlsf/Kconfig @@ -8,7 +8,7 @@ menuconfig PACKAGE_TLSF bool "TLFS malloc/realloc/free/etc package" depends on TEST_KCONFIG - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT help TLSF provides an implementation of malloc/realloc/free/etc. diff --git a/pkg/tlsf/Makefile.dep b/pkg/tlsf/Makefile.dep index 3ca354f82c8c..448c5d76a545 100644 --- a/pkg/tlsf/Makefile.dep +++ b/pkg/tlsf/Makefile.dep @@ -9,4 +9,4 @@ ifneq (,$(filter tlsf-malloc,$(USEMODULE))) endif # tlsf is not compatible with 8bit and 16bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/uwb-dw1000/Kconfig b/pkg/uwb-dw1000/Kconfig index 539e7d9a1890..fa3cc8f2af03 100644 --- a/pkg/uwb-dw1000/Kconfig +++ b/pkg/uwb-dw1000/Kconfig @@ -14,7 +14,7 @@ menuconfig PACKAGE_UWB-DW1000 select MODULE_PERIPH_GPIO_IRQ depends on HAS_PERIPH_SPI select MODULE_PERIPH_SPI - depends on HAS_ARCH_32BIT + depends on HAS_ARCH_32BIT || HAS_ARCH_64BIT if PACKAGE_UWB-DW1000 diff --git a/pkg/uwb-dw1000/Makefile.dep b/pkg/uwb-dw1000/Makefile.dep index 2f7e3f9ec427..5ea65c36dc87 100644 --- a/pkg/uwb-dw1000/Makefile.dep +++ b/pkg/uwb-dw1000/Makefile.dep @@ -7,4 +7,4 @@ FEATURES_REQUIRED += periph_gpio_irq FEATURES_REQUIRED += periph_spi # Some of the pkg operation would overflow on 16bit -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/wamr/Makefile b/pkg/wamr/Makefile index 07ebcabf28c9..ca9f8fc7f2e4 100644 --- a/pkg/wamr/Makefile +++ b/pkg/wamr/Makefile @@ -24,13 +24,17 @@ CFLAGS += -Wno-cast-function-type RIOT_INCLUDES = $(filter-out -%,$(subst -I,,$(INCLUDES))) #translate (CPU_ARCH) to Build Target -#WAMR_BUILD_TARGET is "X86_32" "AARCH64[sub]", "ARM[sub]", +#WAMR_BUILD_TARGET is "X86_32", "X86_64", "AARCH64[sub]", "ARM[sub]", # "THUMB[sub]", "XTENSA" #no msp430, no AVR support for now ifeq ($(CPU),native) ifeq ($(findstring x86,$(OS_ARCH)),x86) +ifneq ($(NATIVE_64BIT), y) WAMR_BUILD_TARGET = X86_32 +else + WAMR_BUILD_TARGET = X86_64 +endif endif ifeq ($(findstring arm,$(OS_ARCH)),arm) WAMR_BUILD_TARGET = ARM diff --git a/pkg/wolfssl/Makefile.dep b/pkg/wolfssl/Makefile.dep index f4262b024274..9aff99de461b 100644 --- a/pkg/wolfssl/Makefile.dep +++ b/pkg/wolfssl/Makefile.dep @@ -91,4 +91,4 @@ ifneq (,$(filter native,$(CPU))) endif # wolfssl is only supported by 32 bit architectures -FEATURES_REQUIRED += arch_32bit +FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit diff --git a/pkg/wolfssl/include/user_settings.h b/pkg/wolfssl/include/user_settings.h index 79f58f2aca97..b2602ce829d8 100644 --- a/pkg/wolfssl/include/user_settings.h +++ b/pkg/wolfssl/include/user_settings.h @@ -73,7 +73,7 @@ extern "C" { #endif /* defined somewhere else */ -int strncasecmp(const char *s1, const char * s2, unsigned int sz); +int strncasecmp(const char *s1, const char * s2, size_t sz); #define SINGLE_THREADED diff --git a/pkg/wolfssl/sock_tls/sock_tls.c b/pkg/wolfssl/sock_tls/sock_tls.c index 37bcbaf7547e..3e170cccfbef 100644 --- a/pkg/wolfssl/sock_tls/sock_tls.c +++ b/pkg/wolfssl/sock_tls/sock_tls.c @@ -85,7 +85,7 @@ void sock_dtls_session_destroy(sock_tls_t *sk) #endif #include -int strncasecmp(const char *s1, const char * s2, unsigned int sz) +int strncasecmp(const char *s1, const char * s2, size_t sz) { unsigned int i; for( i = 0; i < sz; i++) {