Page MenuHomeFreeBSD

elf-hints.h: Allow rtld_paths.h to be included before it
ClosedPublic

Authored by jrtc27 on Jul 7 2023, 11:57 PM.
Tags
None
Referenced Files
F102771920: D40918.id124387.diff
Sat, Nov 16, 11:26 PM
Unknown Object (File)
Wed, Nov 13, 10:28 PM
Unknown Object (File)
Wed, Nov 13, 1:07 AM
Unknown Object (File)
Tue, Nov 12, 8:29 PM
Unknown Object (File)
Wed, Oct 30, 12:32 AM
Unknown Object (File)
Wed, Oct 30, 12:32 AM
Unknown Object (File)
Wed, Oct 30, 12:32 AM
Unknown Object (File)
Wed, Oct 30, 12:20 AM
Subscribers

Details

Summary

Currently rtld_paths.h will #undef _PATH_ELF_HINTS in order to override
this to the right value if included afterwards, but the other way round
does not work as elf-hints.h tries to define an already-defined macro to
a potentially different value. Thus, guard the definition here so that
rtld_paths.h's definition continues to take precedence.

Note that, although all in-tree uses of _PATH_ELF_HINTS have included
rtld_paths.h already, pax-utils wants _PATH_ELF_HINTS from elf-hints.h
and so we cannot just drop the define. In-tree uses must just continue
to make sure that they include rtld_paths.h to get the right value for
libcompat builds as is already required.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable