* Re: [PATCH] kdbus/samples: skip on CROSS_COMPILE [not found] ` <1438272805-19029-1-git-send-email-dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2015-07-30 16:33 ` Greg Kroah-Hartman [not found] ` <20150730163307.GA20048-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Greg Kroah-Hartman @ 2015-07-30 16:33 UTC (permalink / raw) To: David Herrmann, Shuah Khan Cc: linux-api-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Paul Gortmaker, Daniel Mack, Djalal Harouni On Thu, Jul 30, 2015 at 06:13:25PM +0200, David Herrmann wrote: > Apparently we cannot rely on up-to-date kernel headers to be available > when cross-compiling, not even for HOSTCC. That's sad, but it's how it > is. Skip samples on cross-compiles as suggested by Paul, so allmodconfig > runs smoothly again. > > Tested-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> > Signed-off-by: David Herrmann <dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > --- > samples/kdbus/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/samples/kdbus/Makefile b/samples/kdbus/Makefile > index 137f842..dbd9de8 100644 > --- a/samples/kdbus/Makefile > +++ b/samples/kdbus/Makefile > @@ -1,9 +1,13 @@ > # kbuild trick to avoid linker error. Can be omitted if a module is built. > obj- := dummy.o > > +ifndef CROSS_COMPILE This really feels like the wrong solution. > + > hostprogs-$(CONFIG_SAMPLE_KDBUS) += kdbus-workers > > always := $(hostprogs-y) > > HOSTCFLAGS_kdbus-workers.o += -I$(objtree)/usr/include > HOSTLOADLIBES_kdbus-workers := -lrt > + > +endif Shuah, how should we fix this "properly"? How is this resolved for the kernel test scripts, it should have the same issue that the samples do. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20150730163307.GA20048-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] kdbus/samples: skip on CROSS_COMPILE [not found] ` <20150730163307.GA20048-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> @ 2015-07-30 17:00 ` David Herrmann 0 siblings, 0 replies; 4+ messages in thread From: David Herrmann @ 2015-07-30 17:00 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Shuah Khan, Linux API, linux-kernel, Paul Gortmaker, Daniel Mack, Djalal Harouni Hi On Thu, Jul 30, 2015 at 6:33 PM, Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> wrote: > On Thu, Jul 30, 2015 at 06:13:25PM +0200, David Herrmann wrote: >> Apparently we cannot rely on up-to-date kernel headers to be available >> when cross-compiling, not even for HOSTCC. That's sad, but it's how it >> is. Skip samples on cross-compiles as suggested by Paul, so allmodconfig >> runs smoothly again. >> >> Tested-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> >> Signed-off-by: David Herrmann <dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> --- >> samples/kdbus/Makefile | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/samples/kdbus/Makefile b/samples/kdbus/Makefile >> index 137f842..dbd9de8 100644 >> --- a/samples/kdbus/Makefile >> +++ b/samples/kdbus/Makefile >> @@ -1,9 +1,13 @@ >> # kbuild trick to avoid linker error. Can be omitted if a module is built. >> obj- := dummy.o >> >> +ifndef CROSS_COMPILE > > This really feels like the wrong solution. > >> + >> hostprogs-$(CONFIG_SAMPLE_KDBUS) += kdbus-workers >> >> always := $(hostprogs-y) >> >> HOSTCFLAGS_kdbus-workers.o += -I$(objtree)/usr/include >> HOSTLOADLIBES_kdbus-workers := -lrt >> + >> +endif > > Shuah, how should we fix this "properly"? How is this resolved for the > kernel test scripts, it should have the same issue that the samples do. ./samples/ is built as part of "make vmlinux", tests are not. Therefore, tests don't break allmodconfig and friends. The underlying issue is, that ./samples/ provides both: examples for kernel modules *and* examples for user-space code. Maybe the real fix is to eventually split user-space examples from kernel-module-examples (./samples/kernel/ and ./samples/user/). But I don't want to include such split in the kdbus tree. Instead, I tried to follow the recent fixes that are already upstream: 65f6f092a6987, f59514b6a8c5ca6dd, and 6a407a81a9abcf. Suggestions welcome! Thanks David ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kdbus/samples: skip on CROSS_COMPILE 2015-07-30 16:33 ` [PATCH] kdbus/samples: skip on CROSS_COMPILE Greg Kroah-Hartman [not found] ` <20150730163307.GA20048-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> @ 2015-07-30 17:00 ` Paul Gortmaker 2015-07-31 14:28 ` Sudip Mukherjee 2 siblings, 0 replies; 4+ messages in thread From: Paul Gortmaker @ 2015-07-30 17:00 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: David Herrmann, Shuah Khan, linux-api, linux-kernel, Daniel Mack, Djalal Harouni [Re: [PATCH] kdbus/samples: skip on CROSS_COMPILE] On 30/07/2015 (Thu 09:33) Greg Kroah-Hartman wrote: > On Thu, Jul 30, 2015 at 06:13:25PM +0200, David Herrmann wrote: > > Apparently we cannot rely on up-to-date kernel headers to be available > > when cross-compiling, not even for HOSTCC. That's sad, but it's how it > > is. Skip samples on cross-compiles as suggested by Paul, so allmodconfig > > runs smoothly again. > > > > Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com> > > Signed-off-by: David Herrmann <dh.herrmann@gmail.com> > > --- > > samples/kdbus/Makefile | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/samples/kdbus/Makefile b/samples/kdbus/Makefile > > index 137f842..dbd9de8 100644 > > --- a/samples/kdbus/Makefile > > +++ b/samples/kdbus/Makefile > > @@ -1,9 +1,13 @@ > > # kbuild trick to avoid linker error. Can be omitted if a module is built. > > obj- := dummy.o > > > > +ifndef CROSS_COMPILE > > This really feels like the wrong solution. > > > + > > hostprogs-$(CONFIG_SAMPLE_KDBUS) += kdbus-workers > > > > always := $(hostprogs-y) > > > > HOSTCFLAGS_kdbus-workers.o += -I$(objtree)/usr/include > > HOSTLOADLIBES_kdbus-workers := -lrt > > + > > +endif > > Shuah, how should we fix this "properly"? How is this resolved for the > kernel test scripts, it should have the same issue that the samples do. If you guys want to reproduce it, in order to figure out what mips does with its headers that no other arch does, it should be as simple as: wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/x86_64-gcc-4.6.3-nolibc_mips-linux.tar.xz <untar somewhere> <add resulting bin dir to your $PATH> export CROSS_COMPILE=mips-linux- export ARCH=mips cd kernel-source make allmodconfig make -j16 samples/ Paul. -- > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kdbus/samples: skip on CROSS_COMPILE 2015-07-30 16:33 ` [PATCH] kdbus/samples: skip on CROSS_COMPILE Greg Kroah-Hartman [not found] ` <20150730163307.GA20048-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 2015-07-30 17:00 ` Paul Gortmaker @ 2015-07-31 14:28 ` Sudip Mukherjee 2 siblings, 0 replies; 4+ messages in thread From: Sudip Mukherjee @ 2015-07-31 14:28 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: David Herrmann, Shuah Khan, linux-api, linux-kernel, Paul Gortmaker, Daniel Mack, Djalal Harouni On Thu, Jul 30, 2015 at 09:33:07AM -0700, Greg Kroah-Hartman wrote: > On Thu, Jul 30, 2015 at 06:13:25PM +0200, David Herrmann wrote: > > Apparently we cannot rely on up-to-date kernel headers to be available > > when cross-compiling, not even for HOSTCC. That's sad, but it's how it > > is. Skip samples on cross-compiles as suggested by Paul, so allmodconfig > > runs smoothly again. > > > > Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com> > > Signed-off-by: David Herrmann <dh.herrmann@gmail.com> > > --- > > samples/kdbus/Makefile | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/samples/kdbus/Makefile b/samples/kdbus/Makefile > > index 137f842..dbd9de8 100644 > > --- a/samples/kdbus/Makefile > > +++ b/samples/kdbus/Makefile > > @@ -1,9 +1,13 @@ > > # kbuild trick to avoid linker error. Can be omitted if a module is built. > > obj- := dummy.o > > > > +ifndef CROSS_COMPILE > > This really feels like the wrong solution. I also faced the same problem while testing allmodconfig for mn10300. regards sudip ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-31 14:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1438272805-19029-1-git-send-email-dh.herrmann@gmail.com> [not found] ` <1438272805-19029-1-git-send-email-dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2015-07-30 16:33 ` [PATCH] kdbus/samples: skip on CROSS_COMPILE Greg Kroah-Hartman [not found] ` <20150730163307.GA20048-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 2015-07-30 17:00 ` David Herrmann 2015-07-30 17:00 ` Paul Gortmaker 2015-07-31 14:28 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).