You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/05/05 11:15:48 UTC

[GitHub] [incubator-nuttx-testing] xiaoxiang781216 commented on pull request #43: Add x86_64 to the test lists

xiaoxiang781216 commented on pull request #43:
URL: https://github.com/apache/incubator-nuttx-testing/pull/43#issuecomment-623994235


   > Need to figure out how to get the
   > macOS builds to use gcc instead of clang
   
   @yamt fix the similar issue, here is the patch:
   ```
   commit 748777e3f5f61ccadefac19c0e32b25c13475e44
   Author: YAMAMOTO Takashi <ya...@midokura.com>
   Date:   Thu Mar 26 11:28:08 2020 +0900
   
       sim: MODULE definitions for macOS
   
   diff --git a/boards/sim/sim/sim/configs/cxxtest/Make.defs b/boards/sim/sim/sim/configs/cxxtest/Make.defs
   index 633eed8e9e..dfab86026c 100644
   --- a/boards/sim/sim/sim/configs/cxxtest/Make.defs
   +++ b/boards/sim/sim/sim/configs/cxxtest/Make.defs
   @@ -86,6 +86,18 @@ else
      LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
    endif
    
   +# NuttX modules are ELF binaries.
   +# Non-ELF platforms like macOS need to use a separate ELF toolchain.
   +ifeq ($(CONFIG_HOST_MACOS),y)
   +  # eg. brew install x86_64-elf-gcc
   +  MODULECC = x86_64-elf-gcc
   +  MODULELD = x86_64-elf-ld
   +  # It seems macOS/x86_64 loads the program text around 00000001_xxxxxxxx.
   +  # The gcc default (-mcmodel=small) would produce out-of-range 32-bit
   +  # relocations.
   +  CMODULEFLAGS += -mcmodel=large
   +endif
   +
   ```


----------------------------------------------------------------
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:
users@infra.apache.org