From 373c733308e6ced2def3f4ac91b91d270c2eb5df Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Mon, 3 Aug 2020 21:21:03 +0300 Subject: baremetal: Fix static library generation for GCC compiler A problem was in that the GenericGCC.qbs file missing the initialization for the staticLibrary{Prefix|Suffix} properties. This properties are initialized only in the derived UnixGCC.qbs or MingwBaseModule.qbs modules, which are does work only for the 'unix' or 'windows' platforms. So, we need to initialize required properties inside of a base GenericGCC.qbs module. Change-Id: Ie25f1a19acbc5d86e65eb5ac8f8205ae8079ebd9 Reviewed-by: Christian Kandeler --- share/qbs/modules/cpp/GenericGCC.qbs | 3 +++ share/qbs/modules/cpp/MingwBaseModule.qbs | 2 -- share/qbs/modules/cpp/UnixGCC.qbs | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 80de576a9..b69f26739 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -114,6 +114,9 @@ CppModule { compilerFrameworkPaths: gccProbe.frameworkPaths compilerLibraryPaths: gccProbe.libraryPaths + staticLibraryPrefix: "lib" + staticLibrarySuffix: ".a" + property bool compilerHasTargetOption: qbs.toolchain.contains("clang") && Utilities.versionCompare(compilerVersion, "3.1") >= 0 property bool assemblerHasTargetOption: qbs.toolchain.contains("xcode") diff --git a/share/qbs/modules/cpp/MingwBaseModule.qbs b/share/qbs/modules/cpp/MingwBaseModule.qbs index 60ad28b08..831512c5c 100644 --- a/share/qbs/modules/cpp/MingwBaseModule.qbs +++ b/share/qbs/modules/cpp/MingwBaseModule.qbs @@ -37,8 +37,6 @@ import "setuprunenv.js" as SetupRunEnv GenericGCC { condition: false - staticLibraryPrefix: "lib" - staticLibrarySuffix: ".a" dynamicLibrarySuffix: ".dll" executableSuffix: ".exe" debugInfoSuffix: ".debug" diff --git a/share/qbs/modules/cpp/UnixGCC.qbs b/share/qbs/modules/cpp/UnixGCC.qbs index 68eacea3f..94dfb1907 100644 --- a/share/qbs/modules/cpp/UnixGCC.qbs +++ b/share/qbs/modules/cpp/UnixGCC.qbs @@ -35,10 +35,8 @@ GenericGCC { && qbs.targetOS.contains("unix") priority: -50 - staticLibraryPrefix: "lib" dynamicLibraryPrefix: "lib" loadableModulePrefix: "lib" - staticLibrarySuffix: ".a" dynamicLibrarySuffix: ".so" debugInfoSuffix: ".debug" imageFormat: "elf" -- cgit v1.2.1