From: Prarit Bhargava on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1538#note_8096...
@prarit I still didn't get why we don't disable
`CONFIG_CC_CAN_LINK_STATIC`
instead of bringing `glibc-static` to buildroot, even
because we don't expect
to have any users of it anytime soon.
CONFIG_CC_CAN_LINK_STATIC is set dynamically at runtime in init/Kconfig:68,
```
config CC_CAN_LINK_STATIC
bool
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC)
$(CLANG_FLAGS) $(m64-flag) -static) if 64BIT
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC)
$(CLANG_FLAGS) $(m32-flag) -static)
```
I thought about submitting a patch to add CONFIG_CC_CAN_LINK_STATIC_FORCE
upstream, or yet-another RHEL & ARK only commit to force
CONFIG_CC_CAN_LINK_STATIC to "not set" but both of those have some
trade-offs associated with them.
Ultimately we want a "known" compile. Adding glibc-static to the
buildroot guarantees that we have the same compile on any platform (brew
or CKI containers).