From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] php: bump to version 5.3.18
Date: Tue, 30 Oct 2012 14:01:56 +0100 [thread overview]
Message-ID: <20121030140156.4117a077@skate> (raw)
In-Reply-To: <1351599635-21356-1-git-send-email-gustavo@zacarias.com.ar>
Dear Gustavo Zacarias,
On Tue, 30 Oct 2012 09:20:34 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/php/Config.in | 4 ++
> package/php/php-force-cross-compile.patch | 50 -----------------------------
So you are sure this patch is no longer needed? See the explanation
below: the problem can only be triggered if the build machine has the
same architecture as the target machine.
> -In its configure script, PHP detects whether we're cross-compiling or
> -not, by compiling and running a simple C program. Depending on whether
> -cross-compiling has been detected or not, then PHP enables or disables
> -the AC_TRY_RUN tests (which verify the availability of something by
> -*executing* a program, which, by definition, cannot work in
> -cross-compilation mode).
> -
> -This works just fine when the target architecture is ARM or PowerPC
> -and the build machine is x86 or x86_64. Unfortunately, when the target
> -architecture is x86_64 and the build machine is also x86_64, the
> -cross-compilation mode detection concludes that we are not
> -cross-compiling, because it succeeds in running this small program.
> -
> -However, while it succeeds in running this basic small program, some
> -other programs executed later through AC_TRY_RUN tests do not work,
> -because they have target library dependencies that are not available
> -on the build machine. For example, the libxml2 test fails to *run*
> -because libxml2 is not available on the build machine, only in the
> -target/staging directories. So trying to run a program linked against
> -libxml2, on the build machine, simply doesn't make sense.
> -
> -We fix this problem by just forcing PHP to think that we're
> -cross-compiling (which is always the case with Buildroot, as we're at
> -the moment never building PHP for the host). Unfortunately, the
> -configure.in file dates back from the autoconf 2.13 era, so the
> -configure script does not understand the ac_cv_prog_cc_cross cache
> -variable, and we cannot easily regenerate the configure script using
> -our package autoconf version. The easiest solution is therefore to
> -simply patch the configure script to make the cross-compilation test
> -fail: we replace the execution of the program by a call to false,
> -which always fail, leading the configure script to understand that we
> -*are* cross-compiling.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-10-30 13:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 12:20 [Buildroot] [PATCH 1/2] php: bump to version 5.3.18 Gustavo Zacarias
2012-10-30 12:20 ` [Buildroot] [PATCH 2/2] samba: bump to version 3.6.9 Gustavo Zacarias
2012-10-30 13:01 ` Thomas Petazzoni [this message]
2012-10-30 16:14 ` [Buildroot] [PATCH 1/2] php: bump to version 5.3.18 Gustavo Zacarias
2012-10-30 22:10 ` Thomas Petazzoni
2012-10-30 21:38 ` Peter Korsgaard
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=20121030140156.4117a077@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