[Buildroot] [PATCH] lftp: new package.
arnout at mind.be
Thu Nov 21 21:54:24 UTC 2013
On 21/11/13 18:12, Thomas Petazzoni wrote:
> Dear Arnaud Rébillout,
> On Thu, 21 Nov 2013 17:17:39 +0100, Arnaud Rébillout wrote:
>> But after that comes the second problem: the test is supposed to run
>> this piece of code. How are we supposed to run cross-compiled code on
>> the host ?
>> I can imagine it's a typical problem, but I don't know how it's supposed
>> to be handled.
> Yes, that's a typical problem, and of course, we cannot use configure
> scripts that try to run programs compiled for the target on the build
> I believe we have two solutions here:
> (1) Find the configure variable that can be passed in the configure
> environment to tell configure that posix_fallocate() is not
> available. Set it to "available" when a glibc/eglibc toolchain is
> used and "not available" when an uClibc toolchain is used.
> (2) Or, better, improve the configure test to be able to only do the
> compile test and not the execution test, and assume that if a
> posix_fallocate() program builds, then it means that it works. We
> don't use those old glibcs or AIX that have broken
You can give AC_TRY_RUN a fourth argument with actions to take when
cross-compiling. These actions are taken when compilation was successful.
Basically, the following patch should work:
Fix support for cross-compilation.
The check for posix_fallocate doesn't handle the cross-compilation case.
Assume that it works, because cross-compilation for AIX or old glibc is
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
diff -Nrup lftp-4.4.10.orig/m4/lftp.m4 lftp-4.4.10/m4/lftp.m4
--- lftp-4.4.10.orig/m4/lftp.m4 2013-03-19 13:25:50.000000000 +0100
+++ lftp-4.4.10/m4/lftp.m4 2013-11-21 22:46:27.776820935 +0100
@@ -271,6 +271,8 @@ AC_DEFUN([LFTP_POSIX_FALLOCATE_CHECK],[
+ ], [
if test x$i_cv_posix_fallocate_works = xyes; then
But of course I haven't tested it :-)
If this patch is OK, can you also upstream it?
Don't forget to add your own SOB BTW.
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
More information about the buildroot