Page MenuHomeFreeBSD

RFC: Fix WITHOUT_SYMVER buildworld
AbandonedPublic

Authored by emaste on Mar 7 2016, 4:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 9:02 PM
Unknown Object (File)
Tue, Apr 16, 9:02 PM
Unknown Object (File)
Tue, Apr 16, 5:58 PM
Unknown Object (File)
Feb 22 2024, 9:20 PM
Unknown Object (File)
Dec 20 2023, 1:13 AM
Unknown Object (File)
Nov 27 2023, 8:16 AM
Unknown Object (File)
Nov 27 2023, 8:16 AM
Unknown Object (File)
Nov 26 2023, 1:50 PM
Subscribers

Details

Reviewers
kib
jhb
Summary

Move existing standalone -compat source files to build only under MK_SYMVER=yes.

Move __sym_compat macros into #ifdef SYMVER_COMPAT blocks and #define SYMVER_COMPAT in libc's Makefile under MK_SYMVER=yes.

Posted for comment. In general where __sym_compat is included in the main source file I think I'd rather move the compat block into its own file and in the Makefile optionally include it in SRCS, as I did for e.g. fts-compat.c and unvis-compat.c. In some cases it's tricky because the compat code references a static function, and perhaps this -D approach is fine.

https://bugs.freebsd.org/207712

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste retitled this revision from to RFC: Fix WITHOUT_SYMVER buildworld.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: kib, jhb.
emaste added a subscriber: davide.

It might be less (current and future) work to change the compat macros to not emit versioning directives when SYMVER is not requested. Then we would still compile old code (unconditionally), but not export it from the libc and other basic libraries.

It might be less (current and future) work to change the compat macros to not emit versioning directives when SYMVER is not requested.

At first I thought of having __sym_compat do this directly, but don't want to introduce #ifdefs into the installed system header. (It would have to be opt-out in that case, anyway -- e.g. -DNO_SYM_COMPAT).

I could otherwise do it to the FB10_COMPAT macro in lib/libthr/thread/thr_private.h etc.

Either way I think the Makefile changes make sense where the compat implementation is already provided in its own file.