Would you like to help me?
L.Yan
g_lqyan@stu.edu.cn
Sat Oct 27 14:45:00 GMT 2007
Dear all,
I want to build the source of gcc and make '-msoft-float' available. But
I don't know how to build the source code. I just do it as the following
steps:
1. download the source code, gcc-4.1.2.tar.gz, from the mirror site;
2. tar -xzf gcc-4.1.2.tar.gz;
3. ./configure --prefix=/home/user/gcc4.1.2/install
--with-local-prefix=/home/user/gcc4.1.2/install --enable-threads=single
--enable-languages=c,c++,objc --enable-bootstrap
4. make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2
-fno-implicit-templates -msoft-float' bootstrap
5. make install
Finally, I use the above gcc to compile a test program
/home/user/gcc4.1.2/install/bin/gcc -msoft-float test.c -o test
but there are errors :
/tmp/ccWjy9Ug.o: In function `main':
test.c:(.text+0x2f): undefined reference to `__floatsidf'
test.c:(.text+0x55): undefined reference to `__adddf3'
test.c:(.text+0x61): undefined reference to `__fixdfsi'
collect2: ld returned 1 exit status
When I modify the configure and make command, as the following,
3. ./configure --prefix=/home/user/gcc4.1.2/install
--with-local-prefix=/home/user/gcc4.1.2/install --with-gnu-as
--with-gnu-ld --enable-multilib --enable-threads=single
--enable-languages=c,c++ --with-float=soft --enable-bootstrap
4. make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2
-fno-implicit-templates -msoft-float' bootstrap
there are errors as the following:
............................
checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
This target does not support --with-float.
make[2]: *** [configure-stage1-gcc] Error 1
make[2]: Leaving directory `/home/user/gcc4.1.2/gcc-4.1.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/user/gcc4.1.2/gcc-4.1.2'
make: *** [bootstrap] Error 2
Would you like to tell me how to configure and compile GCC, and then I
could use the '-msoft-float' flag.
Any suggestions from you are appreciated.
Thanks.
Best wishes,
Peter
More information about the Gcc-help
mailing list