Skip to content

Add x86_64 to the test lists #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2020
Merged

Conversation

btashton
Copy link
Contributor

@btashton btashton commented May 5, 2020

Add x86_64 to the test lists

@btashton
Copy link
Contributor Author

btashton commented May 5, 2020

Need to figure out how to get the
macOS builds to use gcc instead of clang

@xiaoxiang781216
Copy link
Contributor

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 <yamamoto@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
+

@btashton
Copy link
Contributor Author

btashton commented Jun 1, 2020

@xiaoxiang781216 I had forgotten about this. Just pushed PR that I think should resolve this in the main OS repository, thanks for the pointer.

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Jun 1, 2020

I have merged apache/nuttx#1161, let's rerun the build.

@xiaoxiang781216
Copy link
Contributor

@btashton still fail:(.

@btashton
Copy link
Contributor Author

btashton commented Jun 1, 2020

Verified that apache/nuttx#1162 will make this pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants