Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/speclib')
-rwxr-xr-xwinsup/cygwin/speclib9
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index 7bac7eac4..b90096040 100755
--- a/winsup/cygwin/speclib
+++ b/winsup/cygwin/speclib
@@ -11,16 +11,17 @@ my $static;
my $inverse;
my @exclude;
-my ($ar, $as, $nm, $objcopy);
+my ($cpu, $ar, $as, $nm, $objcopy);
GetOptions('exclude=s'=>\@exclude, 'static!'=>\$static, 'v!'=>\$inverse,
- 'ar=s'=>\$ar, 'as=s'=>\$as,'nm=s'=>\$nm, 'objcopy=s'=>\$objcopy);
+ 'cpu=s'=>\$cpu, 'ar=s'=>\$ar, 'as=s'=>\$as,'nm=s'=>\$nm, 'objcopy=s'=>\$objcopy);
$_ = File::Spec->rel2abs($_) for @ARGV;
my $libdll = shift;
my $lib = pop;
+my $uscore = ($cpu eq 'x86_64' ? undef : '_');
(my $iname = basename $lib) =~ s/\.a$//o;
-$iname = '_' . $iname . '_dll_iname';
+$iname = $uscore . $iname . '_dll_iname';
open my $nm_fd, '-|', $nm, '-Apg', '--defined-only', @ARGV, $libdll or
die "$0: execution of $nm for object files failed - $!\n";
@@ -34,7 +35,7 @@ $exclude_regex = qr/$exclude_regex/;
my $dllname;
while (<$nm_fd>) {
study;
- if (/ I _(.*)_dll_iname/o) {
+ if (/ I _?(.*)_dll_iname/o) {
$dllname = $1;
} else {
my ($file, $member, $symbol) = m%^([^:]*):([^:]*(?=:))?.* T (.*)%o;