From cf94052d8fae19b12e43e25eb154ab89e2648f56 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 3 Jun 2015 14:53:09 +0100 Subject: Fix modules with 2+ files not having their LinkerFlags parsed. --- make/calcdep.pl | 2 +- make/unit-cc.pl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'make') diff --git a/make/calcdep.pl b/make/calcdep.pl index 513038843..2348edceb 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -250,7 +250,7 @@ sub dep_dir($$) { if (@ofiles) { my $ofiles = join ' ', @ofiles; print MAKE "$outdir.so: $ofiles\n"; - print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ \$^ \$>\n"; + print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n"; return 1; } else { return 0; diff --git a/make/unit-cc.pl b/make/unit-cc.pl index 0a20738db..aba14a0bc 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -104,7 +104,11 @@ sub do_core_link { } sub do_link_dir { - my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} @_"; + my ($dir, $link_flags) = (shift, ''); + for my $file (<$dir/*.cpp>) { + $link_flags .= get_property($file, 'LinkerFlags') . ' '; + } + my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} $link_flags @_"; message 'LINK', $out, $execstr; exec $execstr; } -- cgit v1.2.3