From 8d8cb4d18375ec1a11d16b2a22f02809256a188f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 13 Mar 2020 20:20:26 +0100 Subject: [PATCH] ports/make: avoid aliasing with libc symbols This patch prefixes a few symbols in the make binary that are offered by both the libc and the make binary. The clash of symbol names produces confusing runtime linkage otherwise. This becomes a problem during fork/evecve. --- repos/ports/src/noux-pkg/make/target.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repos/ports/src/noux-pkg/make/target.mk b/repos/ports/src/noux-pkg/make/target.mk index a07febe1b..080df684f 100644 --- a/repos/ports/src/noux-pkg/make/target.mk +++ b/repos/ports/src/noux-pkg/make/target.mk @@ -3,4 +3,11 @@ # CPPFLAGS += -D__FreeBSD__ +# +# Avoid aliasing with libc symbols to prevent the dynamic linker from +# resolving libc-internal references to the make binary, which causes +# trouble for fork/execve. +# +CPPFLAGS += $(foreach S, optarg optind opterr optopt, -D$S=mk_$S) + include $(call select_from_repositories,mk/noux.mk)