From 2a419c75253ff9b566888ffcda031f25414201f9 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 13:47:37 +0100 Subject: Fix linker flags being in the wrong place on static builds. --- make/unit-cc.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'make') 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 = ; 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; } -- cgit v1.2.3