public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
To: "Theodore Ts'o" <tytso@mit.edu>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] fix cross-compilation support
Date: Sat, 05 Jul 2014 21:45:12 -0300	[thread overview]
Message-ID: <53B89C18.6080205@zacarias.com.ar> (raw)
In-Reply-To: <1404607112-26902-1-git-send-email-tytso@mit.edu>

On 07/05/2014 09:38 PM, Theodore Ts'o wrote:

> Commit 2500ebfc89 (util: fix make dependencies for subst) broke cross
> compilation because it unconditionally used config.h without setting a
> includes path so that the config.h file could be found.
> 
> The proposed fix of adding the include path (such as was proposed at
> http://patchwork.ozlabs.org/patch/355662/ or in Debian Bug #753375)
> aren't really the right fix, since the information in config.h is for
> the target environment, and not the build environment.  So using
> config.h when building helper programs used as part of the build can
> potentially cause more problems than it solves.
> 
> In general, build helpers must be written to be as portable as
> possible, and to not require any autoconf defined #ifdef's whenever
> possible.  The subst program broke this rule to (1) address a Coverity
> security complaint by using futimes if is present, and (2) to preserve
> the nanosecond portion of the file timestamp.
> 
> Oh, well.  We won't be able to do the latter when cross compiling, and
> as to the former, if an attacker has write access to your build tree
> while you are building programs that will be run as root, you've got
> bigger problems.  :-)
> 
> Fix the problem that commit 2500ebfc89 was trying to address by
> explicitly adding @DEFS@ to CFLAGS, so that -DHAVE_CONFIG_H is passed
> to make depend.  This fixes up the make depend without forcing the use
> of config.h when cross-compiling.
> 
> Addresses-Debian-Bug: #753375
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Cc: Helmut Grohne <helmut@subdivi.de>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Cc: 753375@bugs.debian.org

Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Indeed cleaner than my solution, thanks.
Regards.


      reply	other threads:[~2014-07-06  0:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-06  0:38 [PATCH] fix cross-compilation support Theodore Ts'o
2014-07-06  0:45 ` Gustavo Zacarias [this message]

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=53B89C18.6080205@zacarias.com.ar \
    --to=gustavo@zacarias.com.ar \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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