xiaoxiang781216 commented on a change in pull request #2222: URL: https://github.com/apache/incubator-nuttx/pull/2222#discussion_r526081941
########## File path: arch/sim/include/types.h ########## @@ -75,9 +75,16 @@ typedef unsigned int _uint32_t; /* Note about host OS types: * - int64_t is long long for 64-bit macOS * - int64_t is long for Ubuntu x86-64 + * + * Note for sim/macOS modules: + * For sim/macOS, usually x86_64-elf-gcc from homebrew is used + * as MODULECC. It seems to be configured as __INT64_TYPE__ == long int. + * The __APPLE_CC__ check below is to workaround it. + * (The host cc defines __APPLE_CC__, while x86_64-elf-gcc doesn't.) + * XXX It is a problem if you need C++ symbols in symtabs for modules. */ -#if defined(CONFIG_HOST_MACOS) || !defined(_LP64) +#if defined(CONFIG_HOST_MACOS) && defined(__APPLE_CC__) || !defined(_LP64) Review comment: same question ########## File path: arch/sim/include/inttypes.h ########## @@ -44,7 +44,7 @@ * Pre-processor Definitions ****************************************************************************/ -#if defined(CONFIG_HOST_MACOS) +#if defined(CONFIG_HOST_MACOS) && defined(__APPLE_CC__) || !defined(_LP64) Review comment: is it enough to only check __APPLE_CC__? ``` #if defined(__APPLE_CC__) || !defined(_LP64) ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org