diff options
| author | ruki <[email protected]> | 2020-02-14 00:52:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-13 23:17:54 +0800 |
| commit | b44a566e16e9022428d0f4453c8f1df0af1577d5 (patch) | |
| tree | 39ba562460a426440a6de5312baf5a00ea896b3b | |
| parent | dd0b71595f2ee91bfa0c03e4f0c5f9a3347d195f (diff) | |
improve msys and cygwin
| -rw-r--r-- | core/plat/cygwin/prefix.mak | 2 | ||||
| -rw-r--r-- | core/plat/msys/prefix.mak | 2 | ||||
| -rw-r--r-- | xmake/platforms/cygwin/config.lua | 10 | ||||
| -rw-r--r-- | xmake/platforms/msys/config.lua | 10 |
4 files changed, 20 insertions, 4 deletions
diff --git a/core/plat/cygwin/prefix.mak b/core/plat/cygwin/prefix.mak index f4a04b74d..1ad336cb9 100644 --- a/core/plat/cygwin/prefix.mak +++ b/core/plat/cygwin/prefix.mak @@ -91,7 +91,7 @@ CCFLAGS = -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSI # ldflags LDFLAGS_RELEASE = -LDFLAGS_DEBUG = -rdynamic +LDFLAGS_DEBUG = LDFLAGS = $(AHFLAGS) $(LDFLAGS_CHECK) -static-libgcc LDFLAGS-L = -L LDFLAGS-l = -l diff --git a/core/plat/msys/prefix.mak b/core/plat/msys/prefix.mak index f4a04b74d..304e37158 100644 --- a/core/plat/msys/prefix.mak +++ b/core/plat/msys/prefix.mak @@ -91,7 +91,7 @@ CCFLAGS = -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSI # ldflags LDFLAGS_RELEASE = -LDFLAGS_DEBUG = -rdynamic +LDFLAGS_DEBUG = LDFLAGS = $(AHFLAGS) $(LDFLAGS_CHECK) -static-libgcc LDFLAGS-L = -L LDFLAGS-l = -l diff --git a/xmake/platforms/cygwin/config.lua b/xmake/platforms/cygwin/config.lua index 96d9e81c4..166d12274 100644 --- a/xmake/platforms/cygwin/config.lua +++ b/xmake/platforms/cygwin/config.lua @@ -34,7 +34,15 @@ function _check_arch() if not arch then -- init the default architecture - config.set("arch", config.get("cross") and "none" or os.arch()) + local arch = config.get("cross") and "none" or os.arch() + if is_host("windows") then + if arch == "x64" then + arch = "x86_64" + elseif arch == "x86" then + arch = "i386" + end + end + config.set("arch", arch) -- trace print("checking for the architecture ... %s", config.get("arch")) diff --git a/xmake/platforms/msys/config.lua b/xmake/platforms/msys/config.lua index 15abb0e5c..b33fb885f 100644 --- a/xmake/platforms/msys/config.lua +++ b/xmake/platforms/msys/config.lua @@ -34,7 +34,15 @@ function _check_arch() if not arch then -- init the default architecture - config.set("arch", config.get("cross") and "none" or os.arch()) + local arch = config.get("cross") and "none" or os.arch() + if is_host("windows") then + if arch == "x64" then + arch = "x86_64" + elseif arch == "x86" then + arch = "i386" + end + end + config.set("arch", arch) -- trace print("checking for the architecture ... %s", config.get("arch")) |
