diff options
author | Oliver Tappe | 2007-02-23 18:03:30 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-02-23 18:03:30 +0100 |
commit | 3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091 (patch) | |
tree | 08a329b1c4c39a82ea6fd2235952d1e92a5dc5a5 /bin | |
parent | Do not preload agpgart kernel module (should be handled automatically) (diff) | |
download | core-3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091.tar.gz core-3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091.tar.xz core-3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091.zip |
* fixed bug that caused the architecture detection to fail an 64-bit
systems
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@714 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/slxldd | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -146,7 +146,7 @@ sub addLib foreach my $folder (@folders) { if (-e "$folder/$lib") { # have library matching name, now check if the platform is ok, too: - my $libFileInfo = `file --dereference $folder/$lib 2>/dev/null`; + my $libFileInfo = `file --dereference --brief $folder/$lib 2>/dev/null`; if ($?) { die _tr("unable to fetch file info for '%s', giving up!\n", $folder/$lib); @@ -177,17 +177,25 @@ sub addLibsForBinary # first do some checks: print STDERR _tr("analyzing '%s'...\n", $binary) if $verbose; my $fileInfo = `file --dereference --brief --mime $binary 2>/dev/null`; - chomp $fileInfo; - print STDERR _tr("\tinfo is: '%s'...\n", $fileInfo) if $verbose; if ($?) { die _tr("unable to fetch file info for $binary, giving up!\n"); } + chomp $fileInfo; + print STDERR _tr("\tinfo is: '%s'...\n", $fileInfo) if $verbose; if ($fileInfo !~ m[^application/(x-executable|x-shared)]i) { # ignore anything that's not an executable or a shared library print STDERR _tr("%s: ignored, as it isn't an executable or a shared library\n", $binary); next; } + # fetch file info again, this time without '--mime' in order to get the architecture + # bitwidth: + $fileInfo = `file --dereference --brief $binary 2>/dev/null`; + if ($?) { + die _tr("unable to fetch file info for $binary, giving up!\n"); + } + chomp $fileInfo; + print STDERR _tr("\tinfo is: '%s'...\n", $fileInfo) if $verbose; my $bitwidth = ($fileInfo =~ m[64-bit]i) ? 64 : 32; # determine whether binary is 32- or 64-bit platform |