From 8338e556e7e74718e4179d3e7f8d64693973b75d Mon Sep 17 00:00:00 2001 From: Michal Gorecki Date: Fri, 21 Mar 2025 16:48:54 +0100 Subject: [PATCH] crypto/mbedtls: Use config defining flag globally Now -DMBEDTLS_USER_CONFIG_FILE= flag is used globally for each build that depends on mbedtls package. This way we won't have to add this flag in each package that uses mbedtls. --- apps/crypto_test/pkg.yml | 2 -- apps/hash_test/pkg.yml | 2 -- crypto/mbedtls/pkg.yml | 7 +++++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/crypto_test/pkg.yml b/apps/crypto_test/pkg.yml index 045d9a3570..0a5c38f8dd 100644 --- a/apps/crypto_test/pkg.yml +++ b/apps/crypto_test/pkg.yml @@ -28,5 +28,3 @@ pkg.deps: - "@apache-mynewt-core/sys/log" - "@apache-mynewt-core/crypto/mbedtls" - "@apache-mynewt-core/crypto/tinycrypt" - -pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"' diff --git a/apps/hash_test/pkg.yml b/apps/hash_test/pkg.yml index cf45bea829..ba0cb3118b 100644 --- a/apps/hash_test/pkg.yml +++ b/apps/hash_test/pkg.yml @@ -28,5 +28,3 @@ pkg.deps: - "@apache-mynewt-core/sys/log" - "@apache-mynewt-core/crypto/mbedtls" - "@apache-mynewt-core/crypto/tinycrypt" - -pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"' diff --git a/crypto/mbedtls/pkg.yml b/crypto/mbedtls/pkg.yml index b68eea40fe..cb8c1c24f1 100644 --- a/crypto/mbedtls/pkg.yml +++ b/crypto/mbedtls/pkg.yml @@ -26,11 +26,14 @@ pkg.keywords: - tls pkg.type: sdk -pkg.cflags: +app.cflags: - '-DMBEDTLS_USER_CONFIG_FILE=' +app.cflags.TEST: + - '-DTEST' + +pkg.cflags: - -Wno-maybe-uninitialized - -Wno-unknown-warning-option -pkg.cflags.TEST: -DTEST pkg.include_dirs: - "include"