Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754116AbbG3RAV (ORCPT ); Thu, 30 Jul 2015 13:00:21 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:35212 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753833AbbG3RAP (ORCPT ); Thu, 30 Jul 2015 13:00:15 -0400 MIME-Version: 1.0 In-Reply-To: <20150730163307.GA20048@kroah.com> References: <1438272805-19029-1-git-send-email-dh.herrmann@gmail.com> <20150730163307.GA20048@kroah.com> Date: Thu, 30 Jul 2015 19:00:13 +0200 Message-ID: Subject: Re: [PATCH] kdbus/samples: skip on CROSS_COMPILE From: David Herrmann To: Greg Kroah-Hartman Cc: Shuah Khan , Linux API , linux-kernel , Paul Gortmaker , Daniel Mack , Djalal Harouni Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2157 Lines: 61 Hi On Thu, Jul 30, 2015 at 6:33 PM, 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 >> Signed-off-by: David Herrmann >> --- >> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/