ref: 714a85cedc8eea6c4c4d95c074160e0a2ca9e477
parent: 5f6738ea543372390b2647d6c9efc153c6f46b8f
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 22 13:37:01 EST 2017
Set appropriate env vars on OSX. This shuts up the last warnings for the assembler.
--- a/configure
+++ b/configure
@@ -48,6 +48,7 @@
symprefix='""'
defaultasm='Gnugaself'
sysinit=''
+env='[][:]'
case $OS in
*Linux*)
echo 'export SYS=linux' >> config.mk
@@ -64,6 +65,7 @@
'"-pagezero_size", "0x100000000",' \
'"-macosx_version_min", "10.6",'\
'"-o"]' >> mbld/config.myr
+ env='[("MACOSX_DEPLOYMENT_TARGET", "10.6")][:]'
;;
*FreeBSD*)
echo 'export SYS=freebsd' >> config.mk
@@ -108,6 +110,7 @@
echo "const Sharepath = \"share\"" >> mbld/config.myr
echo "const Binpath = \"bin\"" >> mbld/config.myr
echo "const Libpath = \"lib/myr\"" >> mbld/config.myr
+echo "const Env : (byte[:], byte[:])[:] = $env" >> mbld/config.myr
case $MACH in
--- a/mbld/config+plan9-x64.myr
+++ b/mbld/config+plan9-x64.myr
@@ -1,4 +1,5 @@
pkg config =
+ const Env : (byte[:], byte[:])[:] = [][:]
const Instroot = "/"
const Sys = "Plan9"
const Objsuffix = ".6"
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -86,6 +86,10 @@
;;
;;
+ for (e, v) in config.Env
+ std.setenv(e, v)
+ ;;
+
b = mkbuild(tags)
if targname.len != 0
buildimm(b, targname, cmd.args, bintarg, cleanfirst)