This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: omitting all compatibility interfaces from the build
- From: Florian Weimer <fweimer at redhat dot com>
- To: Rasmus Villemoes <rasmus dot villemoes at prevas dot dk>
- Cc: "libc-alpha\@sourceware.org" <libc-alpha at sourceware dot org>
- Date: Fri, 07 Feb 2020 12:02:24 +0100
- Subject: Re: omitting all compatibility interfaces from the build
- References: <bcad7275-1181-f080-583f-30f6e8bf71d7@prevas.dk>
* Rasmus Villemoes:
> When doing a complete BSP build for an embedded target, there are and
> will not be any old existing binaries that have been linked against an
> older libc. Hence there is no need for any version of any symbol other
> than the currently exposed ones. So would it be possible to add a
> configure knob for omitting all the code for the unused/unneeded interfaces?
>
> I looked into shlib-compat.h, and it seems doing
>
> -#ifdef SHARED
> +#if defined(SHARED) && !defined(OMIT_COMPAT_VERSIONS)
>
> would be a simple first step, but I assume it can't be that simple - I'm
> guessing some later steps in the build process would need tweaking as well.
If you do not need ABI compatibility, you could create a new port that
has a different ABI baseline, e.g.,
DEFAULT GLIBC_2.31
in shlib-versions. This will drop more code, but binaries linked
against such a library will not run anywhere else. It has the advantage
that this should work today. There will likely be a few isolated
problems, but the patches should be upstreamable.
Thanks,
Florian