From a2be8eba3aaf11a9a73092793d27d6d46b4270cd Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Jun 2021 09:18:26 +0200 Subject: Add .so target. Fix ready state checks. --- task_cc.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'task_cc.cc') diff --git a/task_cc.cc b/task_cc.cc index 74654aa..4340f7b 100644 --- a/task_cc.cc +++ b/task_cc.cc @@ -178,6 +178,13 @@ int TaskCC::runInner() std::vector args; args.push_back("-MMD"); + + if(std::filesystem::path(config.target).extension() == ".so") + { + // Add -fPIC arg to all contained object files + args.push_back("-fPIC"); + } + args.push_back("-c"); args.push_back(std::string(sourceFile)); args.push_back("-o"); -- cgit v1.2.3