You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/08/23 01:18:44 UTC

incubator-mynewt-site git commit: Modified native tool installation instructions to reflect configuration changes in .yml file needed with gcc 6.1 and Clang

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/develop 3623a8560 -> a3e0544c0


Modified native tool installation instructions to reflect configuration changes in .yml file needed with gcc 6.1 and Clang


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/a3e0544c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/a3e0544c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/a3e0544c

Branch: refs/heads/develop
Commit: a3e0544c0d60c9c9f491e1638961f5cf71f76fe4
Parents: 3623a85
Author: aditihilbert <ad...@runtime.io>
Authored: Mon Aug 22 18:16:07 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Mon Aug 22 18:16:07 2016 -0700

----------------------------------------------------------------------
 docs/os/get_started/native_tools.md | 38 +++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/a3e0544c/docs/os/get_started/native_tools.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/native_tools.md b/docs/os/get_started/native_tools.md
index f6e6ac6..97a2665 100644
--- a/docs/os/get_started/native_tools.md
+++ b/docs/os/get_started/native_tools.md
@@ -17,7 +17,7 @@ If you have not already installed Homebrew from the
 
 ###Install gcc/libc 
 
-OS X ships with a C compiler called Clang.  To build applications for the Mynewt simulator, you will need a different compiler: gcc.
+OS X ships with a C compiler called Clang.  To build applications for the Mynewt simulator with, a different compiler is used as default: gcc.
 
 ```no-highlight
 $ brew install gcc
@@ -29,6 +29,42 @@ $ brew install gcc
 
 <br>
 
+Check the gcc version you have installed (either using brew or previously installed). If the gcc version is 6.1 rather the expected 5.x by the default .yml configuration file, you have to modify the `<mynewt-src-directory>/repos/apache-mynewt-core/compiler/sim/compiler.yml` file to change the default `gcc v-5` defined there.
+
+Replace the lines shown highlighted below:
+
+```hl_lines="2 3"
+# OS X.
+compiler.path.cc.DARWIN.OVERWRITE: "/usr/local/bin/gcc-5"
+compiler.path.as.DARWIN.OVERWRITE: "/usr/local/bin/gcc-5 -x assembler-with-cpp"
+compiler.path.objdump.DARWIN.OVERWRITE: "gobjdump"
+compiler.path.objsize.DARWIN.OVERWRITE: "objsize"
+compiler.path.objcopy.DARWIN.OVERWRITE: "gobjcopy"
+```
+with the following:
+
+```no-highlight
+compiler.path.cc.DARWIN.OVERWRITE: "/usr/local/bin/gcc-6"
+compiler.path.as.DARWIN.OVERWRITE: "/usr/local/bin/gcc-6 -x assembler-with-cpp\u201d
+```
+
+<br>
+
+In case you wish to use Clang, you can change your `<mynewt-src-directory>/repos/apache-mynewt-core/compiler/sim/compiler.yml` to use Clang. Delete the gcc-5 DARWIN.OVERWRITE lines highlighted below.
+
+```hl_lines="2 3"
+# OS X.
+compiler.path.cc.DARWIN.OVERWRITE: "/usr/local/bin/gcc-5"
+compiler.path.as.DARWIN.OVERWRITE: "/usr/local/bin/gcc-5 -x assembler-with-cpp"
+compiler.path.objdump.DARWIN.OVERWRITE: "gobjdump"
+compiler.path.objsize.DARWIN.OVERWRITE: "objsize"
+compiler.path.objcopy.DARWIN.OVERWRITE: "gobjcopy"
+```
+
+**Note:** Both the newer gcc 6.x and Clang report a few warnings but they can be ignored.
+
+<br>
+
 ###Install gdb 
 
 ```no-highlight