* [gentoo-user] Compiling 32 bit library on x86_64
@ 2010-04-30 9:25 Roger Mason
2010-04-30 13:02 ` Mike Edenfield
0 siblings, 1 reply; 7+ messages in thread
From: Roger Mason @ 2010-04-30 9:25 UTC (permalink / raw
To: gentoo-user
Hello,
I need to compile a 32 bit version of libtermcap on an x86_64 (multilib)
system. Can someone tell me how to set up CFLAGS? This is what I have
at the moment:
CFLAGS="-O2 -m32 -march=native -msse3 -pipe"
CXXFLAGS="-O2 -m32 -march=native -msse3 -pipe"
ebuild libtermcap-compat-2.0.8-r2.ebuild compile
ends with:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld:
i386 architecture of input file `termcap.o' is incompatible with
i386:x86-64 output
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld:
i386 architecture of input file `tparam.o' is incompatible with
i386:x86-64 output
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld:
i386 architecture of input file `version.o' is incompatible with
i386:x86-64 output
Thanks,
Roger
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Compiling 32 bit library on x86_64
[not found] <eEVku-15s-17@gated-at.bofh.it>
@ 2010-04-30 12:09 ` David W Noon
2010-04-30 13:26 ` Roger Mason
0 siblings, 1 reply; 7+ messages in thread
From: David W Noon @ 2010-04-30 12:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
On Fri, 30 Apr 2010 12:10:02 +0200, Roger Mason wrote about
[gentoo-user] Compiling 32 bit library on x86_64:
>Hello,
>
>I need to compile a 32 bit version of libtermcap on an x86_64
>(multilib) system. Can someone tell me how to set up CFLAGS? This is
>what I have at the moment:
>
>CFLAGS="-O2 -m32 -march=native -msse3 -pipe"
>CXXFLAGS="-O2 -m32 -march=native -msse3 -pipe"
The -march=native will shoot you in the foot. Pick a 32-bit
architecture and use that instead; e.g. -march=i686
Then, -msse3 could also be problematic, unless the target is a very late
model Pentium 4. I would ditch that too.
--
Regards,
Dave [RLU #314465]
======================================================================
dwnoon@ntlworld.com (David W Noon)
======================================================================
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Compiling 32 bit library on x86_64
2010-04-30 9:25 [gentoo-user] Compiling 32 bit library on x86_64 Roger Mason
@ 2010-04-30 13:02 ` Mike Edenfield
2010-04-30 16:40 ` Roger Mason
0 siblings, 1 reply; 7+ messages in thread
From: Mike Edenfield @ 2010-04-30 13:02 UTC (permalink / raw
To: gentoo-user
On 4/30/2010 5:25 AM, Roger Mason wrote:
> Hello,
>
> I need to compile a 32 bit version of libtermcap on an x86_64 (multilib)
> system. Can someone tell me how to set up CFLAGS? This is what I have
> at the moment:
Have you tried using sys-devel/crossdev?
It will set up the entire 32-bit cross-compiler environment for you;
then it's just a matter of setting a couple of environment variables to
switch compilers.
--Mike
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Compiling 32 bit library on x86_64
2010-04-30 12:09 ` David W Noon
@ 2010-04-30 13:26 ` Roger Mason
0 siblings, 0 replies; 7+ messages in thread
From: Roger Mason @ 2010-04-30 13:26 UTC (permalink / raw
To: gentoo-user
David W Noon <dwnoon@ntlworld.com> writes:
> On Fri, 30 Apr 2010 12:10:02 +0200, Roger Mason wrote about
> [gentoo-user] Compiling 32 bit library on x86_64:
>
>>Hello,
>>
>>I need to compile a 32 bit version of libtermcap on an x86_64
>>(multilib) system. Can someone tell me how to set up CFLAGS? This is
>>what I have at the moment:
>>
>>CFLAGS="-O2 -m32 -march=native -msse3 -pipe"
>>CXXFLAGS="-O2 -m32 -march=native -msse3 -pipe"
>
> The -march=native will shoot you in the foot. Pick a 32-bit
> architecture and use that instead; e.g. -march=i686
>
> Then, -msse3 could also be problematic, unless the target is a very late
> model Pentium 4. I would ditch that too.
Many thanks. Interestingly enough, even though the build of libtermca
failed, the static library _was_ built and my application builds against
it just fine.
Roger
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Compiling 32 bit library on x86_64
2010-04-30 13:02 ` Mike Edenfield
@ 2010-04-30 16:40 ` Roger Mason
2010-04-30 18:49 ` Mike Edenfield
0 siblings, 1 reply; 7+ messages in thread
From: Roger Mason @ 2010-04-30 16:40 UTC (permalink / raw
To: gentoo-user
Mike Edenfield <kutulu@kutulu.org> writes:
> Have you tried using sys-devel/crossdev?
Not in the present context.
> It will set up the entire 32-bit cross-compiler environment for you;
> then it's just a matter of setting a couple of environment variables to
> switch compilers.
Some time ago I tried setting up cross-compilation so that I could use a
rather heterogeneous collection of amd64, ppc and x86 machines in
icecream. Unfortunately I could not get cross-compilation to work. I
asked about it in this forum but did not get any replies.
Cheers,
Roger
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Compiling 32 bit library on x86_64
2010-04-30 16:40 ` Roger Mason
@ 2010-04-30 18:49 ` Mike Edenfield
2010-05-01 9:32 ` Roger Mason
0 siblings, 1 reply; 7+ messages in thread
From: Mike Edenfield @ 2010-04-30 18:49 UTC (permalink / raw
To: gentoo-user
On 4/30/2010 12:40 PM, Roger Mason wrote:
> Mike Edenfield <kutulu@kutulu.org> writes:
>
>> Have you tried using sys-devel/crossdev?
>
> Not in the present context.
>
>> It will set up the entire 32-bit cross-compiler environment for you;
>> then it's just a matter of setting a couple of environment variables to
>> switch compilers.
>
> Some time ago I tried setting up cross-compilation so that I could use a
> rather heterogeneous collection of amd64, ppc and x86 machines in
> icecream. Unfortunately I could not get cross-compilation to work. I
> asked about it in this forum but did not get any replies.
I have it set up on my laptop. I admit it's been a while since I used
it, but I know it worked at one point.
Though I was using it on a standard PC, the best source of information I
found on the process was the Gentoo Embedded Handbook:
http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1
The whole first section is on setting up a cross-compiler, just
substitute i686-pc-linux-gnu for your target architecture.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Compiling 32 bit library on x86_64
2010-04-30 18:49 ` Mike Edenfield
@ 2010-05-01 9:32 ` Roger Mason
0 siblings, 0 replies; 7+ messages in thread
From: Roger Mason @ 2010-05-01 9:32 UTC (permalink / raw
To: gentoo-user
Mike Edenfield <kutulu@kutulu.org> writes:
> On 4/30/2010 12:40 PM, Roger Mason wrote:
>> Mike Edenfield <kutulu@kutulu.org> writes:
>>
>>> Have you tried using sys-devel/crossdev?
>>
>> Not in the present context.
>>
>>> It will set up the entire 32-bit cross-compiler environment for you;
>>> then it's just a matter of setting a couple of environment variables to
>>> switch compilers.
>>
>> Some time ago I tried setting up cross-compilation so that I could use a
>> rather heterogeneous collection of amd64, ppc and x86 machines in
>> icecream. Unfortunately I could not get cross-compilation to work. I
>> asked about it in this forum but did not get any replies.
>
> I have it set up on my laptop. I admit it's been a while since I used
> it, but I know it worked at one point.
>
> Though I was using it on a standard PC, the best source of information I
> found on the process was the Gentoo Embedded Handbook:
>
>
> http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1
>
> The whole first section is on setting up a cross-compiler, just
> substitute i686-pc-linux-gnu for your target architecture.
Ah, thank you. I'll have another go at it this summer.
Roger
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-01 9:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-30 9:25 [gentoo-user] Compiling 32 bit library on x86_64 Roger Mason
2010-04-30 13:02 ` Mike Edenfield
2010-04-30 16:40 ` Roger Mason
2010-04-30 18:49 ` Mike Edenfield
2010-05-01 9:32 ` Roger Mason
[not found] <eEVku-15s-17@gated-at.bofh.it>
2010-04-30 12:09 ` David W Noon
2010-04-30 13:26 ` Roger Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox