summaryrefslogtreecommitdiff
path: root/make/unit-cc.pl
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2016-08-19 13:47:37 +0100
committerPeter Powell <petpow@saberuk.com>2016-08-19 16:10:00 +0100
commit2a419c75253ff9b566888ffcda031f25414201f9 (patch)
tree2d41437a5b063c913173d5f01181f40c7314c201 /make/unit-cc.pl
parenta7ca68ff7249da865b5b572b6430cf2e5d34b7c3 (diff)
Fix linker flags being in the wrong place on static builds.
Diffstat (limited to 'make/unit-cc.pl')
-rwxr-xr-xmake/unit-cc.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/make/unit-cc.pl b/make/unit-cc.pl
index a06d7b10f..f04423ce3 100755
--- a/make/unit-cc.pl
+++ b/make/unit-cc.pl
@@ -80,18 +80,19 @@ sub do_static_find {
sub do_static_link {
my $execstr = "$ENV{CXX} -o $out $ENV{CORELDFLAGS}";
+ my $link_flags = '';
for (@ARGV) {
if (/\.cmd$/) {
open F, '<', $_;
my $libs = <F>;
chomp $libs;
- $execstr .= ' '.$libs;
+ $link_flags .= ' '.$libs;
close F;
} else {
$execstr .= ' '.$_;
}
}
- $execstr .= ' '.$ENV{LDLIBS};
+ $execstr .= ' '.$ENV{LDLIBS}.' '.$link_flags;
message 'LINK', $out, $execstr;
exec $execstr;
}