You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/10/31 00:02:00 UTC

incubator-mynewt-larva git commit: Fix sim build for Linux.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master ae2bd1f47 -> 3705a8eb9


Fix sim build for Linux.


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

Branch: refs/heads/master
Commit: 3705a8eb9100a03569d668b8fd3f481a432e903c
Parents: ae2bd1f
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri Oct 30 16:01:44 2015 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri Oct 30 16:01:44 2015 -0700

----------------------------------------------------------------------
 compiler/sim/linux-compiler.yml | 6 +++---
 compiler/sim/osx-compiler.yml   | 2 +-
 hw/mcu/native/src/hal_uart.c    | 6 ++++++
 3 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/3705a8eb/compiler/sim/linux-compiler.yml
----------------------------------------------------------------------
diff --git a/compiler/sim/linux-compiler.yml b/compiler/sim/linux-compiler.yml
index 3dac5f2..535c81e 100644
--- a/compiler/sim/linux-compiler.yml
+++ b/compiler/sim/linux-compiler.yml
@@ -16,14 +16,14 @@
 
 ############################# Compiler Variables #############################
 
-compiler.path.cc: "gcc" 
+compiler.path.cc: "gcc"
 compiler.path.archive: "ar"
 compiler.path.objdump: "objdump"
-compiler.path.objsize: "objsize"
+compiler.path.objsize: "size"
 compiler.path.objcopy: "objcopy"
 
 compiler.flags.base: >
-    -m32 -Wall -Werror -ggdb -O0
+    -m32 -Wall -Werror -ggdb -O0 -DMN_LINUX
 
 compiler.flags.default: [compiler.flags.base]
 compiler.flags.debug: [compiler.flags.base, -ggdb -O0]

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/3705a8eb/compiler/sim/osx-compiler.yml
----------------------------------------------------------------------
diff --git a/compiler/sim/osx-compiler.yml b/compiler/sim/osx-compiler.yml
index 6803c63..fd61dc9 100644
--- a/compiler/sim/osx-compiler.yml
+++ b/compiler/sim/osx-compiler.yml
@@ -23,7 +23,7 @@ compiler.path.objsize: "objsize"
 compiler.path.objcopy: "gobjcopy"
 
 compiler.flags.base: >
-    -m32 -Wall -Werror -ggdb -O0
+    -m32 -Wall -Werror -ggdb -O0 -DMN_OSX
 
 compiler.flags.default: [compiler.flags.base]
 compiler.flags.debug: [compiler.flags.base, -ggdb -O0]

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/3705a8eb/hw/mcu/native/src/hal_uart.c
----------------------------------------------------------------------
diff --git a/hw/mcu/native/src/hal_uart.c b/hw/mcu/native/src/hal_uart.c
index dd1d6a8..13e2b2c 100644
--- a/hw/mcu/native/src/hal_uart.c
+++ b/hw/mcu/native/src/hal_uart.c
@@ -18,7 +18,13 @@
 #include "hal/hal_uart.h"
 #include "bsp/bsp.h"
 
+#ifdef MN_LINUX
+#include <pty.h>
+#endif
+#ifdef MN_OSX
 #include <util.h>
+#endif
+#include <stdio.h>
 #include <fcntl.h>
 #include <assert.h>
 #include <unistd.h>