]> Cypherpunks repositories - gostls13.git/commitdiff
libmach: cross compiling support
authorShenghou Ma <minux.ma@gmail.com>
Fri, 20 Jan 2012 18:34:30 +0000 (13:34 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 20 Jan 2012 18:34:30 +0000 (13:34 -0500)
        We already use GOHOSTOS to represent the host OS that the toolchain
        will be run on, so no need to resort to uname(1) to get that (and
        use uname(1) will make cross-compiling for another host impossible).

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5530050

src/libmach/Makefile

index 2a53749c810ef95cd60838f372ed55a711934cdb..7473204de07b31d6cda1b1e76fb255d3c87bcc02 100644 (file)
@@ -49,13 +49,13 @@ OFILES=\
        6obj.$O\
        8obj.$O\
 
-ifneq ($(GOHOSTOS),windows)
+ifneq ($(GOHOSTOS),)
 OFILES+=\
-       $(shell uname | tr A-Z a-z).$O\
+       $(GOHOSTOS).$O\
 
 else
 OFILES+=\
-       windows.$O\
+       $(shell uname | tr A-Z a-z).$O\
 
 endif