Fixed
Status Update
Comments
bl...@google.com <bl...@google.com> #2
Automated by Blunderbuss job chromeos-toolchain-blunderbuss for component 1038090.
in...@google.com <in...@google.com> #3
*Should* _GNU_SOURCE be defined? My understanding is that it is a macro you should define yourself in your source code if you want certain features from GNU libc.
to...@google.com <to...@google.com> #4
I agree, that is the question. Looks like it was discussed in
The reason I brought this up is that I've hit this a few times when trying to build:
https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3971947/1/Makefile.toolchain https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/3970829/4/sys-libs/libcxx/libcxx-15.0_pre458507.ebuild
The failures aren't immediately obvious, since they're usually related to the other defines that _GNU_SOURCE
enables. I'd be fine if we were consistent across versions of clang
, but the inconsistency makes it annoying.
ma...@google.com <ma...@google.com> #5
I am guessing that `_GNU_SOURCE` when building libc++ is not enough for baremetal c++ projects.
The project sources will still run into issues if they do not define `_GNU_SOURCE` since most features are part of headers.
I can send a patch to upstream and ask for review.
The project sources will still run into issues if they do not define `_GNU_SOURCE` since most features are part of headers.
I can send a patch to upstream and ask for review.
to...@google.com <to...@google.com> #6
ap...@google.com <ap...@google.com> #7
Project: chromiumos/platform/ec
Branch: main
commit e89aa6426ee7b4a969dd12c7ed32214cc5b28028
Author: Tom Hughes <tomhughes@chromium.org>
Date: Tue Nov 01 14:09:00 2022
Makefile.toolchain: Define _GNU_SOURCE when using clang
g++ defines _GNU_SOURCE, but the baremetal clang++ toolchain we're using
does not. When using libcxx + newlib, _GNU_SOURCE needs to be defined
for compilation to succeed.
BRANCH=none
BUG=b:254916723
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ieda973980157ecc37c2aa1afcb35cbf62bfa3c51
Reviewed-on:https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3995333
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
M Makefile.toolchain
https://chromium-review.googlesource.com/3995333
Branch: main
commit e89aa6426ee7b4a969dd12c7ed32214cc5b28028
Author: Tom Hughes <tomhughes@chromium.org>
Date: Tue Nov 01 14:09:00 2022
Makefile.toolchain: Define _GNU_SOURCE when using clang
g++ defines _GNU_SOURCE, but the baremetal clang++ toolchain we're using
does not. When using libcxx + newlib, _GNU_SOURCE needs to be defined
for compilation to succeed.
BRANCH=none
BUG=b:254916723
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ieda973980157ecc37c2aa1afcb35cbf62bfa3c51
Reviewed-on:
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
M Makefile.toolchain
ap...@google.com <ap...@google.com> #8
Project: chromiumos/overlays/chromiumos-overlay
Branch: main
commit cee5e48fcf61bd92e4be4cf4712a939ec0462d29
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Nov 18 13:36:00 2022
llvm: get patches from upstream
reviews.llvm.org/rG2497d5aa7716a664c4f73df1980b026c906c7522
2497d5aa7716 Define _GNU_SOURCE for arm baremetal in C++ mode.
BUG=b:234507656, b:254916723
TEST=CQ
Change-Id: I39f9631c65af49542eb65dfd1b18e122ff16c761
Reviewed-on:https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/4038332
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
M sys-devel/llvm/files/PATCHES.json
A sys-devel/llvm/files/cherry/2497d5aa7716a664c4f73df1980b026c906c7522.patch
M sys-devel/llvm/llvm-15.0_pre465103_p20220825-r7.ebuild
https://chromium-review.googlesource.com/4038332
Branch: main
commit cee5e48fcf61bd92e4be4cf4712a939ec0462d29
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Nov 18 13:36:00 2022
llvm: get patches from upstream
2497d5aa7716 Define _GNU_SOURCE for arm baremetal in C++ mode.
BUG=b:234507656, b:254916723
TEST=CQ
Change-Id: I39f9631c65af49542eb65dfd1b18e122ff16c761
Reviewed-on:
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
M sys-devel/llvm/files/PATCHES.json
A sys-devel/llvm/files/cherry/2497d5aa7716a664c4f73df1980b026c906c7522.patch
M sys-devel/llvm/llvm-15.0_pre465103_p20220825-r7.ebuild
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #9
Project: chromiumos/platform/ec
Branch: main
commit 9f6d6ca10611cd1af3d81534baa674db335a4dc0
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Dec 02 20:33:14 2022
Remove some C++ toolchain workarounds
Remove toolchain workarounds for C++ header files
location and GNU_SOURCE as they are fixed in clang.
BRANCH=none
BUG=b:254916723, b:234507656, b:241489000
TEST=./util/compare_build.sh -b all -j 120
Change-Id: I8e1cd634c1085803fddcc2dec8f5667453a5e0e6
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Reviewed-on:https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4074063
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
M Makefile.toolchain
M cmake/toolchain-armv7m.cmake
https://chromium-review.googlesource.com/4074063
Branch: main
commit 9f6d6ca10611cd1af3d81534baa674db335a4dc0
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Dec 02 20:33:14 2022
Remove some C++ toolchain workarounds
Remove toolchain workarounds for C++ header files
location and GNU_SOURCE as they are fixed in clang.
BRANCH=none
BUG=b:254916723, b:234507656, b:241489000
TEST=./util/compare_build.sh -b all -j 120
Change-Id: I8e1cd634c1085803fddcc2dec8f5667453a5e0e6
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Reviewed-on:
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
M Makefile.toolchain
M cmake/toolchain-armv7m.cmake
Description
When building [ is not defined automatically by
libcxx
], I noticed that_GNU_SOURCE
armv7m-cros-eabi-clang++
.Some comparisons (where
empty.cc
is an empty file):_GNU_SOURCE
is defined:_GNU_SOURCE
is not defined:It looks the baremetal variants don't define it. I guess the assumption is that baremetal targets won't use
libc
?