Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » using specific version of gcc
using specific version of gcc [message #2493] Wed, 06 May 2009 09:27 Go to next message
Patrick Geremia is currently offline Patrick GeremiaFriend
Messages: 79
Registered: July 2009
Member
I encountered a problem when trying to use a different version of gcc than
the one coming with my linux distribution.

I changed the rootDir property of the gnu.targets.Linux86 module to the
gcc version version I want to use (/apps/free/gcc/4.3.2 in my case) but
when building with xdc it complain about not being able to find the
archiver.
Looking closer it looks like the archiver has a hard dependency on the
specified rootDir

const Linux86.ar// The command used to create an archive =
ITarget.Command {
cmd: "$(rootDir)/bin/ar",
opts: "cr"

Any idea on how to solve this?
Re: using specific version of gcc [message #2580 is a reply to message #2493] Wed, 06 May 2009 15:02 Go to previous messageGo to next message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Patrick Geremia wrote:
> I encountered a problem when trying to use a different version of gcc
> than the one coming with my linux distribution.
>
> I changed the rootDir property of the gnu.targets.Linux86 module to the
> gcc version version I want to use (/apps/free/gcc/4.3.2 in my case) but
> when building with xdc it complain about not being able to find the
> archiver.
> Looking closer it looks like the archiver has a hard dependency on the
> specified rootDir
>
> const Linux86.ar// The command used to create an archive =
> ITarget.Command {
> cmd: "$(rootDir)/bin/ar",
> opts: "cr"
>
> Any idea on how to solve this?
>
Hummm. The only time I've seen this issue is when binutils has not been
properly installed. Where are ar (and ld) installed for 4.3.2?

Target commands are intensionally (but not impossibly) hard to change.
The easiest "fix" is to simply redefine cmd in your config.bld file
(where you specify your target's rootDir):

/* "unseal" cmd in order to modify its value */
Linux86.ar.$unseal("cmd");
Linux86U.ar.cmd = "/path/to/my/ar";

See also http://rtsc.eclipse.org/docs-tip/XDCscript_-_Typed-Object.%2 4unseal
Re: using specific version of gcc [message #2668 is a reply to message #2580] Thu, 07 May 2009 13:17 Go to previous messageGo to next message
Patrick Geremia is currently offline Patrick GeremiaFriend
Messages: 79
Registered: July 2009
Member
as far as I know a gcc version is not bundled with a binutils version.
When you work with a linux distro (RHEL4.7 in my case, which features gcc
version 3.4.6), the archiver and gcc will be located both in /usr/bin.
Now I may need to use a more recent version of gcc (4.3.2 for example),
our IT group installs it somewhere on our network (in our case
/apps/free/gcc/4.3.2) but the archiver remains in its original location
i.e. the /usr/bin. Hence my configuration. I do not see any improper
installation here.
Would you agree?
Re: using specific version of gcc [message #2696 is a reply to message #2668] Thu, 07 May 2009 14:43 Go to previous message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Patrick Geremia wrote:
> as far as I know a gcc version is not bundled with a binutils version.
> When you work with a linux distro (RHEL4.7 in my case, which features
> gcc version 3.4.6), the archiver and gcc will be located both in /usr/bin.
> Now I may need to use a more recent version of gcc (4.3.2 for example),
> our IT group installs it somewhere on our network (in our case
> /apps/free/gcc/4.3.2) but the archiver remains in its original location
> i.e. the /usr/bin. Hence my configuration. I do not see any improper
> installation here.
> Would you agree?
>
ar is not part of the gcc distribution and yet it is a necessary tool.
Moreover, binutils contains several other invaluable tools; e.g., as,
ld, nm, size, strip, objdump, ... In my experience, every gcc
distribution includes some version of binutils.

On the other hand, ar is a _very_ simple tool that is independent of the
target architecture; i.e., you can use virtually any version of ar for
any cross-compiler that operates on a given host.
Previous Topic:pb running some commands in lesson 2 of packaging primer
Next Topic:Creating a buffer in .cfg
Goto Forum:
  


Current Time: Thu Apr 25 06:33:52 GMT 2024

Powered by FUDForum. Page generated in 0.02773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top