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:27 UTC

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

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/68b54265
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/68b54265
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/68b54265

Branch: refs/heads/v0_9_0
Commit: 68b54265e8041fa690a67443ff175ece47b89fbb
Parents: abf59ad
Author: aditihilbert <ad...@runtime.io>
Authored: Mon Aug 22 18:16:07 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Mon Aug 22 18:17:35 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/68b54265/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