This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cross-compiling with ./configure


Don Quixote, All,

On Friday 12 March 2010 14:38:07 Don Quixote de la Mancha wrote:
[--SNIP--]
> The first item in my $PATH is the bin directory that contains
> Android's arm-eabi-4.4.0 build of the GNU toolchain.  The LDFLAGS
            ^^^^^^^^
> parameter given to configure supplies the directory where my Android
> system build places all the shared libraries:
>    $ ./configure --cache-file=android.cache --host=arm-linux
> LDFLAGS=-L/path/to/android/out/target/product/foofone/system/lib
> ...
>    configure: error: C compiler cannot create executables
>    See `config.log' for more details.
> Unfortunately, config.log doesn't give me a clue as to what actually failed.

First, given --host=foo-bar, ./configure will search for a compiler
and associated tools named like:
  foo-bar-gcc
  foo-bar-ld
and so on...

In your case, ./configure would look for: arm-linux-gcc. Does that exist?
If not, it seems your toolchain is named arm-eabi, so you would get
arm-eabi-gcc. Is that the case?

Second, in the case of cross-compilation, you have to tell ./configure
both the host (where the package is expected to run) and the build system
(where the package is expected to be built).

I would have written smthg like:
  $ ./configure --cache-file=android.cache \
                --build=i686-pc-linux-gnu \
                --host=arm-linux \
                LDFLAGS=-L/bla/bla/lib

Of course, replace i686-pc-linux-gnu with a proper value for your machine.
The output of config.guess is a proper value most of the time.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]