|
From: Ethan M. <merritt@u.washington.edu> - 2009-05-08 23:16:49
|
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? |