Commit 7b8b418e authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

build: nmk -- Filter out -Wl flags from linking builtin targets

Tycho reported that Debian uses custom LDFLAGS to
build criu, this flag get propagated into built-in
targets where we use $(LD) instead causing build
procedure to interrupt

|  LINK     arch/x86/syscalls.built-in.o
| ld: unrecognized option '-Wl,-Bsymbolic-functions'
| ld: use the --help option for usage information
| /«PKGBUILDDIR»/scripts/nmk/scripts/build.mk:141: recipe for target 'arch/x86/syscalls.built-in.o' failed

Lets make maintainers life easier and filter
out the flags we know never accepted by $(LD).
Reported-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Tested-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent ffe90e0b
......@@ -24,6 +24,15 @@ ifndef obj
$(error obj is undefined)
endif
#
# Filter out any -Wl,XXX option: some of build farms
# assumes that we're using $(CC) for building built-in
# targets (and they have all rights to). But we're
# using $(LD) directly instead so filter out -Wl
# flags to make maintainer's life easier.
LDFLAGS-MASK := -Wl,%
LDFLAGS := $(filter-out $(LDFLAGS-MASK),$(LDFLAGS))
#
# Accumulate common flags.
define nmk-ccflags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment