From b078142f30ae6f1233a327ada57a52f5014e8e3a Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 19 Jul 2016 21:41:14 +0800 Subject: fix check ld failed on linux --- CHANGELOG.md | 8 ++++++++ xmake/platforms/android/checker.lua | 2 ++ xmake/platforms/linux/checker.lua | 3 +++ 3 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4ab9616b..8f9b32012 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ * Add native shell support for `xmake.lua`. .e.g `add_ldflags("$(shell pkg-config --libs sqlite3)")` +### Bugs fixed + +* Fix check ld failed without g++ on linux + ## v2.0.3 ### New features @@ -133,6 +137,10 @@ * 在`xmake.lua`中添加原生shell支持,例如:`add_ldflags("$(shell pkg-config --libs sqlite3)")` +### Bugs修复 + +* 修复在linux下检测ld连接器失败,如果没装g++的话 + ## v2.0.3 ### 新特性 diff --git a/xmake/platforms/android/checker.lua b/xmake/platforms/android/checker.lua index ea160a8a2..fa5987cf4 100644 --- a/xmake/platforms/android/checker.lua +++ b/xmake/platforms/android/checker.lua @@ -112,9 +112,11 @@ function _check_toolchains(config) checker.check_toolchain(config, "cxx", cross, "g++", "the c++ compiler") checker.check_toolchain(config, "as", cross, "gcc", "the assember") checker.check_toolchain(config, "ld", cross, "g++", "the linker") + checker.check_toolchain(config, "ld", cross, "gcc", "the linker") checker.check_toolchain(config, "ar", cross, "ar", "the static library archiver") checker.check_toolchain(config, "ex", cross, "ar", "the static library extractor") checker.check_toolchain(config, "sh", cross, "g++", "the shared library linker") + checker.check_toolchain(config, "sh", cross, "gcc", "the shared library linker") end -- init it diff --git a/xmake/platforms/linux/checker.lua b/xmake/platforms/linux/checker.lua index 17556f44c..6e2d11219 100644 --- a/xmake/platforms/linux/checker.lua +++ b/xmake/platforms/linux/checker.lua @@ -68,10 +68,13 @@ function _check_toolchains(config) checker.check_toolchain(config, "cxx", cross, "g++", "the c++ compiler") checker.check_toolchain(config, "as", cross, "gcc", "the assember") checker.check_toolchain(config, "ld", cross, "g++", "the linker") + checker.check_toolchain(config, "ld", cross, "gcc", "the linker") checker.check_toolchain(config, "ar", cross, "ar", "the static library archiver") checker.check_toolchain(config, "ex", cross, "ar", "the static library extractor") checker.check_toolchain(config, "sh", cross, "g++", "the shared library linker") + checker.check_toolchain(config, "sh", cross, "gcc", "the shared library linker") checker.check_toolchain(config, "dd", cross, "gdb", "the debugger") + checker.check_toolchain(config, "dd", cross, "lldb", "the debugger") end -- init it -- cgit v1.3.1