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] Understanding the automake beast better
Date: Fri, 22 Mar 2013 14:34:34 +0100	[thread overview]
Message-ID: <20130322143434.0766b0e3@skate> (raw)
In-Reply-To: <CALdGskLvjBdSL+QbXaPrq_03poVKR=wG_RhOFbyMsB4NGHte2w@mail.gmail.com>

Dear Olivier Schonken,

On Fri, 22 Mar 2013 15:19:58 +0200, Olivier Schonken wrote:

> I'm currently working on gutenprint(fornerly gimp-print) for buildroot.  I
> can get the drivers and filters to build by splitting the build process
> into a host and target component, and copying files generated for the host
> part during build time to the target. (xml files - thus not architecture
> dependant)
> This seems like a sub-optimal solution to me.
> 
> Question: Is there an elegant way to force automake to add an auxiliary
> compiler to the make process, and use this for certain
> parts of the package that need to be run during build time (editing
> Makefile.ac files etc.)?  For example.  The drivers are being compiled for
> an arm processor, but to be able to run the
> program that generates ppd files, that program has to be compiled for the
> host architecture and not the target architecture.  It seems that automake
> configures the compiler in the package root directory, and then building
> the programs in subdirectories according to a list, I just can't figure
> out how to tell it to compile the subdirectories with a different compiler
> such as the host machine compiler.
> 
> I know cross-compiling is not an exact science, but maybe someone has run
> into the same issues before, and can shed a little more light on it for me.

The more or less standard way of doing that is to use the CC_FOR_BUILD,
CFLAGS_FOR_BUILD, CXX_FOR_BUILD variables, that point to the native
compiler. See for example
http://git.buildroot.net/buildroot/tree/package/fontconfig/fontconfig-2.6.0-use_for_build.patch.

Best regards,

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

      reply	other threads:[~2013-03-22 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALdGskKtui_YbLOmjxF8nMKFL0AeJJVE9FsTDgTSFALiWxYm+g@mail.gmail.com>
2013-03-22 13:19 ` [Buildroot] Understanding the automake beast better Olivier Schonken
2013-03-22 13:34   ` Thomas Petazzoni [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=20130322143434.0766b0e3@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