You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2021/06/07 19:15:35 UTC

[mynewt-core] 02/02: crypto: mbedtls: Fix xc32 build problem

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit e7e7e06839078b7cb0084fd3f337ec20d6a563b8
Author: Jerzy Kasenberg <je...@apache.org>
AuthorDate: Sat Jun 5 01:19:48 2021 +0200

    crypto: mbedtls: Fix xc32 build problem
    
    Line:
    pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'
    works for arm gcc
    it does not work for xc32-gcc
    Due to compiler issue this line results in build error:
    
    Error: In file included from repos/apache-mynewt-core/crypto/mbedtls/src/aes.c:54:
    repos/apache-mynewt-core/crypto/mbedtls/include/mbedtls/config.h:3439:10: error: #include expects "FILENAME" or <FILENAME>
     #include MBEDTLS_USER_CONFIG_FILE
    
    xc32-gcc is wrapper that executes another binary, during execution of
    this second compiler, xc32-gcc removes quotes leaving definition of
    MBEDTLS_USER_CONFIG_FILE unusable.
    
    This changes "" to <> that is harmless for other compilers and fixes build for xc32.
---
 crypto/mbedtls/pkg.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/mbedtls/pkg.yml b/crypto/mbedtls/pkg.yml
index 529a8c8..f4defa7 100644
--- a/crypto/mbedtls/pkg.yml
+++ b/crypto/mbedtls/pkg.yml
@@ -25,5 +25,5 @@ pkg.keywords:
     - ssl
     - tls
 
-pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'
+pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE=<mbedtls/config_mynewt.h>'
 pkg.cflags.TEST: -DTEST