Skip to main content



      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 05:27 Go to next message
Eclipse UserFriend
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 11:02 Go to previous messageGo to next message
Eclipse UserFriend
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 09:17 Go to previous messageGo to next message
Eclipse UserFriend
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 10:43 Go to previous message
Eclipse UserFriend
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 May 08 13:17:30 EDT 2025

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

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

Back to the top