autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running a different linker


From: Ralf Wildenhues
Subject: Re: Running a different linker
Date: Mon, 29 May 2006 10:32:23 +0200
User-agent: Mutt/1.5.11

Hi Rüdiger,

* Rüdiger Ranft wrote on Mon, May 29, 2006 at 10:18:21AM CEST:
> 
> I want to compile some microcontoroller code with autoconf/automake. The
> problem I have is that I must explicit call the linker, because the
> compiler is unable to link the code. Also the linker is split into two
> programs, which must be called after each other (which can be joined
> into a shell script).

Probably the easiest if you write a shell script for the compiler that
invokes the compiler for compiling, and the two other programs for
linking.

The script named "compile" that comes with Automake has logic how to
easily distinguish between compile and link stage, you can probably use
that as a starting point (even if it serves a completely different
purpose.)

Then, just
  ./configure CC=your-script

If you are using libtool and shared libraries, you could probably get
away with overriding some of its variables; look at $archive_cmds,
$archive_expsyms_cmds and maybe $old_archive_cmds.  (You may still need
to override the linker for creating programs then, but that isn't hard
to do.)

> So is there any parameter/variable to set the linker binary, or must I
> hack the toolchain to get the things work?

That sounds like more work; but you haven't stated which compiler you
use, so I don't know.  It may be a better long-term solution though.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]