|
From: <pl...@pi...> - 2009-05-09 00:50:39
|
Ethan Merritt wrote: > On Friday 08 May 2009 15:00:15 Allin Cottrell wrote: >> On Fri, 8 May 2009, Ethan Merritt wrote: >> >>> On Friday 08 May 2009 10:34:51 pl...@pi... wrote: >>>> HI, >>>> >>>> I'm trying to cross-compile gnuplot for arm. >>>> >>>> I set CC= and CXX= but it got thrown out with a message saying I should >>>> use --host to cross-compile. >>>> >>>> The supposed "complete" list of options in ./configure --help and in >>>> INSTALL does not mention it or cross-compiling at all >>> The --host=arm-linux option is not something that is part of >>> gnuplot, or gnuplot's autoconfigure scripts. It is an option >>> for the gcc compiler. So you would need to look in the gcc docs. >>> I would guess the best source of help would be an arm-linux >>> forum. >> plotter does have a point. I just checked the configure script >> for my program, gretl, and part of the boiler-plate output from >> ./configure --help is: >> >> System types: >> --build=BUILD configure for building on BUILD [guessed] >> --host=HOST cross-compile to build programs to run on HOST [BUILD] >> >> I certainly didn't add that explicitly; it's the output from some >> standard autoconf macro (not sure which; maybe AC_PROG_CC?). >> It's a bit surprising that it's not present in gnuplot's >> "configure --help" output. > > I have not done cross-compilation, so take this with a grain of salt, > but as I read the autoconf man pages, the idea is that if you use one of > the cross-compilation macros like AC_PROG_CC in the ./configure script > two things happen. First, it tests for successful use of the CC=foo > compiler flags. Second, if the test succeeds it allows you to define > conditional code options based on the knowledge that this is a > cross-compiled build. > > So far as I know, the gnuplot source has no conditional code that would > be triggered by AC_PROG_CC. So I would have expected that setting > CC to "--host=arm-linux" explicitly was sufficient; i.e. you wouldn't > have to do it via the AC_PROG_CC macro. > > But I haven't tried it. If someone confirms a benefit of having the > AC_PROG_CC in the configure script, that's certainly fine with me. > > I have separately acknowledged that there should probably be a top > level build target that builds only the gnuplot executable. > Is there a standard name for such a target? > > I would have thought that your suggested : make gnuplot , was best. as for the cross-compilation the correct setting for my toolchain was --host=arm-unknown-linux-gnueabi I posted it earlier but not from the right account for this list. Duh. I now have a result from the cross-compiler: $ file gnuplot gnuplot: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.29, not stripped regards, Peter. |