Re: [PATCH v2 0/3] kbuild: fix host progs build with libs in non standard locations

2018-02-28 Thread Robin Jarry
2018-02-28, Masahiro Yamada: [snip] > So, my idea is to rename existing > > HOSTCFLAGS -> KBUILD_HOSTCFLAGS > HOSTCXXFLAGS -> KBUILD_HOSTCXXFLAGS > HOSTLDFLAGS-> KBUILD_HOSTLDFLAGS > HOST_LOADLIBES -> KBUILD_HOSTLDLIBS > > > ("LOADLIBES" is too long, so rename it to "LDLIBS")

Re: [PATCH v2 0/3] kbuild: fix host progs build with libs in non standard locations

2018-02-28 Thread Robin Jarry
2018-02-28, Masahiro Yamada: [snip] > So, my idea is to rename existing > > HOSTCFLAGS -> KBUILD_HOSTCFLAGS > HOSTCXXFLAGS -> KBUILD_HOSTCXXFLAGS > HOSTLDFLAGS-> KBUILD_HOSTLDFLAGS > HOST_LOADLIBES -> KBUILD_HOSTLDLIBS > > > ("LOADLIBES" is too long, so rename it to "LDLIBS")

Re: [PATCH v2 3/3] objtool: use global host flags for compilation

2018-02-27 Thread Robin Jarry
2018-02-27, Josh Poimboeuf: > On Mon, Feb 26, 2018 at 07:41:48PM +0100, Robin Jarry wrote: [snip] > > ifdef CONFIG_STACK_VALIDATION > >has_libelf := $(call try-run,\ > > - echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) > >

Re: [PATCH v2 3/3] objtool: use global host flags for compilation

2018-02-27 Thread Robin Jarry
2018-02-27, Josh Poimboeuf: > On Mon, Feb 26, 2018 at 07:41:48PM +0100, Robin Jarry wrote: [snip] > > ifdef CONFIG_STACK_VALIDATION > >has_libelf := $(call try-run,\ > > - echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) > >

Re: [PATCH v2 0/3] kbuild: fix host progs build with libs in non standard locations

2018-02-27 Thread Robin Jarry
2018-02-27, Josh Poimboeuf: > In Documentation/kbuild/kbuild.txt, we have the following environment > variables: > > KCFLAGS > -- > Additional options to the C compiler (for built-in and modules). > > CFLAGS_KERNEL >

Re: [PATCH v2 0/3] kbuild: fix host progs build with libs in non standard locations

2018-02-27 Thread Robin Jarry
2018-02-27, Josh Poimboeuf: > In Documentation/kbuild/kbuild.txt, we have the following environment > variables: > > KCFLAGS > -- > Additional options to the C compiler (for built-in and modules). > > CFLAGS_KERNEL >

[PATCH v2 0/3] kbuild: fix host progs build with libs in non standard locations

2018-02-26 Thread Robin Jarry
typos. - Do not use HOST_EXTRA*FLAGS. Add new user specifiable variables. - Pass HOSTLDFLAGS to build single .c programs. - Build objtool with host flags. Robin Jarry (3): kbuild: introduce HOST_{C,LD}FLAGS kbuild: use HOSTLDFLAGS for single .c executables objtool: use global host flags

[PATCH v2 1/3] kbuild: introduce HOST_{C,LD}FLAGS

2018-02-26 Thread Robin Jarry
Add user-specifiable compiler/linker flags for host programs. Append these to already existing HOST{C,CXX,LD}FLAGS. Update documentation accordingly. Signed-off-by: Robin Jarry <robin.ja...@6wind.com> Cc: Josh Poimboeuf <jpoim...@redhat.com> Cc: Ingo Molnar <mi...@kernel.org>

[PATCH v2 2/3] kbuild: use HOSTLDFLAGS for single .c executables

2018-02-26 Thread Robin Jarry
When compiling executables from a single .c file, the linker is also invoked. Pass the HOSTLDFLAGS like for other linker commands. Signed-off-by: Robin Jarry <robin.ja...@6wind.com> Cc: Josh Poimboeuf <jpoim...@redhat.com> Cc: Ingo Molnar <mi...@kernel.org> --- scripts/Makef

[PATCH v2 0/3] kbuild: fix host progs build with libs in non standard locations

