-sub do_static_find {
- my @flags;
- for my $file (@ARGV) {
- push @flags, rpath(get_directive($file, 'LinkerFlags', ''));
- }
- open F, '>', $out;
- print F join ' ', @flags;
- close F;
- exit 0;
-}
-
-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;
- $link_flags .= ' '.$libs;
- close F;
- } else {
- $execstr .= ' '.$_;
- }
- }
- $execstr .= ' '.$ENV{LDLIBS}.' '.$link_flags;
- message 'LINK', $out, $execstr;
- exec $execstr;
-}
-