proot-me/proot

Please support overriding ld/pkg-config commands

nya3jp opened this issue · 0 comments

nya3jp commented

I'd like to build proot with prefixed toolchains, and it requires allowing to override commands with Make variables. Currently many commands are overridable, but there are two exceptions: ld and pkg-config.

ld is hard-coded here:

BUILD_ID_NONE := $(shell if ld --build-id=none --version >/dev/null 2>&1; then echo ',--build-id=none'; fi)

https://github.com/proot-me/proot/blob/master/src/GNUmakefile#L162

pkg-config is hard-coded here:

CFLAGS   += -g -Wall -Wextra -O2
CFLAGS   += $(shell pkg-config --cflags talloc)
LDFLAGS  += -Wl,-z,noexecstack
LDFLAGS  += $(shell pkg-config --libs talloc)

https://github.com/proot-me/proot/blob/master/src/GNUmakefile#L25