… | |
… | |
1192 | $ldopts = $STATIC ? "-static " : ""; |
1192 | $ldopts = $STATIC ? "-static " : ""; |
1193 | |
1193 | |
1194 | $ldopts .= "$Config{ccdlflags} $Config{ldflags} @libs $Config{archlibexp}/CORE/$Config{libperl} $Config{perllibs}"; |
1194 | $ldopts .= "$Config{ccdlflags} $Config{ldflags} @libs $Config{archlibexp}/CORE/$Config{libperl} $Config{perllibs}"; |
1195 | |
1195 | |
1196 | my %seen; |
1196 | my %seen; |
1197 | $ldopts .= " $_" for grep !$seen{$_}++, ($extralibs =~ /(\S+)/g); |
1197 | $ldopts .= " $_" for reverse grep !$seen{$_}++, reverse ($extralibs =~ /(\S+)/g); |
1198 | |
1198 | |
1199 | for (@staticlibs) { |
1199 | for (@staticlibs) { |
1200 | $ldopts =~ s/(^|\s) (-l\Q$_\E) ($|\s)/$1-Wl,-Bstatic $2 -Wl,-Bdynamic$3/gx; |
1200 | $ldopts =~ s/(^|\s) (-l\Q$_\E) ($|\s)/$1-Wl,-Bstatic $2 -Wl,-Bdynamic$3/gx; |
1201 | } |
1201 | } |
1202 | |
1202 | |