chromium fails to compile for mips/linux when using clang due to inline casts in asm code
Reported by
ptwo...@vewd.com,
Dec 12 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Steps to reproduce the problem:
1. Try to build chromium codebase using clang for linux/mips
What is the expected behavior?
The code builds correctly.
What went wrong?
The code fails to compile due to the following error:
In file included from ../../third_party/tcmalloc/chromium/src/base/spinlock_internal.cc:51:
In file included from ../../third_party/tcmalloc/chromium/src/base/spinlock_linux-inl.h:38:
../../third_party/tcmalloc/chromium/src/base/linux_syscall_support.h:1897:51: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
unsigned long, f, void *, a)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../third_party/tcmalloc/chromium/src/base/linux_syscall_support.h:1526:64: note: expanded from macro '_syscall5'
"r"(__r6), "m" ((unsigned long)arg5) \
~~~~~~~~~~~~~~~^~~~
../../third_party/tcmalloc/chromium/src/base/linux_syscall_support.h:2036:47: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
loff_t *, res, uint, wh)
~~~~~~~~~~~~~~~~~~~~~^~~
../../third_party/tcmalloc/chromium/src/base/linux_syscall_support.h:1526:64: note: expanded from macro '_syscall5'
"r"(__r6), "m" ((unsigned long)arg5) \
~~~~~~~~~~~~~~~^~~~
Did this work before? N/A
Chrome version: 65.0.3293.0 Channel: n/a
OS Version: 4.12.12
Flash Version:
,
Dec 13 2017
Triaging issues without components.... Assigning to OWNER of tcmalloc. wfh@ I added you to the review since it had jar@ added.
,
Feb 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17a5affd36ab79fdf00e2e4d283615c7ad3454d3 commit 17a5affd36ab79fdf00e2e4d283615c7ad3454d3 Author: Piotr Tworek <ptworek@vewd.com> Date: Mon Feb 26 10:34:43 2018 Avoid using inline cast in mips assembly code. When building the code with clang the compilation fails due to the following error: "invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions" Doing the cast outside of __asm__ block fixes the problem. R=jar@chromium.org Bug: 794147 Change-Id: I49bcdbd3d4177cbdafa37ffc2d12983db1fe7621 Reviewed-on: https://chromium-review.googlesource.com/822411 Reviewed-by: Will Harris <wfh@chromium.org> Commit-Queue: Hugo Holgersson <hugoh@vewd.com> Cr-Commit-Position: refs/heads/master@{#539103} [modify] https://crrev.com/17a5affd36ab79fdf00e2e4d283615c7ad3454d3/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
,
Feb 28 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9bb40b1c2f8d2784ed02c1dcf49d4d5458b52e5c commit 9bb40b1c2f8d2784ed02c1dcf49d4d5458b52e5c Author: Gordana Cmiljanovic <gordana.cmiljanovic@mips.com> Date: Wed Feb 28 17:46:44 2018 [MIPS][tcmalloc] Fix mipsel compile errors tcmalloc is using very old version of linux_syscall_support.h The following mipsel related changes are pulled from lss project: https://chromiumcodereview.appspot.com/10067027 https://codereview.chromium.org/13846002 https://codereview.chromium.org/913723002/ https://codereview.chromium.org/836473006 Bug: 810356 , 794147 Change-Id: I79c3c77a5b81eb84902aa82b72656a776053de1e Reviewed-on: https://chromium-review.googlesource.com/909216 Commit-Queue: Will Harris <wfh@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Cr-Commit-Position: refs/heads/master@{#539871} [modify] https://crrev.com/9bb40b1c2f8d2784ed02c1dcf49d4d5458b52e5c/third_party/tcmalloc/README.chromium [modify] https://crrev.com/9bb40b1c2f8d2784ed02c1dcf49d4d5458b52e5c/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
,
Mar 26 2018
is this fixed? I think it is, so marking Fixed. Please reopen if not. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ptwo...@vewd.com
, Dec 12 2017