summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2012-08-27 11:02:46 +0000
committerespie <espie@openbsd.org>2012-08-27 11:02:46 +0000
commit1d4b672edd2b808b5a9f7f052d14d0747bf9a17a (patch)
treebcc8b55311f90cb120489213032b255685540631
parentvax does not get -rpath-link, but it also does not really need it. (diff)
downloadwireguard-openbsd-1d4b672edd2b808b5a9f7f052d14d0747bf9a17a.tar.xz
wireguard-openbsd-1d4b672edd2b808b5a9f7f052d14d0747bf9a17a.zip
a few libtool users are bogus, they confuse --export-symbols with the
real option -export-symbols. Instead of blindly passing that one to the linker, error out beforehand, so that people know the problem IS libtool usage and not our program. (as exemplified by Todd Fries on ldns).
-rw-r--r--usr.bin/libtool/LT/Mode/Link/Program.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/libtool/LT/Mode/Link/Program.pm b/usr.bin/libtool/LT/Mode/Link/Program.pm
index 22987868b68..30c8aa95d38 100644
--- a/usr.bin/libtool/LT/Mode/Link/Program.pm
+++ b/usr.bin/libtool/LT/Mode/Link/Program.pm
@@ -1,4 +1,4 @@
-# $OpenBSD: Program.pm,v 1.1 2012/07/13 11:56:13 espie Exp $
+# $OpenBSD: Program.pm,v 1.2 2012/08/27 11:02:46 espie Exp $
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
@@ -110,11 +110,13 @@ sub link
}
my @linkeropts = ();
- for my $d (@$RPdirs) {
- push(@linkeropts, '-rpath', $d);
- }
- for my $d (keys %$rpath_link) {
- push(@linkeropts, '-rpath-link', $d);
+ if (!$ltconfig->noshared) {
+ for my $d (@$RPdirs) {
+ push(@linkeropts, '-rpath', $d);
+ }
+ for my $d (keys %$rpath_link) {
+ push(@linkeropts, '-rpath-link', $d);
+ }
}
if ($symbolsfile) {
push(@linkeropts, '-retain-symbols-file', $symbolsfile);