X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Funit-cc.pl;h=311c4c2607fa922520efae5fe2d4a85ef30d01e7;hb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;hp=1cf6cf86601f2cd0d1b34001d4f7f07148c7d94a;hpb=bdfde49fb6d9a8787c072b759d4af27584308e1b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/unit-cc.pl b/make/unit-cc.pl index 1cf6cf866..311c4c260 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -37,11 +37,7 @@ chdir $ENV{BUILDPATH}; my $type = shift; my $out = shift; -if ($type eq 'gen-ld') { - do_static_find(@ARGV); -} elsif ($type eq 'static-ld') { - do_static_link(@ARGV); -} elsif ($type eq 'core-ld') { +if ($type eq 'core-ld') { do_core_link(@ARGV); } elsif ($type eq 'link-dir') { do_link_dir(@ARGV); @@ -71,36 +67,6 @@ sub rpath($) { return $message; } -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 = ; - chomp $libs; - $link_flags .= ' '.$libs; - close F; - } else { - $execstr .= ' '.$_; - } - } - $execstr .= ' '.$ENV{LDLIBS}.' '.$link_flags; - message 'LINK', $out, $execstr; - exec $execstr; -} - sub do_core_link { my $execstr = "$ENV{CXX} -o $out $ENV{CORELDFLAGS} @_ $ENV{LDLIBS}"; message 'LINK', $out, $execstr;