Bug 174424 - bmalloc: Failure to build when the compiler specifically targets ARMv8-A / defines __ARM_ARCH_8A__
Summary: bmalloc: Failure to build when the compiler specifically targets ARMv8-A / de...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: bmalloc (show other bugs)
Version: Other
Hardware: Other Linux
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-12 09:05 PDT by Adrian Perez
Modified: 2017-07-12 11:43 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.19 KB, patch)
2017-07-12 09:08 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2017-07-12 09:05:41 PDT
The following error prevents builds from succeeding when a compiler specifically
targets ARMv8-A (instead of generic ARMv8):

  In file included from /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/BAssert.h:28:0,
                   from /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/BumpAllocator.h:29,
                   from /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/Allocator.h:29,
                   from /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/Allocator.cpp:26:
  /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/BPlatform.h:84:45: warning: "BARM_ARCH_VERSION" is not defined [-Wundef]
   #define BARM_ARCH_AT_LEAST(N) (BCPU(ARM) && BARM_ARCH_VERSION >= N)
                                               ^
  /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/BPlatform.h:180:9: note: in expansion of macro ‘BARM_ARCH_AT_LEAST’
   #  elif BARM_ARCH_AT_LEAST(4)
           ^~~~~~~~~~~~~~~~~~
  /home/aperez/devel/wpe/buildroot/output/build/webkitgtk-2.16.5/Source/bmalloc/bmalloc/BPlatform.h:184:6: error: #error "Not supported ARM architecture"
   #    error "Not supported ARM architecture"
        ^~~~~

The compiler is GCC 6.4.0, and it's defining __ARM_ARCH_8A__, which is not checked
by BPlatform.h (it checks for __ARM_ARCH_8__ instead). Compiler output:

  % ./output/host/bin/arm-buildroot-linux-gnueabihf-g++ -E -dM -x c++ -std=c++1y /dev/null|grep ARM_ARCH_8                                                                                         
  #define __ARM_ARCH_8A__ 1 
  % ./output/host/bin/arm-buildroot-linux-gnueabihf-g++ -dumpversion                                      
  6.4.0

I'm submitting a patch for this soon.
Comment 1 Adrian Perez 2017-07-12 09:08:35 PDT
Created attachment 315248 [details]
Patch
Comment 2 Michael Catanzaro 2017-07-12 11:15:06 PDT
Comment on attachment 315248 [details]
Patch

Hm, shame there's so much code duplication here between Platform.h and BPlatform.h....
Comment 3 WebKit Commit Bot 2017-07-12 11:43:40 PDT
Comment on attachment 315248 [details]
Patch

Clearing flags on attachment: 315248

Committed r219416: <http://trac.webkit.org/changeset/219416>
Comment 4 WebKit Commit Bot 2017-07-12 11:43:41 PDT
All reviewed patches have been landed.  Closing bug.