genode/repos/base-linux
Piotr Tworek c38c2a6455 cxx: missing operator delete with align_val_t arg
When rebasing my local branch on top of sculpt-21.10 tag I've noticed
two problems.

The code in new_delete.cc does not include new header file. This works
fine with GCC, but fails with clang because std::align_val_t type is
not defined anywhere according to clang. It looks like GCC pulls this
header indirectly somehow.

The second problem can be seen if one disallows undefined symbols in
executables and shared_libraries. This can be seen with both GCC and
clang by adding --no-undefined to LD_OPT. With such change in place core
fails to link due to:

ld.lld: error: undefined symbol: operator delete(void*, std::align_val_t)
>>> referenced by thread.h:448 (/home/tworaz/devel/genode/repos/base-hw/src/core/kernel/thread.h:448)
>>>               thread.o:(Kernel::Core_main_thread::~Core_main_thread()) in archive debug/core-hw-virt_qemu.a
>>> referenced by thread.h:448 (/home/tworaz/devel/genode/repos/base-hw/src/core/kernel/thread.h:448)
>>>               thread.o:(non-virtual thunk to Kernel::Core_main_thread::~Core_main_thread()) in archive debug/core-hw-virt_qemu.a
>>> did you mean: operator delete(void*, unsigned long, std::align_val_t)
>>> defined in: debug/core-hw-virt_qemu.a(supc++.o)

If the code would somehow manage call such undefined symbol it'd crash.
Since I generally prefer link time failures to runtime crashes I link
all genode binaries with --no-undefined.

To fix this problem just add a dummy implementation of missing delete
operator.

Fixes #4298
2021-11-29 15:10:50 +01:00
..
etc base: remove SPEC variables of boards (fix #3971) 2021-01-25 13:58:09 +01:00
include/spec/arm_64/trace base-linux: discharge timestamp on AARCH64 2021-05-10 11:17:20 +02:00
lib cxx: missing operator delete with align_val_t arg 2021-11-29 15:10:50 +01:00
recipes depot: update recipe hashes 2021-10-14 13:46:25 +02:00
run lx_fs: enable watch 2021-06-25 11:41:44 +02:00
src base: extend cache maintainance functionality 2021-06-25 11:43:41 +02:00
README Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00

This repository contains the Linux-specific implementation of Genode.