Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » building gnu target on linux 64 bit machines
building gnu target on linux 64 bit machines [message #646261] Wed, 22 December 2010 23:02 Go to next message
Patrick Geremia is currently offline Patrick GeremiaFriend
Messages: 79
Registered: July 2009
Member
we are building some code for the gnu target on linux 64 machines
(ubuntu distro).
We almost always compile with the -m32 gcc option as our code is seldom
64-bit ready.
The problem is that by default XDCtools adds /ust/lib as library search
path which on a 64 bit machine points to 64 bit libraries and hence the
following messages

# lnk86U ti_wbi_demo_runtime_debug_seq_86U.x86U ...
/usr///bin/gcc -m32 -lm -o ti_wbi_demo_runtime_debug_seq_86U.x86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/freq_shift _512_le.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/ul_rx_em.o 86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/ul_fft_iff t.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/freq_shift _1024_le.o86U package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/tbSize_tab le.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/memmgr.o86 U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/cppi_devic e.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/freq_shift _2048_le.o86U package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/ul_rx_proc ess.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/ul_rx.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/qmss_devic e.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/ul_rx_soft slicer.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U_x86U.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/pusch_MCS_ table.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/osal.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U/src/ul_rx_main _par_em.o86U
package/cfg/ti_wbi_demo_runtime_debug_seq_86U_x86U.xdl -lstdc++
-L/usr//lib
/usr/bin/ld: skipping incompatible /usr//lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr//lib/libm.a when searching for -lm
/usr/bin/ld: warning:
package/cfg/ti_wbi_demo_runtime_debug_seq_86U_x86U.xdl contains output
sections; did you forget -T?
/usr/bin/ld: skipping incompatible /usr//lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr//lib/libc.a when searching for -lc

How can I control this? Ideally I would need a mean to detect whether
the host I use for compilation is 32 or 64 bit and then select the
appropriate search path?
Looking at the XDC packages, the property is a module wide config and I
am not sure how to change it?

Linux86.lnkOpts// User configurable linker options = ITarget2.Options {
prefix: "",
suffix: "-Wl,-Map=$(XDCCFGDIR)/$@.map -lstdc++ -L$(rootDir)/lib"
};
Re: building gnu target on linux 64 bit machines [message #646390 is a reply to message #646261] Thu, 23 December 2010 16:11 Go to previous message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
On 12/22/2010 3:02 PM, Patrick Geremia wrote:
> we are building some code for the gnu target on linux 64 machines
> (ubuntu distro).
> We almost always compile with the -m32 gcc option as our code is seldom
> 64-bit ready.
> The problem is that by default XDCtools adds /ust/lib as library search
> path which on a 64 bit machine points to 64 bit libraries and hence the
> following messages
>
[snip]
> package/cfg/ti_wbi_demo_runtime_debug_seq_86U_x86U.xdl contains output
> sections; did you forget -T?
> /usr/bin/ld: skipping incompatible /usr//lib/libc.so when searching for -lc
> /usr/bin/ld: skipping incompatible /usr//lib/libc.a when searching for -lc
>
> How can I control this? Ideally I would need a mean to detect whether
> the host I use for compilation is 32 or 64 bit and then select the
> appropriate search path?
Right. I'm not sure how to detect this reliably, but if there is a
command you can run that gives you the information you can use
xdc.exec() to run the command from your config.bld script. See
http://rtsc.eclipse.org/docs-tip/XDCscript_-_xdc.exec.

Since config.bld is re-run for _every_ package it might be better to set
an environment variable and use java.lang.System.getenv().

> Looking at the XDC packages, the property is a module wide config and I
> am not sure how to change it?
>
>

The config options of a target can be set in your config.bld file. In
this case, you might set them as follows:

Linux86 = xdc.module("gnu.targets.Linux86");
Linux86.lnkOpts.suffix = "-Wl,-Map=$(XDCCFGDIR)/$@.map -lstdc++";
Previous Topic:linking with DSP/BIOS 5
Next Topic:package not building when XDCOPTIONS not set to -v
Goto Forum:
  


Current Time: Thu Oct 10 20:42:28 GMT 2024

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

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

Back to the top