freebsd-ports/sysutils/e2fsprogs/files/patch-lib_support_plausible.c
Matthias Andree 0346c473f7 Be more careful about what and how we link.
Only link what we need (--as-needed) to get unnecessary dependencies
out of the executables.

Be sure to properly link libc dynamically and the rest statically,
especially libgcc (-static-libgcc, should fix powerpc* builds => [1])

After two years, drop the "for now" LLD_UNSAFE=yes (r457508 by emaste@).

As e2fsprogs dlopen()s libmagic these days, our LIBMAGIC override is
useless.  Instead patch libmagic.so.1 -> libmagic.so (12.1 calls it
libmagic.so.4; patch to lib/support/plausible.c).

Refresh files/patch-misc__Makefile.in

PR:		242798 [1]
2020-02-03 00:34:15 +00:00

11 lines
340 B
C

--- lib/support/plausible.c.orig 2020-01-06 23:10:17 UTC
+++ lib/support/plausible.c
@@ -62,7 +62,7 @@ static void *magic_handle;
static int magic_library_available(void)
{
if (!magic_handle) {
- magic_handle = dlopen("libmagic.so.1", RTLD_NOW);
+ magic_handle = dlopen("libmagic.so", RTLD_NOW);
if (!magic_handle)
return 0;