In theory and according to most linux/glibc sources it should be glibc. But that is a bit of a knee jerk reaction that quite often doesn't take into account that Pascal sources won't automatically pick up changed headers and also don't take into account routinely having some cross distro/version binary compatibility. I.e. they don't consider FPC specific circumstances.
On the other hand, one could argue that the current syscall situation is an artifact of the years 2000-2005 when glibc was going through changes (most notably 64-bit file support, also on the then mostly 32-bit systems)
To see what is better probably requires both systems to be used in parallel for a while, and honestly looking what causes less problems/breakage.
The Linux kernel policy is to never break user space (i.e. new kernel versions maintain backward compatibility with existing compiled software):
https://unix.stackexchange.com/questions/235335/why-is-there-a-linux-kernel-policy-to-never-break-user-spaceglibc, using symbol versioning, also strives for new glibc releases to maintain backward compatibility with previously compiled software that uses the library:
https://developers.redhat.com/blog/2019/08/01/how-the-gnu-c-library-handles-backward-compatibilityI agree that testing would be needed and experience would have to be gained using both approaches before deciding which is generally more backward compatible.
In the case of fpc and the rtl using the glibc library on Linux (x86_64):The pascal header conversion and code that calls library functions and code that references external symbols was written and tested against a specific version of glibc with specific documented behavior for those functions and symbols.
1. Do you think the fpc and rtl source code declarations should be specifically pinned to those versions of the glibc functions they were originally written to work with? (i.e. declare the specific glibc SONAME which includes the major version and declare specific versions of the external symbols in the fpc/rtl source code)
2. Do you think the fpc and rtl glibc source code declarations should not specify any versions and allow the compiled binaries to get specific .so version and symbol versions from the static linker at build time (which uses the glibc library present on the system at build time)?
or
3. Should there be the ability to choose between the two options above when compiling fpc/rtl?
(EDITED to clarify that the library SONAME includes the major version in #1 above)