summaryrefslogtreecommitdiff
path: root/make/unit-cc.pl
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-07-31 00:49:27 +0100
committerPeter Powell <petpow@saberuk.com>2018-07-31 03:20:18 +0100
commitd9a52277df06d656564b28e456adabbee52e8c10 (patch)
treeb4ffb2c8dbb3ecef708220826548850c68434f3b /make/unit-cc.pl
parentabbf70b2a35edaf17631e43027828011296924ad (diff)
Remove support for static modules.
This has been frequently broken in the past and as far as I know is used by literally nobody. Also, even if all modules are compiled into the core any libraries linked against are and have always been linked dynamically making this unusable on platforms without dynamic libraries.
Diffstat (limited to 'make/unit-cc.pl')
-rwxr-xr-xmake/unit-cc.pl36
1 files changed, 1 insertions, 35 deletions
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 = <F>;
- 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;