2018-02-26 Thread Robin Jarry
typos. - Do not use HOST_EXTRA*FLAGS. Add new user specifiable variables. - Pass HOSTLDFLAGS to build single .c programs. - Build objtool with host flags. Robin Jarry (3): kbuild: introduce HOST_{C,LD}FLAGS kbuild: use HOSTLDFLAGS for single .c executables objtool: use global host flags

[PATCH v2 1/3] kbuild: introduce HOST_{C,LD}FLAGS

2018-02-26 Thread Robin Jarry
Add user-specifiable compiler/linker flags for host programs. Append these to already existing HOST{C,CXX,LD}FLAGS. Update documentation accordingly. Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molnar --- Documentation/admin-guide/README.rst | 16 Makefile

[PATCH v2 2/3] kbuild: use HOSTLDFLAGS for single .c executables

2018-02-26 Thread Robin Jarry
When compiling executables from a single .c file, the linker is also invoked. Pass the HOSTLDFLAGS like for other linker commands. Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molnar --- scripts/Makefile.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 3/3] objtool: use global host flags for compilation

2018-02-26 Thread Robin Jarry
performed without host flags. Make sure to use host flags for the check and for building objtool. Remove duplicate flags. Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build") Signed-off-by: Robin Jarry <robin.ja...@6wind.com> Cc: Josh Poim

[PATCH v2 3/3] objtool: use global host flags for compilation

2018-02-26 Thread Robin Jarry
performed without host flags. Make sure to use host flags for the check and for building objtool. Remove duplicate flags. Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build") Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo M

Re: [PATCH 2/2] objtool: use host flags to detect if libelf is missing

2018-02-23 Thread Robin Jarry
2018-02-23, Josh Poimboeuf: > Hi Robin, > > Did you test this? I see some issues: > > a) I don't see where the host_cflags variable comes from (and btw, it's >misspelled...) Hi Josh, Shame on me... Last minute fix. I had tested this first by forcing HOSTCC="gcc " but I found it rather

Re: [PATCH 2/2] objtool: use host flags to detect if libelf is missing

2018-02-23 Thread Robin Jarry
2018-02-23, Josh Poimboeuf: > Hi Robin, > > Did you test this? I see some issues: > > a) I don't see where the host_cflags variable comes from (and btw, it's >misspelled...) Hi Josh, Shame on me... Last minute fix. I had tested this first by forcing HOSTCC="gcc " but I found it rather

[PATCH 1/2] kbuild: introduce HOST_EXTRALDFLAGS

2018-02-23 Thread Robin Jarry
Add a new user specifiable variable to provide specific linker options (-L, -rpath, ...) for host programs build. Append these options to HOSTLDFLAGS. Signed-off-by: Robin Jarry <robin.ja...@6wind.com> Cc: Josh Poimboeuf <jpoim...@redhat.com> Cc: Ingo Molnar <mi...@kernel.org>

[PATCH 0/2] objtool: fix libelf detection in non-standard locations

2018-02-23 Thread Robin Jarry
on the build system. Comments are welcome. Regards, Robin Jarry (2): kbuild: introduce HOST_EXTRALDFLAGS objtool: use host flags to detect if libelf is missing Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.11.0

[PATCH 1/2] kbuild: introduce HOST_EXTRALDFLAGS

2018-02-23 Thread Robin Jarry
Add a new user specifiable variable to provide specific linker options (-L, -rpath, ...) for host programs build. Append these options to HOSTLDFLAGS. Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molnar --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b

[PATCH 0/2] objtool: fix libelf detection in non-standard locations

2018-02-23 Thread Robin Jarry
on the build system. Comments are welcome. Regards, Robin Jarry (2): kbuild: introduce HOST_EXTRALDFLAGS objtool: use host flags to detect if libelf is missing Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.11.0

[PATCH 2/2] objtool: use host flags to detect if libelf is missing

2018-02-23 Thread Robin Jarry
performed without host flags. Make sure to use host flags for the check (they will be used later when building objtool anyway). Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build") Signed-off-by: Robin Jarry <robin.ja...@6wind.com>

[PATCH 2/2] objtool: use host flags to detect if libelf is missing

2018-02-23 Thread Robin Jarry
performed without host flags. Make sure to use host flags for the check (they will be used later when building objtool anyway). Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build") Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molna