Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 13/17] audit: new package
Date: Wed, 18 Sep 2013 07:00:20 +0200	[thread overview]
Message-ID: <20130918070020.22ff8ca9@skate> (raw)
In-Reply-To: <1378936777-28308-14-git-send-email-clshotwe@rockwellcollins.com>

Dear Clayton Shotwell,

On Wed, 11 Sep 2013 16:59:33 -0500, Clayton Shotwell wrote:

> diff --git a/package/audit/audit-0001-crossCompileHeaderCreationFix.patch b/package/audit/audit-0001-crossCompileHeaderCreationFix.patch
> new file mode 100644
> index 0000000..11ab393
> --- /dev/null
> +++ b/package/audit/audit-0001-crossCompileHeaderCreationFix.patch
> @@ -0,0 +1,1420 @@
> +Rework the build system to generate the required header files using a 
> +Python script rather than compiling executables.  This change has
> +to be made because the executables that are generated are built for
> +the target architecture and are generally not compilable on the host
> +build machine.  
> +
> +Signed-off-by Clayton Shotwell <clshotwe@rockwellcollins.com>

In this patch for 'audit', you are replacing a nice C program by a
Python script, with the argument that it helps cross-compilation. I
must say I quite disagree with that: building a small C program for the
host has always been easier than programs that require executing a
Python script at build time.

Why not keeping the existing C program, and just adjust the way it is
built to get it built by the native compiler?

There is a fairly standardized way of doing that with the autotools,
that consists in using the CC_FOR_BUILD variable instead of CC to build
this tool. In native compilation, CC_FOR_BUILD == CC == gcc, while in
cross-compilation, CC_FOR_BUILD == gcc and CC == <arch-tuple>-gcc.

See http://www.sourceware.org/autobook/autobook/autobook_270.html.

There is apparently even an existing m4 macro to define CC_FOR_BUILD:
http://ac-archive.sourceforge.net/ac-archive/ac_prog_cc_for_build.html.

Or maybe the Python script approach is something that has been agreed
upon with the audit/SELinux community?

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-09-18  5:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 21:59 [Buildroot] [PATCH v2 00/17] SELinux Buildroot Additions Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 01/17] libsepol: new package Clayton Shotwell
2013-09-12 19:18   ` Thomas Petazzoni
2013-09-20 13:34   ` Peter Korsgaard
2013-09-11 21:59 ` [Buildroot] [PATCH v2 02/17] libselinux: " Clayton Shotwell
2013-09-12 19:29   ` Thomas Petazzoni
2013-09-11 21:59 ` [Buildroot] [PATCH v2 03/17] ustr: " Clayton Shotwell
2013-09-12 19:34   ` Thomas Petazzoni
2013-09-18  2:15     ` clshotwe at rockwellcollins.com
2013-09-18  4:21       ` Thomas Petazzoni
2013-09-11 21:59 ` [Buildroot] [PATCH v2 04/17] libsemanage: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 05/17] checkpolicy: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 06/17] sepolgen: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 07/17] setools: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 08/17] libcgroup: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 09/17] policycoreutils: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 10/17] python-pyxml: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 11/17] refpolicy: " Clayton Shotwell
2013-09-18  5:18   ` Thomas Petazzoni
2013-09-23 21:52     ` Clayton Shotwell
2013-09-24  6:30       ` Thomas Petazzoni
2013-09-24 14:47         ` Clayton Shotwell
2013-09-24 15:18           ` Thomas Petazzoni
2013-09-24 18:07             ` Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 12/17] python-pyparsing: Add host build option Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 13/17] audit: new package Clayton Shotwell
2013-09-18  5:00   ` Thomas Petazzoni [this message]
2013-09-24 17:47     ` Clayton Shotwell
2013-09-24 21:57       ` Thomas Petazzoni
2013-09-25 12:29         ` Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 14/17] shadow: " Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 15/17] pcre: Add host build support Clayton Shotwell
2013-09-18  5:18   ` Thomas Petazzoni
2013-09-23 21:54     ` Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 16/17] bzip2: Add host build shared library installation Clayton Shotwell
2013-09-11 21:59 ` [Buildroot] [PATCH v2 17/17] sqlite: Add host build support Clayton Shotwell

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=20130918070020.22ff8ca9@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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