Bug 108083

Summary: [GTK] Building fails in an armv5tel board
Product: WebKit Reporter: Adrian Perez <aperez>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dbates, mrobinson, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Adrian Perez 2013-01-28 07:43:36 PST
[GTK] Building fails in an armv5tel board
Comment 1 Adrian Perez 2013-01-28 07:47:49 PST
More precisely, the “configure” script claims that the C++ compiler
cannot be found, examining “configure.log” this can be observed:

configure:5761: g++ -c -march=pentium4 -msse2 -mfpmath=sse   conftest.cpp >&5
g++: error: unrecognized argument in option '-march=pentium4'
g++: note: valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
g++: error: unrecognized command line option '-msse2'
g++: error: unrecognized command line option '-mfpmath=sse'

Of course, passing those options does not make sense in ARM.
Comment 2 Adrian Perez 2013-01-28 07:49:12 PST
For reference, the board is a Dreamplug, which reports the following:

% cat /proc/cpuinfo
processor       : 0
model name      : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1191.11
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell Kirkwood (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000

% uname -m
armv5tel
Comment 3 Adrian Perez 2013-01-28 07:53:42 PST
Created attachment 184983 [details]
Patch
Comment 4 Daniel Bates 2013-01-28 23:03:50 PST
Comment on attachment 184983 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=184983&action=review

> Tools/Scripts/webkitdirs.pm:1323
> +    return $Config{archname} =~ /^arm(-|v[567])/;

Would it be sufficient to match a string that begins with "arm-" or "armv"? In particular, would it be sufficient to match a string that begins with "armv" as opposed to {armv5, armv6, armv7}?
Comment 5 Adrian Perez 2013-01-29 04:39:34 PST
(In reply to comment #4)
> (From update of attachment 184983 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=184983&action=review
> 
> > Tools/Scripts/webkitdirs.pm:1323
> > +    return $Config{archname} =~ /^arm(-|v[567])/;
> 
> Would it be sufficient to match a string that begins with "arm-" or "armv"? In particular, would it be sufficient to match a string that begins with "armv" as opposed to {armv5, armv6, armv7}?

After thinking a bit more about this, I think you are right: it may
be better to go for the broader /^arm[v-]/ regexp here, so it won't
be needed in the future to edit this if some new ARM incarnation
happens to be reported e.g. as “armv8” (or whatever the version is).
Comment 6 Adrian Perez 2013-01-29 05:46:15 PST
Created attachment 185226 [details]
Patch
Comment 7 Adrian Perez 2013-02-01 21:18:46 PST
Could the second version of the patch (which checks for "^arm[v-]")
be landed? Probably that's the best we can to get builds being done
in the broadest amount of ARM machines possible.
Comment 8 WebKit Review Bot 2013-02-01 22:27:54 PST
Comment on attachment 185226 [details]
Patch

Clearing flags on attachment: 185226

Committed r141683: <http://trac.webkit.org/changeset/141683>
Comment 9 WebKit Review Bot 2013-02-01 22:27:57 PST
All reviewed patches have been landed.  Closing bug.