i386 compile with fedora-core3 x86_64?
What packages have to be installed that I can compile i386 binaries using gcc -m32 option? Are there any problems if 32-bit libraries coexists with 64-bit libraries? And same question for headers also?
And now some information about my OS. I installed fc-3 x86_64 heidelberg ( DVD ) with default workstation setup. I only changed partitions. After that I installed ( not upgraded my previous gcc 3.3.x ) gcc 3.4.2. Now I have gcc 3.3.x and 3.4.2 installed. I installed gcc 3.4.2 with rpm using --force option. Was this a wrong procedure and will it cause troubles later? If so how I can go back to state when gcc 3.4.2 wasn't installed? Thank you for your help. |
I found my problem. I have to use -Xlinker -melf_i386 for g++ which instructs linker to use elf_i386 script instead of default script.
But this behavior brings up other questions. Why doesn't -m32 option also change used linking script? And makefiles...I have nice makefile which causes every cpp-file in make invoked directory to be built as executables. But I can't make that -Xlinker option to work in makefiles. Amu suggestions? |
Quote:
Your makefile probably does compiling and linking in separate steps, so gcc and CFLAGS are not used in the linking step. Try LD="ld -m elf_i386" or LDFLAGS="-m elf_i386". |
Quote:
At the momemt here is my command g++ -m32 -ansi -Wall -Xlinker -melf_i386 -o testi32 -I/usr/include/c++/3.4.2/i386-redhat-linux testi.cpp Strange thing is that I have to use that -I/usr/include/c++/3.4.2/i386-redhat-linux option for finding headers. It is same for 64-bit compiles also. Is there something wrong with my gcc configuration? |
What does "cpp -x c++ -v" say?
|
Quote:
Code:
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.2/specs |
OK,you probably noticed the problem there, x86_64 instead of i386. You need a 64-bit version of the package that contains those headers (libstdc++-devel or something like that).
|
Quote:
Now I have find a way to make a makefile which would compile every cpp-file in directory and produce 32-bit and 64-bit executables of every source :D Anyway my compiler trouble case is now closed. |
All times are GMT -5. The time now is 04:12 AM. |