Status Update
Comments
aj...@google.com <aj...@google.com> #2
CCing +tomhughes and +inglorion, as requested by Bob
aj...@google.com <aj...@google.com> #3
Updated title to reflect that it's not just bloonchipper, but all fpmcu-unittests
packages.
to...@google.com <to...@google.com> #4
The title says fails to build because std::auto_ptr was removed
, but I don't think we're using std::auto_ptr
anywhere (at least not intentionally), and I don't see it mentioned in the error message.
For this error,
/usr/bin/../include/c++/v1/__config:821:8: error: "No thread API"
821 | # error "No thread API"
| ^
We do build libc++
with thread support disabled
aj...@google.com <aj...@google.com> #5
Ah, yes, sorry. Title was from the other bugs that took this same format (there's a lot of them!). Updated.
This is roughly
And at the
So I'm guessing for whatever reason, _LIBCPP_HAS_NO_THREADS
is 0 for the ECs.
aj...@google.com <aj...@google.com> #6
Setting V=1, I believe I have the commandline invocation that causes this:
make[1]: Entering directory '/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec'
/usr/bin/ccache armv7m-cros-eabi-clang -E -P -DSECTION_IS_RO= -Itest -DTEST_BUILD= -imacros abort.tasklist -Iboard/bloonchipper -DBOARD_BLOONCHIPPER= -Ibaseboard/bloonchipper -DBASEBOARD_BLOONCHIPPER= -D_MAKEFILE= -imacros ec.tasklist include/task_filter.h
/usr/bin/ccache armv7m-cros-eabi-clang -E -P -DSECTION_IS_RW= -Itest -DTEST_BUILD= -imacros abort.tasklist -Iboard/bloonchipper -DBOARD_BLOONCHIPPER= -Ibaseboard/bloonchipper -DBASEBOARD_BLOONCHIPPER= -D_MAKEFILE= -imacros ec.tasklist include/task_filter.h
/usr/bin/ccache armv7m-cros-eabi-clang -E -DOUTDIR=build/bloonchipper/abort/RO -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_RO= -DSECTION=RO -DHAS_TASK_RWSIG= -DHAS_TASK_FPSENSOR_RW= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -P -dM -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper include/config.h | grep -o "#define \(CONFIG\|VARIANT\)_[A-Z0-9_]*" | cut -c9- | sort
/usr/bin/ccache armv7m-cros-eabi-clang -E -DOUTDIR=build/bloonchipper/abort/RW -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_RW= -DSECTION=RW -DHAS_TASK_FPSENSOR= -DHAS_TASK_RWSIG_RO= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -P -dM -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper include/config.h | grep -o "#define \(CONFIG\|VARIANT\)_[A-Z0-9_]*" | cut -c9- | sort
echo "CONFIG_RW_MEM_OFF" | /usr/bin/ccache armv7m-cros-eabi-clang -E -DOUTDIR=build/bloonchipper/abort/ -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_= -DSECTION= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -P -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper -imacros include/config.h -
echo "CONFIG_RW_SIZE" | /usr/bin/ccache armv7m-cros-eabi-clang -E -DOUTDIR=build/bloonchipper/abort/ -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_= -DSECTION= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -P -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper -imacros include/config.h -
echo "CONFIG_PROGRAM_MEMORY_BASE" | /usr/bin/ccache armv7m-cros-eabi-clang -E -DOUTDIR=build/bloonchipper/abort/ -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_= -DSECTION= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -P -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper -imacros include/config.h -
armv7m-cros-eabi-clang++ -std=gnu++2a -DOUTDIR=build/bloonchipper/abort/RW -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Icore/cortex-m -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper -Icommon -Ifuzz -Ipower -Itest -Icts/common -Icts/ -Ibuild/bloonchipper/abort/gen -I../ec-private -Icommon -Icommon/fpsensor -Icommon/mock -Icommon/spi -Icommon/spi/flash_reg -Icommon/spi/flash_reg/private -Icommon/spi/flash_reg/public -Icommon/spi/flash_reg/src -Icommon/usbc -Icommon/vboot -Idriver -Idriver/battery -Idriver/bc12 -Idriver/cec -Idriver/charger -Idriver/fingerprint -Idriver/fingerprint/egis -Idriver/fingerprint/egis/platform -Idriver/fingerprint/egis/platform/inc -Idriver/fingerprint/egis/platform/src -Idriver/fingerprint/elan -Idriver/fingerprint/fpc -Idriver/fingerprint/fpc/bep -Idriver/fingerprint/fpc/libfp -Idriver/ioexpander -Idriver/led -Idriver/nfc -Idriver/ppc -Idriver/retimer -Idriver/sha256 -Idriver/tcpm -Idriver/temp_sensor -Idriver/usb_mux -Idriver/wpc -Ilibc -Ithird_party/boringssl/common -Icrypto -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -Ispi/flash_regpublic -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_RW= -DSECTION=RW -DHAS_TASK_FPSENSOR= -DHAS_TASK_RWSIG_RO= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -I../../third_party/boringssl -I../../third_party/boringssl/include -I/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include -DCROS_EC -mcpu=cortex-m4 -mcpu=cortex-m4 -mthumb -Oz -Wl,-mllvm -Wl,-inline-threshold=-10 -mno-unaligned-access -mfloat-abi=hard -flto -g -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -fno-common -fno-strict-aliasing -fno-strict-overflow -Wimplicit-fallthrough -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Werror -ftrapv -Werror=uninitialized -Wno-unused-function -ffunction-sections -fno-delete-null-pointer-checks -fno-PIC -Wvla -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -fno-common -fno-strict-aliasing -fno-strict-overflow -Wimplicit-fallthrough -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Werror -ftrapv -Werror=uninitialized -Wno-unused-function -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -MMD -MP -MF build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d -c common/fpsensor/fpsensor.cc -MT build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -o build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o
In file included from common/fpsensor/fpsensor.cc:7:
In file included from core/cortex-m/atomic.h:12:
In file included from include/common.h:11:
In file included from include/compile_time_macros.h:12:
In file included from /usr/bin/../include/c++/v1/type_traits:420:
/usr/bin/../include/c++/v1/__config:821:8: error: "No thread API"
821 | # error "No thread API"
| ^
aj...@google.com <aj...@google.com> #7
And with -print-cmdline
:
ajordanr@chrysalis /build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec $ armv7m-cros-eabi-clang++ -std=gnu++2a -DOUTDIR=build/bloonchipper/abort/RW -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Icore/cortex-m -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper -Icommon -Ifuzz -Ipower -Itest -Icts/common -Icts/ -Ibuild/bloonchipper/abort/gen -I../ec-private -Icommon -Icommon/fpsensor -Icommon/mock -Icommon/spi -Icommon/spi/flash_reg -Icommon/spi/flash_reg/private -Icommon/spi/flash_reg/public -Icommon/spi/flash_reg/src -Icommon/usbc -Icommon/vboot -Idriver -Idriver/battery -Idriver/bc12 -Idriver/cec -Idriver/charger -Idriver/fingerprint -Idriver/fingerprint/egis -Idriver/fingerprint/egis/platform -Idriver/fingerprint/egis/platform/inc -Idriver/fingerprint/egis/platform/src -Idriver/fingerprint/elan -Idriver/fingerprint/fpc -Idriver/fingerprint/fpc/bep -Idriver/fingerprint/fpc/libfp -Idriver/ioexpander -Idriver/led -Idriver/nfc -Idriver/ppc -Idriver/retimer -Idriver/sha256 -Idriver/tcpm -Idriver/temp_sensor -Idriver/usb_mux -Idriver/wpc -Ilibc -Ithird_party/boringssl/common -Icrypto -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -Ispi/flash_regpublic -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_RW= -DSECTION=RW -DHAS_TASK_FPSENSOR= -DHAS_TASK_RWSIG_RO= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -I../../third_party/boringssl -I../../third_party/boringssl/include -I/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include -DCROS_EC -mcpu=cortex-m4 -mcpu=cortex-m4 -mthumb -Oz -Wl,-mllvm -Wl,-inline-threshold=-10 -mno-unaligned-access -mfloat-abi=hard -flto -g -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -fno-common -fno-strict-aliasing -fno-strict-overflow -Wimplicit-fallthrough -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Werror -ftrapv -Werror=uninitialized -Wno-unused-function -ffunction-sections -fno-delete-null-pointer-checks -fno-PIC -Wvla -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -fno-common -fno-strict-aliasing -fno-strict-overflow -Wimplicit-fallthrough -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Werror -ftrapv -Werror=uninitialized -Wno-unused-function -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -MMD -MP -MF build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d -c common/fpsensor/fpsensor.cc -MT build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -o build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -print-cmdline
cd '/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec' && env 'CCACHE_DIR=/var/cache/distfiles/ccache' 'CCACHE_UMASK=002' 'CCACHE_CPP2=yes' '/usr/bin/ccache' '/usr/bin/clang++' '--sysroot=/usr/armv7m-cros-eabi' '-Qunused-arguments' '-Werror=poison-system-directories' '-Wno-deprecated-declarations' '-Wno-error=implicit-function-declaration' '-Wno-error=implicit-int' '-Wno-unknown-warning-option' '-fdebug-default-version=5' '-Wno-int-conversion' '-Wno-incompatible-function-pointer-types' '-Wno-error=vla-cxx-extension' '-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES' '-Wno-section' '-static-libgcc' '--prefix=../../../../../../../../../../usr/libexec/gcc/armv7m-cros-eabi/armv7m-cros-eabi-' '-std=gnu++2a' '-DOUTDIR=build/bloonchipper/abort/RW' '-DCHIP=stm32' '-DBOARD_TASKFILE=ec.tasklist' '-DBOARD=bloonchipper' '-DCORE=cortex-m' '-DPROJECT=abort' '-DCHIP_VARIANT=stm32f412' '-DCHIP_FAMILY=STM32F4' '-DBOARD_BLOONCHIPPER=' '-DCHIP_STM32=' '-DCORE_CORTEX_M=' '-DCHIP_VARIANT_STM32F412=' '-DCHIP_FAMILY_STM32F4=' '-DFINAL_OUTDIR=build/bloonchipper/abort' '-DPROTOBUF_MIN_PROTOC_VERSION=0' '-DHAS_BASEBOARD=' '-DBASEBOARD_BLOONCHIPPER=' '-Iinclude' '-Icore/cortex-m/include' '-Iinclude/driver' '-Icore/cortex-m' '-Ichip/stm32' '-Ibaseboard/bloonchipper' '-Iboard/bloonchipper' '-Icommon' '-Ifuzz' '-Ipower' '-Itest' '-Icts/common' '-Icts/' '-Ibuild/bloonchipper/abort/gen' '-I../ec-private' '-Icommon' '-Icommon/fpsensor' '-Icommon/mock' '-Icommon/spi' '-Icommon/spi/flash_reg' '-Icommon/spi/flash_reg/private' '-Icommon/spi/flash_reg/public' '-Icommon/spi/flash_reg/src' '-Icommon/usbc' '-Icommon/vboot' '-Idriver' '-Idriver/battery' '-Idriver/bc12' '-Idriver/cec' '-Idriver/charger' '-Idriver/fingerprint' '-Idriver/fingerprint/egis' '-Idriver/fingerprint/egis/platform' '-Idriver/fingerprint/egis/platform/inc' '-Idriver/fingerprint/egis/platform/src' '-Idriver/fingerprint/elan' '-Idriver/fingerprint/fpc' '-Idriver/fingerprint/fpc/bep' '-Idriver/fingerprint/fpc/libfp' '-Idriver/ioexpander' '-Idriver/led' '-Idriver/nfc' '-Idriver/ppc' '-Idriver/retimer' '-Idriver/sha256' '-Idriver/tcpm' '-Idriver/temp_sensor' '-Idriver/usb_mux' '-Idriver/wpc' '-Ilibc' '-Ithird_party/boringssl/common' '-Icrypto' '-Ibuild/bloonchipper/abort' '-Ifuzz' '-Itest' '-Ithird_party' '-Ispi/flash_regpublic' '-I.' '-DTEST_BUILD=' '-DTEST_LEGACY_BUILD=' '-DTEST_TASKFILE=abort.tasklist' '-DTEST_abort=' '-DTEST_ABORT=' '-Iinclude/driver' '-DSECTION_IS_RW=' '-DSECTION=RW' '-DHAS_TASK_FPSENSOR=' '-DHAS_TASK_RWSIG_RO=' '-fno-PIC' '-DCHROMIUM_EC=' '-DHAS_TASK_HOOKS=' '-DHAS_TASK_HOSTCMD=' '-DHAS_TASK_CONSOLE=' '-DHAS_TASK_TEST=' '-I../../third_party/boringssl' '-I../../third_party/boringssl/include' '-I/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include' '-DCROS_EC' '-mcpu=cortex-m4' '-mcpu=cortex-m4' '-mthumb' '-Oz' '-Wl,-mllvm' '-Wl,-inline-threshold=-10' '-mno-unaligned-access' '-mfloat-abi=hard' '-flto' '-g' '-Wall' '-Wundef' '-Wno-trigraphs' '-Wno-format-security' '-Wno-address-of-packed-member' '-fno-common' '-fno-strict-aliasing' '-fno-strict-overflow' '-Wimplicit-fallthrough' '-fno-exceptions' '-fno-unwind-tables' '-fno-asynchronous-unwind-tables' '-Werror' '-ftrapv' '-Werror=uninitialized' '-Wno-unused-function' '-ffunction-sections' '-fno-delete-null-pointer-checks' '-fno-PIC' '-Wvla' '-Wall' '-Wundef' '-Wno-trigraphs' '-Wno-format-security' '-Wno-address-of-packed-member' '-fno-common' '-fno-strict-aliasing' '-fno-strict-overflow' '-Wimplicit-fallthrough' '-fno-exceptions' '-fno-unwind-tables' '-fno-asynchronous-unwind-tables' '-Werror' '-ftrapv' '-Werror=uninitialized' '-Wno-unused-function' '-DPROTOBUF_INLINE_NOT_IN_HEADERS=0' '-MMD' '-MP' '-MF' 'build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d' '-c' 'common/fpsensor/fpsensor.cc' '-MT' 'build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o' '-o' 'build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o' '-L/usr/armv7m-cros-eabi/usr/lib' '-B../../../../../../../../../../usr/libexec/gcc/armv7m-cros-eabi' '-target' 'armv7m-cros-eabi'
aj...@google.com <aj...@google.com> #8
Hold on. Why is this including /usr/include/c++/v1/__config
? Actually, scratch that, it probably is using the right sysroot because of --sysroot.
aj...@google.com <aj...@google.com> #9
No wait, hmm.
the /usr/armv7m-cros-eabi/usr/include/c++/v1/__config_site
sets _LIBCPP_HAS_NO_THREADS
:
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef _LIBCPP___CONFIG_SITE
10 #define _LIBCPP___CONFIG_SITE
11 #define _LIBCPP_VERBOSE_ABORT(...)
12
13 #define _LIBCPP_ABI_VERSION 1
14 #define _LIBCPP_ABI_NAMESPACE __1
15 /* #undef _LIBCPP_ABI_FORCE_ITANIUM */
16 /* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
17 #define _LIBCPP_HAS_NO_THREADS
18 #define _LIBCPP_HAS_NO_MONOTONIC_CLOCK
19 /* #undef _LIBCPP_HAS_NO_TERMINAL */
20 /* #undef _LIBCPP_HAS_MUSL_LIBC */
21 /* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
22 /* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
23 /* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
24 /* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
25 #define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
26 /* #undef _LIBCPP_NO_VCRUNTIME */
27 /* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
28 #define _LIBCPP_HAS_NO_FILESYSTEM
29 #define _LIBCPP_HAS_NO_RANDOM_DEVICE
30 /* #undef _LIBCPP_HAS_NO_LOCALIZATION */
31 #define _LIBCPP_HAS_NO_UNICODE
32 /* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
33 /* #undef _LIBCPP_HAS_NO_STD_MODULES */
34 /* #undef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE */
35 /* #undef _LIBCPP_INSTRUMENTED_WITH_ASAN */
36
37 // PSTL backends
38 #define _LIBCPP_PSTL_BACKEND_SERIAL
39 /* #undef _LIBCPP_PSTL_BACKEND_STD_THREAD */
40 /* #undef _LIBCPP_PSTL_BACKEND_LIBDISPATCH */
41
42 // Hardening.
43 #define _LIBCPP_HARDENING_MODE_DEFAULT 2
44
45 // __USE_MINGW_ANSI_STDIO gets redefined on MinGW
46 #ifdef __clang__
47 # pragma clang diagnostic push
48 # pragma clang diagnostic ignored "-Wmacro-redefined"
49 #endif
50
51
52
53
54 #ifdef __clang__
55 # pragma clang diagnostic pop
56 #endif
57
Maybe it isn't using the right sysroot?
See in comparison to /usr/include/c++/v1/__config_site
:
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef _LIBCPP___CONFIG_SITE
10 #define _LIBCPP___CONFIG_SITE
11
12 #define _LIBCPP_ABI_VERSION 1
13 #define _LIBCPP_ABI_NAMESPACE __1
14 /* #undef _LIBCPP_ABI_FORCE_ITANIUM */
15 /* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
16 /* #undef _LIBCPP_HAS_NO_THREADS */
17 /* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
18 /* #undef _LIBCPP_HAS_NO_TERMINAL */
19 /* #undef _LIBCPP_HAS_MUSL_LIBC */
20 /* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
21 /* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
22 /* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
23 /* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
24 #define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
25 /* #undef _LIBCPP_NO_VCRUNTIME */
26 /* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
27 /* #undef _LIBCPP_HAS_NO_FILESYSTEM */
28 /* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
29 /* #undef _LIBCPP_HAS_NO_LOCALIZATION */
30 /* #undef _LIBCPP_HAS_NO_UNICODE */
31 /* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
32 /* #undef _LIBCPP_HAS_NO_STD_MODULES */
33 /* #undef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE */
34 /* #undef _LIBCPP_INSTRUMENTED_WITH_ASAN */
35
36 // PSTL backends
37 /* #undef _LIBCPP_PSTL_BACKEND_SERIAL */
38 #define _LIBCPP_PSTL_BACKEND_STD_THREAD
39 /* #undef _LIBCPP_PSTL_BACKEND_LIBDISPATCH */
40
41 // Hardening.
42 #define _LIBCPP_HARDENING_MODE_DEFAULT 2
43
44 // __USE_MINGW_ANSI_STDIO gets redefined on MinGW
45 #ifdef __clang__
46 # pragma clang diagnostic push
47 # pragma clang diagnostic ignored "-Wmacro-redefined"
48 #endif
49
50
51
52
53 #ifdef __clang__
54 # pragma clang diagnostic pop
55 #endif
56
57 #endif // _LIBCPP___CONFIG_SITE
aj...@google.com <aj...@google.com> #10
Okay, indeed that's what's happening. It's using /usr/include/c++/v1/__config_site
, and instead it should be using /usr/armv7m-cros-eabi/usr/include/c++/v1/__config_site
. I found this out by changing every single __config
header in the chroot until I found the one that caused this.
In file included from common/fpsensor/fpsensor.cc:7:
In file included from core/cortex-m/atomic.h:12:
In file included from include/common.h:11:
In file included from include/compile_time_macros.h:12:
In file included from /usr/bin/../include/c++/v1/type_traits:420:
/usr/bin/../include/c++/v1/__config:821:8: error: "ajordanr: chroot's /usr/include/c++/v1/__config No thread API"
821 | # error "ajordanr: chroot's /usr/include/c++/v1/__config No thread API"
| ^
aj...@google.com <aj...@google.com> #11
I have figured out what's wrong. By appending -v
to the command line, we can get the include search path for this fpsensor.cc
file. So while we do see /usr/armv7m-cros-eabi/usr/include/c++/v1
, it's notably after in the search path for /usr/bin/../include/c++/v1
. I'm not sure how the ordering of this happens, or why the system includes are there first consistently.
$ cd \
'/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec' \
&& \
env \
'CCACHE_DIR=/var/cache/distfiles/ccache' \
'CCACHE_UMASK=002' \
'CCACHE_CPP2=yes' \
'/usr/bin/ccache' \
'/usr/bin/clang++' \
'-Qunused-arguments' \
'-Werror=poison-system-directories' \
'-Wno-deprecated-declarations' \
'-Wno-error=implicit-function-declaration' \
'-Wno-error=implicit-int' \
'-Wno-unknown-warning-option' \
'-fdebug-default-version=5' \
'-Wno-int-conversion' \
'-Wno-incompatible-function-pointer-types' \
'-Wno-error=vla-cxx-extension' \
'-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES' \
'-Wno-section' \
'-static-libgcc' \
'--prefix=../../../../../../../../../../usr/libexec/gcc/armv7m-cros-eabi/armv7m-cros-eabi-' \
'-std=gnu++2a' \
'-DOUTDIR=build/bloonchipper/abort/RW' \
'-DCHIP=stm32' \
'-DBOARD_TASKFILE=ec.tasklist' \
'-DBOARD=bloonchipper' \
'-DCORE=cortex-m' \
'-DPROJECT=abort' \
'-DCHIP_VARIANT=stm32f412' \
'-DCHIP_FAMILY=STM32F4' \
'-DBOARD_BLOONCHIPPER=' \
'-DCHIP_STM32=' \
'-DCORE_CORTEX_M=' \
'-DCHIP_VARIANT_STM32F412=' \
'-DCHIP_FAMILY_STM32F4=' \
'-DFINAL_OUTDIR=build/bloonchipper/abort' \
'-DPROTOBUF_MIN_PROTOC_VERSION=0' \
'-DHAS_BASEBOARD=' \
'-DBASEBOARD_BLOONCHIPPER=' \
'-Iinclude' \
'-Icore/cortex-m/include' \
'-Iinclude/driver' \
'-Icore/cortex-m' \
'-Ichip/stm32' \
'-Ibaseboard/bloonchipper' \
'-Iboard/bloonchipper' \
'-Icommon' \
'-Ifuzz' \
'-Ipower' \
'-Itest' \
'-Icts/common' \
'-Icts/' \
'-Ibuild/bloonchipper/abort/gen' \
'-I../ec-private' \
'-Icommon' \
'-Icommon/fpsensor' \
'-Icommon/mock' \
'-Icommon/spi' \
'-Icommon/spi/flash_reg' \
'-Icommon/spi/flash_reg/private' \
'-Icommon/spi/flash_reg/public' \
'-Icommon/spi/flash_reg/src' \
'-Icommon/usbc' \
'-Icommon/vboot' \
'-Idriver' \
'-Idriver/battery' \
'-Idriver/bc12' \
'-Idriver/cec' \
'-Idriver/charger' \
'-Idriver/fingerprint' \
'-Idriver/fingerprint/egis' \
'-Idriver/fingerprint/egis/platform' \
'-Idriver/fingerprint/egis/platform/inc' \
'-Idriver/fingerprint/egis/platform/src' \
'-Idriver/fingerprint/elan' \
'-Idriver/fingerprint/fpc' \
'-Idriver/fingerprint/fpc/bep' \
'-Idriver/fingerprint/fpc/libfp' \
'-Idriver/ioexpander' \
'-Idriver/led' \
'-Idriver/nfc' \
'-Idriver/ppc' \
'-Idriver/retimer' \
'-Idriver/sha256' \
'-Idriver/tcpm' \
'-Idriver/temp_sensor' \
'-Idriver/usb_mux' \
'-Idriver/wpc' \
'-Ilibc' \
'-Ithird_party/boringssl/common' \
'-Icrypto' \
'-Ibuild/bloonchipper/abort' \
'-Ifuzz' \
'-Itest' \
'-Ithird_party' \
'-Ispi/flash_regpublic' \
'-I.' \
'-DTEST_BUILD=' \
'-DTEST_LEGACY_BUILD=' \
'-DTEST_TASKFILE=abort.tasklist' \
'-DTEST_abort=' \
'-DTEST_ABORT=' \
'-Iinclude/driver' \
'-DSECTION_IS_RW=' \
'-DSECTION=RW' \
'-DHAS_TASK_FPSENSOR=' \
'-DHAS_TASK_RWSIG_RO=' \
'-fno-PIC' \
'-DCHROMIUM_EC=' \
'-DHAS_TASK_HOOKS=' \
'-DHAS_TASK_HOSTCMD=' \
'-DHAS_TASK_CONSOLE=' \
'-DHAS_TASK_TEST=' \
'-I../../third_party/boringssl' \
'-I../../third_party/boringssl/include' \
'-I/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include' \
'-DCROS_EC' \
'-mcpu=cortex-m4' \
'-mcpu=cortex-m4' \
'-mthumb' \
'-Oz' \
'-Wl,-mllvm' \
'-Wl,-inline-threshold=-10' \
'-mno-unaligned-access' \
'-mfloat-abi=hard' \
'-flto' \
'-g' \
'-Wall' \
'-Wundef' \
'-Wno-trigraphs' \
'-Wno-format-security' \
'-Wno-address-of-packed-member' \
'-fno-common' \
'-fno-strict-aliasing' \
'-fno-strict-overflow' \
'-Wimplicit-fallthrough' \
'-fno-exceptions' \
'-fno-unwind-tables' \
'-fno-asynchronous-unwind-tables' \
'-Werror' \
'-ftrapv' \
'-Werror=uninitialized' \
'-Wno-unused-function' \
'-ffunction-sections' \
'-fno-delete-null-pointer-checks' \
'-fno-PIC' \
'-Wvla' \
'-Wall' \
'-Wundef' \
'-Wno-trigraphs' \
'-Wno-format-security' \
'-Wno-address-of-packed-member' \
'-fno-common' \
'-fno-strict-aliasing' \
'-fno-strict-overflow' \
'-Wimplicit-fallthrough' \
'-fno-exceptions' \
'-fno-unwind-tables' \
'-fno-asynchronous-unwind-tables' \
'-Werror' \
'-ftrapv' \
'-Werror=uninitialized' \
'-Wno-unused-function' \
'-DPROTOBUF_INLINE_NOT_IN_HEADERS=0' \
'-MMD' \
'-MP' \
'-MF' \
'build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d' \
'-c' \
'common/fpsensor/fpsensor.cc' \
'-MT' \
'build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o' \
'-o' \
'build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o' \
'-L/usr/armv7m-cros-eabi/usr/lib' \
'-B../../../../../../../../../../usr/libexec/gcc/armv7m-cros-eabi' \
'-target' \
'armv7m-cros-eabi' \
'--sysroot=/usr/armv7m-cros-eabi' \
'-v'
Chromium OS 9999 clang version 20.0.0git (https://chromium.googlesource.com/external/github.com/llvm/llvm-project 696a2a0a02b23000c2ea96e6501eda120a8d9d29)
Target: armv7m-cros-unknown-eabi
Thread model: posix
InstalledDir: /usr/bin
(in-process)
"/usr/bin/clang-20" -cc1 -triple thumbv7em-cros-unknown-eabihf -emit-llvm-bc -flto=full -flto-unit -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name fpsensor.cc -mrelocation-model static -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -nostdsysteminc -target-cpu cortex-m4 -target-feature -crc -target-feature -dotprod -target-feature +dsp -target-feature -mve -target-feature -mve.fp -target-feature -ras -target-feature -bf16 -target-feature -sb -target-feature -i8mm -target-feature -lob -target-feature -cdecp0 -target-feature -cdecp1 -target-feature -cdecp2 -target-feature -cdecp3 -target-feature -cdecp4 -target-feature -cdecp5 -target-feature -cdecp6 -target-feature -cdecp7 -target-feature -pacbti -target-feature -hwdiv-arm -target-feature +hwdiv -target-feature -vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature -vfp3d16 -target-feature +vfp3d16sp -target-feature -vfp3sp -target-feature +fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature +vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature -fp64 -target-feature -d32 -target-feature -neon -target-feature -fp16fml -target-feature -crypto -target-feature -sha2 -target-feature -aes -target-feature +strict-align -target-abi aapcs -mfloat-abi hard -Wunaligned-access -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fdebug-compilation-dir=/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec -v -ffunction-sections -fcoverage-compilation-dir=/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec -resource-dir /usr/lib64/clang/20 -dependency-file build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d -MT build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -MP -D _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -D OUTDIR=build/bloonchipper/abort/RW -D CHIP=stm32 -D BOARD_TASKFILE=ec.tasklist -D BOARD=bloonchipper -D CORE=cortex-m -D PROJECT=abort -D CHIP_VARIANT=stm32f412 -D CHIP_FAMILY=STM32F4 -D BOARD_BLOONCHIPPER= -D CHIP_STM32= -D CORE_CORTEX_M= -D CHIP_VARIANT_STM32F412= -D CHIP_FAMILY_STM32F4= -D FINAL_OUTDIR=build/bloonchipper/abort -D PROTOBUF_MIN_PROTOC_VERSION=0 -D HAS_BASEBOARD= -D BASEBOARD_BLOONCHIPPER= -I include -I core/cortex-m/include -I include/driver -I core/cortex-m -I chip/stm32 -I baseboard/bloonchipper -I board/bloonchipper -I common -I fuzz -I power -I test -I cts/common -I cts/ -I build/bloonchipper/abort/gen -I ../ec-private -I common -I common/fpsensor -I common/mock -I common/spi -I common/spi/flash_reg -I common/spi/flash_reg/private -I common/spi/flash_reg/public -I common/spi/flash_reg/src -I common/usbc -I common/vboot -I driver -I driver/battery -I driver/bc12 -I driver/cec -I driver/charger -I driver/fingerprint -I driver/fingerprint/egis -I driver/fingerprint/egis/platform -I driver/fingerprint/egis/platform/inc -I driver/fingerprint/egis/platform/src -I driver/fingerprint/elan -I driver/fingerprint/fpc -I driver/fingerprint/fpc/bep -I driver/fingerprint/fpc/libfp -I driver/ioexpander -I driver/led -I driver/nfc -I driver/ppc -I driver/retimer -I driver/sha256 -I driver/tcpm -I driver/temp_sensor -I driver/usb_mux -I driver/wpc -I libc -I third_party/boringssl/common -I crypto -I build/bloonchipper/abort -I fuzz -I test -I third_party -I spi/flash_regpublic -I . -D TEST_BUILD= -D TEST_LEGACY_BUILD= -D TEST_TASKFILE=abort.tasklist -D TEST_abort= -D TEST_ABORT= -I include/driver -D SECTION_IS_RW= -D SECTION=RW -D HAS_TASK_FPSENSOR= -D HAS_TASK_RWSIG_RO= -D CHROMIUM_EC= -D HAS_TASK_HOOKS= -D HAS_TASK_HOSTCMD= -D HAS_TASK_CONSOLE= -D HAS_TASK_TEST= -I ../../third_party/boringssl -I ../../third_party/boringssl/include -I /build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include -D CROS_EC -D PROTOBUF_INLINE_NOT_IN_HEADERS=0 -isysroot /usr/armv7m-cros-eabi -internal-isystem /usr/bin/../include/armv7m-cros-unknown-eabi/c++/v1 -internal-isystem /usr/bin/../include/c++/v1 -internal-isystem /usr/armv7m-cros-eabi/usr/include/c++/v1 -internal-isystem /usr/lib64/clang/20/include -internal-isystem /usr/armv7m-cros-eabi/include -Oz -Werror=poison-system-directories -Wno-deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-unknown-warning-option -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-error=vla-cxx-extension -Wno-section -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -Wimplicit-fallthrough -Werror -Werror=uninitialized -Wno-unused-function -Wvla -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -Wimplicit-fallthrough -Werror -Werror=uninitialized -Wno-unused-function -std=gnu++2a -fdeprecated-macro -ferror-limit 19 -ftrapv -fwrapv -fno-signed-char -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcolor-diagnostics -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -x c++ common/fpsensor/fpsensor.cc
-->8--
ignoring nonexistent directory "../ec-private"
ignoring nonexistent directory "spi/flash_regpublic"
ignoring nonexistent directory "/usr/bin/../include/armv7m-cros-unknown-eabi/c++/v1"
ignoring duplicate directory "common"
ignoring duplicate directory "fuzz"
ignoring duplicate directory "test"
ignoring duplicate directory "include/driver"
ignoring duplicate directory "/usr/lib64/clang/20/include"
#include "..." search starts here:
#include <...> search starts here:
include
core/cortex-m/include
include/driver
core/cortex-m
chip/stm32
baseboard/bloonchipper
board/bloonchipper
common
fuzz
power
test
cts/common
cts
build/bloonchipper/abort/gen
common/fpsensor
common/mock
common/spi
common/spi/flash_reg
common/spi/flash_reg/private
common/spi/flash_reg/public
common/spi/flash_reg/src
common/usbc
common/vboot
driver
driver/battery
driver/bc12
driver/cec
driver/charger
driver/fingerprint
driver/fingerprint/egis
driver/fingerprint/egis/platform
driver/fingerprint/egis/platform/inc
driver/fingerprint/egis/platform/src
driver/fingerprint/elan
driver/fingerprint/fpc
driver/fingerprint/fpc/bep
driver/fingerprint/fpc/libfp
driver/ioexpander
driver/led
driver/nfc
driver/ppc
driver/retimer
driver/sha256
driver/tcpm
driver/temp_sensor
driver/usb_mux
driver/wpc
libc
third_party/boringssl/common
crypto
build/bloonchipper/abort
third_party
.
../../third_party/boringssl
../../third_party/boringssl/include
/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include
/usr/bin/../include/c++/v1
/usr/armv7m-cros-eabi/usr/include/c++/v1
/usr/lib64/clang/20/include
/usr/armv7m-cros-eabi/include
End of search list.
-->8--
aj...@google.com <aj...@google.com> #12
Notably in comparison to the old toolchain:
ajordanr@chrysalis /build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec $ source ~/cmdline
Chromium OS 19.0_pre530567 clang version 19.0.0git (/mnt/host/source/src/third_party/llvm-project 3b5e7c83a6e226d5bd7ed2e9b67449b64812074c)
Target: armv7m-cros-unknown-eabi
Thread model: posix
InstalledDir: /usr/bin
(in-process)
"/usr/bin/clang-19" -cc1 -triple thumbv7em-cros-unknown-eabihf -emit-llvm-bc -flto=full -flto-unit -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name fpsensor.cc -mrelocation-model static -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -nostdsysteminc -target-cpu cortex-m4 -target-feature -crc -target-feature -dotprod -target-feature +dsp -target-feature -mve -target-feature -mve.fp -target-feature -ras -target-feature -bf16 -target-feature -sb -target-feature -i8mm -target-feature -lob -target-feature -cdecp0 -target-feature -cdecp1 -target-feature -cdecp2 -target-feature -cdecp3 -target-feature -cdecp4 -target-feature -cdecp5 -target-feature -cdecp6 -target-feature -cdecp7 -target-feature -pacbti -target-feature -hwdiv-arm -target-feature +hwdiv -target-feature -vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature -vfp3d16 -target-feature +vfp3d16sp -target-feature -vfp3sp -target-feature +fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature +vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature -fp64 -target-feature -d32 -target-feature -neon -target-feature -fp16fml -target-feature -crypto -target-feature -sha2 -target-feature -aes -target-feature +strict-align -target-abi aapcs -mfloat-abi hard -Wunaligned-access -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fdebug-compilation-dir=/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec -v -ffunction-sections -fcoverage-compilation-dir=/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec -resource-dir /usr/lib64/clang/19 -dependency-file build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d -MT build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -MP -D _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -D OUTDIR=build/bloonchipper/abort/RW -D CHIP=stm32 -D BOARD_TASKFILE=ec.tasklist -D BOARD=bloonchipper -D CORE=cortex-m -D PROJECT=abort -D CHIP_VARIANT=stm32f412 -D CHIP_FAMILY=STM32F4 -D BOARD_BLOONCHIPPER= -D CHIP_STM32= -D CORE_CORTEX_M= -D CHIP_VARIANT_STM32F412= -D CHIP_FAMILY_STM32F4= -D FINAL_OUTDIR=build/bloonchipper/abort -D PROTOBUF_MIN_PROTOC_VERSION=0 -D HAS_BASEBOARD= -D BASEBOARD_BLOONCHIPPER= -I include -I core/cortex-m/include -I include/driver -I core/cortex-m -I chip/stm32 -I baseboard/bloonchipper -I board/bloonchipper -I common -I fuzz -I power -I test -I cts/common -I cts/ -I build/bloonchipper/abort/gen -I ../ec-private -I common -I common/fpsensor -I common/mock -I common/spi -I common/spi/flash_reg -I common/spi/flash_reg/private -I common/spi/flash_reg/public -I common/spi/flash_reg/src -I common/usbc -I common/vboot -I driver -I driver/battery -I driver/bc12 -I driver/cec -I driver/charger -I driver/fingerprint -I driver/fingerprint/egis -I driver/fingerprint/egis/platform -I driver/fingerprint/egis/platform/inc -I driver/fingerprint/egis/platform/src -I driver/fingerprint/elan -I driver/fingerprint/fpc -I driver/fingerprint/fpc/bep -I driver/fingerprint/fpc/libfp -I driver/ioexpander -I driver/led -I driver/nfc -I driver/ppc -I driver/retimer -I driver/sha256 -I driver/tcpm -I driver/temp_sensor -I driver/usb_mux -I driver/wpc -I libc -I third_party/boringssl/common -I crypto -I build/bloonchipper/abort -I fuzz -I test -I third_party -I spi/flash_regpublic -I . -D TEST_BUILD= -D TEST_LEGACY_BUILD= -D TEST_TASKFILE=abort.tasklist -D TEST_abort= -D TEST_ABORT= -I include/driver -D SECTION_IS_RW= -D SECTION=RW -D HAS_TASK_FPSENSOR= -D HAS_TASK_RWSIG_RO= -D CHROMIUM_EC= -D HAS_TASK_HOOKS= -D HAS_TASK_HOSTCMD= -D HAS_TASK_CONSOLE= -D HAS_TASK_TEST= -I ../../third_party/boringssl -I ../../third_party/boringssl/include -I /build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include -D CROS_EC -D PROTOBUF_INLINE_NOT_IN_HEADERS=0 -isysroot /usr/armv7m-cros-eabi -internal-isystem /usr/armv7m-cros-eabi/usr/include/c++/v1 -internal-isystem /usr/lib64/clang/19/include -internal-isystem /usr/armv7m-cros-eabi/include -Oz -Werror=poison-system-directories -Wno-deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-unknown-warning-option -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-error=vla-cxx-extension -Wno-section -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -Wimplicit-fallthrough -Werror=uninitialized -Wno-unused-function -Wvla -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -Wimplicit-fallthrough -Werror=uninitialized -Wno-unused-function -Werror -Werror -std=gnu++2a -fdeprecated-macro -ferror-limit 19 -ftrapv -fwrapv -fno-signed-char -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcolor-diagnostics -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -x c++ common/fpsensor/fpsensor.cc
clang -cc1 version 19.0.0git based upon LLVM 19.0.0git default target x86_64-pc-linux-gnu
ignoring nonexistent directory "../ec-private"
ignoring nonexistent directory "spi/flash_regpublic"
ignoring duplicate directory "common"
ignoring duplicate directory "fuzz"
ignoring duplicate directory "test"
ignoring duplicate directory "include/driver"
ignoring duplicate directory "/usr/lib64/clang/19/include"
#include "..." search starts here:
#include <...> search starts here:
include
core/cortex-m/include
include/driver
core/cortex-m
chip/stm32
baseboard/bloonchipper
board/bloonchipper
common
fuzz
power
test
cts/common
cts
build/bloonchipper/abort/gen
common/fpsensor
common/mock
common/spi
common/spi/flash_reg
common/spi/flash_reg/private
common/spi/flash_reg/public
common/spi/flash_reg/src
common/usbc
common/vboot
driver
driver/battery
driver/bc12
driver/cec
driver/charger
driver/fingerprint
driver/fingerprint/egis
driver/fingerprint/egis/platform
driver/fingerprint/egis/platform/inc
driver/fingerprint/egis/platform/src
driver/fingerprint/elan
driver/fingerprint/fpc
driver/fingerprint/fpc/bep
driver/fingerprint/fpc/libfp
driver/ioexpander
driver/led
driver/nfc
driver/ppc
driver/retimer
driver/sha256
driver/tcpm
driver/temp_sensor
driver/usb_mux
driver/wpc
libc
third_party/boringssl/common
crypto
build/bloonchipper/abort
third_party
.
../../third_party/boringssl
../../third_party/boringssl/include
/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include
/usr/armv7m-cros-eabi/usr/include/c++/v1
/usr/lib64/clang/19/include
/usr/armv7m-cros-eabi/include
End of search list.
So I think the behaviour of --sysroot
has changed?
ma...@google.com <ma...@google.com> #13
I find this in the new clang: ignoring nonexistent directory "/usr/bin/../include/armv7m-cros-unknown-eabi/c++/v1"
Probably something to do with tuple normalization?
Does creating a symlink to /usr/include/armv7m-cros-unknown-eabi -> armv7-cros-eabi change the bahavior?
aj...@google.com <aj...@google.com> #14
Yeah, I noticed that too. So there is a tuple normalisation change that happened back in January, which we encountered with armv6m
in /usr/include/armv7m-cros-unknown-eabi/c++/v1
is also just as wrong as /usr/include/armv7m-cros-eabi/c++/v1
. What we need is /usr/armv7m-cros(-unknown)?-eabi/usr/include/c++/v1
. I suppose we could create a symlink between these points, but I don't understand why it's looking in /usr/include
instead of /usr/armv7m-cros-eabi/include
or /usr/armv7m-cros-unknown-eabi/include
.
I'm going to line these up because I sometimes have difficulty seeing which bits of the path are different here.
/usr/ include/ armv7m-cros-unknown-eabi/ c++/ v1 <- what we're searching first
/usr/ armv7m-cros-eabi/ usr/ include/ c++/ v1 <- where we need to search (and we do, later on)
To answer the edit:
Does creating a symlink to /usr/include/armv7m-cros-unknown-eabi -> armv7-cros-eabi change the bahavior?
No, because /usr/include/armv7m-cros-eabi
is mostly empty except for gdb symbols
ma...@google.com <ma...@google.com> #15
There was a thread I had a while back with Fuschia team regarding C++ headers detection in sysroot vs relative to clang path. I don't recall the discussion, it probably died without a conclusion but I believe the status at that time was clang seemed to prefer headers relative to its location over sysroot. It didn't make a difference to us since headers in sysroot were identical to global ones.
Maybe it is time to revive that discussion?
aj...@google.com <aj...@google.com> #16
So when passed to the driver, it's adding -internal-isystem /usr/bin/../include/c++/v1
If I add '-nostdinc++'
to the above command lines, both /usr/bin/../include/c++/v1
AND /usr/armv7m-cros-eabi/usr/include/c++/v1
go away.
Looking at the lib/Driver/ToolChains.cpp
code, I see:
void ToolChain::AddClangCXXStdlibIsystemArgs(
const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const {
DriverArgs.ClaimAllArgs(options::OPT_stdlibxx_isystem);
// This intentionally only looks at -nostdinc++, and not -nostdinc or
// -nostdlibinc. The purpose of -stdlib++-isystem is to support toolchain
// setups with non-standard search logic for the C++ headers, while still
// allowing users of the toolchain to bring their own C++ headers. Such a
// toolchain likely also has non-standard search logic for the C headers and
// uses -nostdinc to suppress the default logic, but -stdlib++-isystem should
// still work in that case and only be suppressed by an explicit -nostdinc++
// in a project using the toolchain.
if (!DriverArgs.hasArg(options::OPT_nostdincxx))
for (const auto &P :
DriverArgs.getAllArgValues(options::OPT_stdlibxx_isystem))
addSystemInclude(DriverArgs, CC1Args, P);
}
So somehow I think it's adding these in between as OPT_stdlibxx_isystem
, which is converted to -internal-isystem
arguments for CC1.
aj...@google.com <aj...@google.com> #17
I successfully forced a crash in the compiler when -internal-isystem /usr/bin/../include/c++/v1
is passed:
ajordanr@chrysalis /build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec $ source ~/cmdline
Chromium OS 9999 clang version 20.0.0git (https://chromium.googlesource.com/external/github.com/llvm/llvm-project 696a2a0a02b23000c2ea96e6501eda120a8d9d29)
Target: armv7m-cros-unknown-eabi
Thread model: posix
InstalledDir: /usr/bin
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/clang++ --sysroot=/usr/armv7m-cros-eabi -Qunused-arguments -Werror=poison-system-directories -Wno-deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-unknown-warning-option -fdebug-default-version=5 -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-error=vla-cxx-extension -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -Wno-section -static-libgcc --prefix=../../../../../../../../../../usr/libexec/gcc/armv7m-cros-eabi/armv7m-cros-eabi- -std=gnu++2a -DOUTDIR=build/bloonchipper/abort/RW -DCHIP=stm32 -DBOARD_TASKFILE=ec.tasklist -DBOARD=bloonchipper -DCORE=cortex-m -DPROJECT=abort -DCHIP_VARIANT=stm32f412 -DCHIP_FAMILY=STM32F4 -DBOARD_BLOONCHIPPER= -DCHIP_STM32= -DCORE_CORTEX_M= -DCHIP_VARIANT_STM32F412= -DCHIP_FAMILY_STM32F4= -DFINAL_OUTDIR=build/bloonchipper/abort -DPROTOBUF_MIN_PROTOC_VERSION=0 -DHAS_BASEBOARD= -DBASEBOARD_BLOONCHIPPER= -Iinclude -Icore/cortex-m/include -Iinclude/driver -Icore/cortex-m -Ichip/stm32 -Ibaseboard/bloonchipper -Iboard/bloonchipper -Icommon -Ifuzz -Ipower -Itest -Icts/common -Icts/ -Ibuild/bloonchipper/abort/gen -I../ec-private -Icommon -Icommon/fpsensor -Icommon/mock -Icommon/spi -Icommon/spi/flash_reg -Icommon/spi/flash_reg/private -Icommon/spi/flash_reg/public -Icommon/spi/flash_reg/src -Icommon/usbc -Icommon/vboot -Idriver -Idriver/battery -Idriver/bc12 -Idriver/cec -Idriver/charger -Idriver/fingerprint -Idriver/fingerprint/egis -Idriver/fingerprint/egis/platform -Idriver/fingerprint/egis/platform/inc -Idriver/fingerprint/egis/platform/src -Idriver/fingerprint/elan -Idriver/fingerprint/fpc -Idriver/fingerprint/fpc/bep -Idriver/fingerprint/fpc/libfp -Idriver/ioexpander -Idriver/led -Idriver/nfc -Idriver/ppc -Idriver/retimer -Idriver/sha256 -Idriver/tcpm -Idriver/temp_sensor -Idriver/usb_mux -Idriver/wpc -Ilibc -Ithird_party/boringssl/common -Icrypto -Ibuild/bloonchipper/abort -Ifuzz -Itest -Ithird_party -Ispi/flash_regpublic -I. -DTEST_BUILD= -DTEST_LEGACY_BUILD= -DTEST_TASKFILE=abort.tasklist -DTEST_abort= -DTEST_ABORT= -Iinclude/driver -DSECTION_IS_RW= -DSECTION=RW -DHAS_TASK_FPSENSOR= -DHAS_TASK_RWSIG_RO= -fno-PIC -DCHROMIUM_EC= -DHAS_TASK_HOOKS= -DHAS_TASK_HOSTCMD= -DHAS_TASK_CONSOLE= -DHAS_TASK_TEST= -I../../third_party/boringssl -I../../third_party/boringssl/include -I/build/amd64-generic/tmp/portage/chromeos-base/chromeos-fpmcu-bloonchipper-unittests-0.0.1-r893/work/chromeos-fpmcu-bloonchipper-unittests-0.0.1/platform/ec/third_party/boringssl/include -DCROS_EC -mcpu=cortex-m4 -mcpu=cortex-m4 -mthumb -Oz -Wl,-mllvm -Wl,-inline-threshold=-10 -mno-unaligned-access -mfloat-abi=hard -flto -g -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -fno-common -fno-strict-aliasing -fno-strict-overflow -Wimplicit-fallthrough -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Werror -ftrapv -Werror=uninitialized -Wno-unused-function -ffunction-sections -fno-delete-null-pointer-checks -fno-PIC -Wvla -Wall -Wundef -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member -fno-common -fno-strict-aliasing -fno-strict-overflow -Wimplicit-fallthrough -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Werror -ftrapv -Werror=uninitialized -Wno-unused-function -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -MMD -MP -MF build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o.d -c common/fpsensor/fpsensor.cc -MT build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -o build/bloonchipper/abort/RW/common/fpsensor/fpsensor.o -L/usr/armv7m-cros-eabi/usr/lib -B../../../../../../../../../../usr/libexec/gcc/armv7m-cros-eabi -target armv7m-cros-eabi -v
1. Compilation construction
2. Building compilation jobs
3. Building compilation jobs
#0 0x000055e5751c7b48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/clang+++0x3719b48)
#1 0x000055e5751c56a0 llvm::sys::RunSignalHandlers() (/usr/bin/clang+++0x37176a0)
#2 0x000055e5751c831a SignalHandler(int) Signals.cpp:0:0
#3 0x00007f74a02680a0 __restore_rt (/lib64/libc.so.6+0x3e0a0)
#4 0x000055e575a326a5 clang::driver::ToolChain::addSystemInclude(llvm::opt::ArgList const&, llvm::SmallVector<char const*, 16u>&, llvm::Twine const&) (/usr/bin/clang+++0x3f846a5)
#5 0x000055e575a6cb5d clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(llvm::opt::ArgList const&, llvm::SmallVector<char const*, 16u>&) const BareMetal.cpp:0:0
#6 0x000055e575a75c5c forAllAssociatedToolChains(clang::driver::Compilation&, clang::driver::JobAction const&, clang::driver::ToolChain const&, llvm::function_ref<void (clang::driver::ToolChain const&)>) Clang.cpp:0:0
#7 0x000055e575a746d2 clang::driver::tools::Clang::AddPreprocessingOptions(clang::driver::Compilation&, clang::driver::JobAction const&, clang::driver::Driver const&, llvm::opt::ArgList const&, llvm::SmallVector<char const*, 16u>&, clang::driver::InputInfo const&, llvm::SmallVector<clang::driver::InputInfo, 4u> const&) const Clang.cpp:0:0
#8 0x000055e575a888ec clang::driver::tools::Clang::ConstructJob(clang::driver::Compilation&, clang::driver::JobAction const&, clang::driver::InputInfo const&, llvm::SmallVector<clang::driver::InputInfo, 4u> const&, llvm::opt::ArgList const&, char const*) const Clang.cpp:0:0
#9 0x000055e575a0af77 clang::driver::Driver::BuildJobsForActionNoCache(clang::driver::Compilation&, clang::driver::Action const*, clang::driver::ToolChain const*, llvm::StringRef, bool, bool, char const*, std::__1::map<std::__1::pair<clang::driver::Action const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, llvm::SmallVector<clang::driver::InputInfo, 4u>, std::__1::less<std::__1::pair<clang::driver::Action const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::allocator<std::__1::pair<std::__1::pair<clang::driver::Action const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const, llvm::SmallVector<clang::driver::InputInfo, 4u>>>>&, clang::driver::Action::OffloadKind) const (/usr/bin/clang+++0x3f5cf77)
#10 0x000055e575a08ddc clang::driver::Driver::BuildJobsForAction(clang::driver::Compilation&, clang::driver::Action const*, clang::driver::ToolChain const*, llvm::StringRef, bool, bool, char const*, std::__1::map<std::__1::pair<clang::driver::Action const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, llvm::SmallVector<clang::driver::InputInfo, 4u>, std::__1::less<std::__1::pair<clang::driver::Action const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::allocator<std::__1::pair<std::__1::pair<clang::driver::Action const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const, llvm::SmallVector<clang::driver::InputInfo, 4u>>>>&, clang::driver::Action::OffloadKind) const (/usr/bin/clang+++0x3f5addc)
#11 0x000055e5759fa909 clang::driver::Driver::BuildJobs(clang::driver::Compilation&) const (/usr/bin/clang+++0x3f4c909)
#12 0x000055e5759f3bf0 clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) (/usr/bin/clang+++0x3f45bf0)
#13 0x000055e573e6f3cc clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+++0x23c13cc)
#14 0x000055e573e7f043 main (/usr/bin/clang+++0x23d1043)
#15 0x00007f74a02537c6 __libc_start_call_main (/lib64/libc.so.6+0x297c6)
#16 0x00007f74a0253882 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x29882)
#17 0x000055e573e6db61 _start (/usr/bin/clang+++0x23bfb61)
Illegal instruction
so it's from inside AddClangCXXStdlibIncludeArgs
.
aj...@google.com <aj...@google.com> #18
Commit that breaks us is: 135483bf968bc72a9544a9f2640f73f196ca8cbc
:
commit 135483bf968bc72a9544a9f2640f73f196ca8cbc
Author: Petr Hosek <phosek@google.com>
Date: Mon Jul 1 23:47:24 2024 -0700
[Driver] Support using toolchain libc and libc++ for baremetal (#96736)
We want to support using a complete Clang/LLVM toolchain that includes
LLVM libc and libc++ for baremetal targets. To do so, we need the driver
to add the necessary include paths.
I guess I will go reach out to Petr to ask if there's a way to get it to support --sysroot
?
aj...@google.com <aj...@google.com> #19
After talking to phosek@, this does appear to be a bug, and there's not any obvious workaround beyond using -nostdinc++
and then listing all the paths manually. That wouldn't be the worst decision in the meantime, but it does seem like other use cases would be broken with this behaviour, based on the documentation for sysroot
and isysroot
.
aj...@google.com <aj...@google.com>
ap...@google.com <ap...@google.com> #20
Project: external/github.com/llvm/llvm-project
Branch: chromeos/llvm-r547379-1
Author: Jordan R Abrahams-Whitehead <
Link:
Partial Revert "[Driver] Support using toolchain libc and libc++ for baremetal (#96736)"
Expand for full commit details
Partial Revert "[Driver] Support using toolchain libc and libc++ for baremetal (#96736)"
This reverts commit 135483bf968bc72a9544a9f2640f73f196ca8cbc.
This is a partial revert, reverting only the portions of
135483bf968bc72a9544a9f2640f73f196ca8cbc which actually break our
embedded projects.
The original commit breaks FPMCU targets because it does not respect the
--sysroot or -isysroot clang flags, which should re-root the system
paths. This commit introduces a new way (and order) to add system
includes which ends up violating our sysroot, and thus causing
mismatched headers.
Upstream Commit:
https://github.com/llvm/llvm-project/commit/135483bf968bc72a9544a9f2640f73f196ca8cbc
patch.cherry: false
patch.platforms: chromiumos
patch.version_range.from: 547379
patch.version_range.until: null
BUG=b:377375234
TEST=Built chromeos-base/chromeos-fpmcu-bloonchipper-unittests
Change-Id: Ie9158e7e476ee64f8d7342de94e11ceac0626307
Files:
- M
clang/lib/Driver/ToolChains/BareMetal.cpp
Hash: 5fa933172737b3cefca4b78965b9d8f6895965af
Date: Thu Nov 14 21:14:12 2024
aj...@google.com <aj...@google.com> #21
This is no longer blocking the mage roll, but is still a bug.
Description
New LLVM Breakage for
f142f8afe21bceb00fb495468aa0b5043e98c419
(r547379):This is a confusing one to be sure. Encountered while running
cros build-packages -b amd64-generic --no-usepkg
with LLVM Next. Sounds like it's not built with pthreads but needs it?