public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: kbuild <linux-kbuild@vger.kernel.org>, Michal Marek <mmarek@suse.cz>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	David Herrmann <dh.herrmann@googlemail.com>,
	Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH v2 0/6] kbuild: use target compiler for user binaries in samples/
Date: Sun, 13 Jul 2014 20:36:37 +0200	[thread overview]
Message-ID: <20140713183636.GA17241@ravnborg.org> (raw)

[PATCH v2 0/6] kbuild: use target compiler for user binaries in samples/

The user-space binaries build in samples/ uses the installed
headers for the kernel.
Therefore it is wrong that they use the host compiler
to build the samples.

This set of patches add kbuild support for building
the userspace programs.
They are build with same endian and bit-size as the kernel,
so in other words no support for buildign 32 bit userspace for
a 64 bit kernel.
The majority of the patch is the Documentation changes,
especially because a new chapter was added.

NOTE: This will likely break the build if the toolchain used do
not include a libc. Let's see how much noise this creates.

I have included a few moe people in this submission as
I assume this has their interest.

Michal - I hope you can take this via the kbuild#misc
tree when any feedback has been addressed.

Changes since first posting (https://lkml.org/lkml/2013/3/31/74):
- Use $(biarch) in X86_32 (feedback from Michael Marek)
- Drop sub-directory support (feedback from Michael Marek)
  o This simplified the uapi support a lot
- Fix clean support (feedback from Michael Marek)
- Added documentation to Documentation/kbuild/
- Use $(CC) as there is no need for a dedicated UAPICC
- Prefer foobar-y over foobar-objs for specifying .o files
  for a binary
- Move cc options to Makefile.uapiprogs and only use -Wall
- Use -isystem to include installed uapi headers before headers
  provided by the installed libc
- Divided up in smaller patches to ease review

	Sam

Sam Ravnborg (6):
      kbuild: add support for building userspace api programs
      samples: refactor Makefile
      samples: use uapiprogs support for seccomp
      samples: use uapiprogs support for hidraw
      samples: fix warnings in uhid-example
      samples: use uapiprogs support for uhid

 Documentation/kbuild/kbuild.txt    |   5 ++
 Documentation/kbuild/makefiles.txt | 132 ++++++++++++++++++++++++-------------
 Makefile                           |   4 ++
 arch/s390/Makefile                 |   2 +
 arch/sparc/Makefile                |   2 +
 arch/x86/Makefile                  |   2 +
 samples/Makefile                   |  16 ++++-
 samples/hidraw/Makefile            |  11 +---
 samples/seccomp/Makefile           |  48 +-------------
 samples/uhid/Makefile              |  11 +---
 samples/uhid/uhid-example.c        |   9 ++-
 scripts/Makefile.build             |   4 ++
 scripts/Makefile.clean             |   9 +--
 scripts/Makefile.uapiprogs         |  63 ++++++++++++++++++
 14 files changed, 196 insertions(+), 122 deletions(-)

             reply	other threads:[~2014-07-13 18:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 18:36 Sam Ravnborg [this message]
2014-07-13 18:42 ` [PATCH 1/6] kbuild: add support for building userspace api programs Sam Ravnborg
2014-07-13 18:42   ` [PATCH 2/6] samples: refactor Makefile Sam Ravnborg
2014-07-13 19:25     ` Randy Dunlap
2014-07-13 19:52       ` Sam Ravnborg
2014-07-13 20:13         ` Randy Dunlap
2014-07-14  0:26         ` Stephen Rothwell
2014-07-13 18:42   ` [PATCH 3/6] samples: use uapiprogs support for seccomp Sam Ravnborg
2014-07-16  9:43     ` Masahiro Yamada
2014-07-16 10:31       ` Sam Ravnborg
2014-07-17  3:40         ` Masahiro Yamada
2014-07-13 18:42   ` [PATCH 4/6] samples: use uapiprogs support for hidraw Sam Ravnborg
2014-07-13 18:42   ` [PATCH 5/6] samples: fix warnings in uhid-example Sam Ravnborg
2014-07-13 18:42   ` [PATCH 6/6] samples: use uapiprogs support for uhid Sam Ravnborg
2014-07-13 19:23   ` [PATCH 1/6] kbuild: add support for building userspace api programs Randy Dunlap
2014-07-13 19:53     ` Sam Ravnborg
2014-07-14  0:29 ` [PATCH v2 0/6] kbuild: use target compiler for user binaries in samples/ Stephen Rothwell
2014-07-14  0:33   ` Stephen Rothwell
2014-07-17 15:22     ` Michal Marek
2014-08-21 13:46       ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140713183636.GA17241@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sfr@canb.auug.org.au \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox