Bug 152958

Summary: [webkitdirs] Try arch and uname commands on non-windows OS
Product: WebKit Reporter: Konstantin Tokarev <annulen>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, clopez, commit-queue, dbates, lforschler, mcatanzaro
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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