Bug 152958 - [webkitdirs] Try arch and uname commands on non-windows OS
Summary: [webkitdirs] Try arch and uname commands on non-windows OS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-10 09:41 PST by Konstantin Tokarev
Modified: 2017-03-20 15:42 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.20 KB, patch)
2016-01-10 10:34 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (2.20 KB, patch)
2016-01-10 11:27 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2016-01-10 09:41:32 PST
Right now, determineArchitecture()  uses `arch` and `uname -m` commands to determine architecture in case of condition (isGtk() || isAppleMacWebKit() || isEfl()) is true. This should be !anyWindows() instead, because this code is applicable to any non-windows OS WebKit supports (even Haiku which once was supported is moderately POSIX-compliant and has uname command).
Comment 1 Konstantin Tokarev 2016-01-10 10:34:06 PST
Created attachment 268654 [details]
Patch
Comment 2 Konstantin Tokarev 2016-01-10 11:27:36 PST
Created attachment 268658 [details]
Patch
Comment 3 Michael Catanzaro 2016-01-10 11:31:11 PST
Comment on attachment 268658 [details]
Patch

I'm going to wait for EWS before giving this cq+ since your last attempt broke every bot :)
Comment 4 WebKit Commit Bot 2016-01-10 13:56:22 PST
Comment on attachment 268658 [details]
Patch

Clearing flags on attachment: 268658

Committed r194832: <http://trac.webkit.org/changeset/194832>
Comment 5 WebKit Commit Bot 2016-01-10 13:56:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Carlos Alberto Lopez Perez 2017-03-20 15:42:04 PDT
FYI: It seems the command "arch" doesn't gives the expected thing on MacOS:


clopez@macpro ~ $ arch
i386

clopez@macpro ~ $ uname -m
x86_64

clopez@macpro ~ $ which arch
/usr/bin/arch

clopez@macpro ~ $ sw_vers                 
ProductName:	Mac OS X
ProductVersion:	10.12.3
BuildVersion:	16D32

clopez@macpro ~ $ file /bin/ls
/bin/ls: Mach-O 64-bit executable x86_64


And this is on OpenBSD:


neutrino@wolfman $ arch
OpenBSD.i386

neutrino@wolfman $ uname -m
i386

neutrino@wolfman $ file /bin/ls
/bin/ls: ELF 32-bit LSB shared object, Intel 80386, version 1



And on Linux it seems a simple wrapper for 'uname -m', so I'm proposing to remove the call to arch and just leave the one for uname -m on bug 169886