[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c++ cross compiling for 32 bit
From: |
Paul Pluzhnikov |
Subject: |
Re: c++ cross compiling for 32 bit |
Date: |
Tue, 13 Mar 2007 07:54:08 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"Bert" <bert.culpepper@gmail.com> writes:
> Thanks for the responses. I did find after posting my question that I
> was using the wrong linker, switching to g++ helped. But I did have
> to move some files from /usr/lib64/gcc/x86_64-suse-linux/4.0.2/32 one
> level up. And also copy crt?.o from /usr/lib to /usr/lib64 to get my
> file to link correctly.
In the process you probably screwed up your 64-bit install, and
will no longer be able to build 64-bit packages.
If 'echo "int main() { return 0; }" | g++ -m32 -xc++ -'
doesn't work "out of the box", SuSE really screwed up with their
gcc/g++ package.
You may work around this by building your own (gcc 4.0.x builds
correctly on all Linux distributions I've tried it on).
You'll probably have to undo the damage you already did by copying
crt?.o files.
> Even with the "-m32" flag, the system kept
> looking in the "64" directories for libraries and the "crt?.o" files.
> The better thing to do seems to be to set up different boot
> environments.
I had absolutely no problems on any of RHEL-3, FC5, FC6 machines. All
build 32 and 64 bit executables just fine.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.