Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Understanding the automake beast better
       [not found] <CALdGskKtui_YbLOmjxF8nMKFL0AeJJVE9FsTDgTSFALiWxYm+g@mail.gmail.com>
@ 2013-03-22 13:19 ` Olivier Schonken
  2013-03-22 13:34   ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Schonken @ 2013-03-22 13:19 UTC (permalink / raw)
  To: buildroot

Hi

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.

Thanks and regards

Olivier Schonken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130322/0b397062/attachment.html>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] Understanding the automake beast better
  2013-03-22 13:19 ` [Buildroot] Understanding the automake beast better Olivier Schonken
@ 2013-03-22 13:34   ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2013-03-22 13:34 UTC (permalink / raw)
  To: buildroot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-22 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox