Chris Lattner wrote:> > This looks like you're compiling llvm-gcc3, which is quite dead by now. > Please follow these instructions: > http://llvm.org/docs/CFEBuildInstrs.html > >Oups, sorry for that. Here is the error message with the latest svn version: gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -DHAVE_CONFIG_H -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I/home/varth/project/llvm-cvs/llvm/include -I/usr/local/home/varth/project/llvm-cvs/llvm/include ../../trunk/gcc/stor-layout.c -o stor-layout.o ../../trunk/gcc/stor-layout.c:450:25: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2 ../../trunk/gcc/stor-layout.c: In function 'layout_decl': ../../trunk/gcc/stor-layout.c:449: error: 'ADJUST_FIELD_ALIGN' undeclared (first use in this function) ../../trunk/gcc/stor-layout.c:449: error: (Each undeclared identifier is reported only once ../../trunk/gcc/stor-layout.c:449: error: for each function it appears in.) ../../trunk/gcc/stor-layout.c:711:43: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2 ../../trunk/gcc/stor-layout.c: In function 'update_alignment_for_field': ../../trunk/gcc/stor-layout.c:708: error: 'ADJUST_FIELD_ALIGN' undeclared (first use in this function) ../../trunk/gcc/stor-layout.c:760:41: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2 ../../trunk/gcc/stor-layout.c:994:44: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2 ../../trunk/gcc/stor-layout.c: In function 'place_field': ../../trunk/gcc/stor-layout.c:991: error: 'ADJUST_FIELD_ALIGN' undeclared (first use in this function) ../../trunk/gcc/stor-layout.c:1031:44: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2 make[1]: *** [stor-layout.o] Error 1 make[1]: Leaving directory `/home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc' make: *** [all-gcc] Error 2 I looked a bit at the source, and the gcc/config/darwin.h declares a ADJUST_FIELD_ALIGN with two arguments whereas all other back-ends that declare ADJUST_FIELD_ALIGN have only two arguments. And it seems that stor-layout.c assumes that if we have ADJUST_FIELD_ALIGN defined, then we're on darwin. Nicolas
OK, seems like there were unused TARGET_MACHO macros that would protect these errors from happening. I made some modifications that add #if TARGET_MACHO. Now the error is a linkage problem: /home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc/xgcc: symbol lookup error: /home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc/libgcc_s.so.1: undefined symbol: __thenan_sf And even if I force the definition of thenan_sf with const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} }; I still get the error. Cheers, Nicolas Nicolas Geoffray wrote:> Chris Lattner wrote: > >> This looks like you're compiling llvm-gcc3, which is quite dead by now. >> Please follow these instructions: >> http://llvm.org/docs/CFEBuildInstrs.html >> >> >> > Oups, sorry for that. Here is the error message with the latest svn version: > > gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes > -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros > -Wold-style-definition -DHAVE_CONFIG_H -DENABLE_LLVM > -D__STDC_LIMIT_MACROS -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. > -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include > -I/home/varth/project/llvm-cvs/llvm/include > -I/usr/local/home/varth/project/llvm-cvs/llvm/include > ../../trunk/gcc/stor-layout.c -o stor-layout.o > ../../trunk/gcc/stor-layout.c:450:25: error: macro "ADJUST_FIELD_ALIGN" > passed 3 arguments, but takes just 2 > ../../trunk/gcc/stor-layout.c: In function 'layout_decl': > ../../trunk/gcc/stor-layout.c:449: error: 'ADJUST_FIELD_ALIGN' > undeclared (first use in this function) > ../../trunk/gcc/stor-layout.c:449: error: (Each undeclared identifier is > reported only once > ../../trunk/gcc/stor-layout.c:449: error: for each function it appears in.) > ../../trunk/gcc/stor-layout.c:711:43: error: macro "ADJUST_FIELD_ALIGN" > passed 3 arguments, but takes just 2 > ../../trunk/gcc/stor-layout.c: In function 'update_alignment_for_field': > ../../trunk/gcc/stor-layout.c:708: error: 'ADJUST_FIELD_ALIGN' > undeclared (first use in this function) > ../../trunk/gcc/stor-layout.c:760:41: error: macro "ADJUST_FIELD_ALIGN" > passed 3 arguments, but takes just 2 > ../../trunk/gcc/stor-layout.c:994:44: error: macro "ADJUST_FIELD_ALIGN" > passed 3 arguments, but takes just 2 > ../../trunk/gcc/stor-layout.c: In function 'place_field': > ../../trunk/gcc/stor-layout.c:991: error: 'ADJUST_FIELD_ALIGN' > undeclared (first use in this function) > ../../trunk/gcc/stor-layout.c:1031:44: error: macro "ADJUST_FIELD_ALIGN" > passed 3 arguments, but takes just 2 > make[1]: *** [stor-layout.o] Error 1 > make[1]: Leaving directory `/home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc' > make: *** [all-gcc] Error 2 > > > I looked a bit at the source, and the gcc/config/darwin.h declares a > ADJUST_FIELD_ALIGN with two arguments whereas all other back-ends that > declare ADJUST_FIELD_ALIGN have only two arguments. And it seems that > stor-layout.c assumes that if we have ADJUST_FIELD_ALIGN defined, then > we're on darwin. > > Nicolas > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On Tue, 22 May 2007, Nicolas Geoffray wrote:> OK, seems like there were unused TARGET_MACHO macros that would protect > these errors from happening. I made some modifications that add #if > TARGET_MACHO.ok. If you send a patch in that adds these, I would be happy to apply it.> Now the error is a linkage problem: > > /home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc/xgcc: symbol lookup > error: /home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc/libgcc_s.so.1: > undefined symbol: __thenan_sf > > And even if I force the definition of thenan_sf with > const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} }; > > I still get the error.Unfortunately, I really don't know. I assume this is supposed to be coming from gcc/config/fp-bit.c, but I don't know how any of this stuff works. -Chris> Cheers, > Nicolas > > Nicolas Geoffray wrote: >> Chris Lattner wrote: >> >>> This looks like you're compiling llvm-gcc3, which is quite dead by now. >>> Please follow these instructions: >>> http://llvm.org/docs/CFEBuildInstrs.html >>> >>> >>> >> Oups, sorry for that. Here is the error message with the latest svn version: >> >> gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes >> -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros >> -Wold-style-definition -DHAVE_CONFIG_H -DENABLE_LLVM >> -D__STDC_LIMIT_MACROS -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. >> -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include >> -I/home/varth/project/llvm-cvs/llvm/include >> -I/usr/local/home/varth/project/llvm-cvs/llvm/include >> ../../trunk/gcc/stor-layout.c -o stor-layout.o >> ../../trunk/gcc/stor-layout.c:450:25: error: macro "ADJUST_FIELD_ALIGN" >> passed 3 arguments, but takes just 2 >> ../../trunk/gcc/stor-layout.c: In function 'layout_decl': >> ../../trunk/gcc/stor-layout.c:449: error: 'ADJUST_FIELD_ALIGN' >> undeclared (first use in this function) >> ../../trunk/gcc/stor-layout.c:449: error: (Each undeclared identifier is >> reported only once >> ../../trunk/gcc/stor-layout.c:449: error: for each function it appears in.) >> ../../trunk/gcc/stor-layout.c:711:43: error: macro "ADJUST_FIELD_ALIGN" >> passed 3 arguments, but takes just 2 >> ../../trunk/gcc/stor-layout.c: In function 'update_alignment_for_field': >> ../../trunk/gcc/stor-layout.c:708: error: 'ADJUST_FIELD_ALIGN' >> undeclared (first use in this function) >> ../../trunk/gcc/stor-layout.c:760:41: error: macro "ADJUST_FIELD_ALIGN" >> passed 3 arguments, but takes just 2 >> ../../trunk/gcc/stor-layout.c:994:44: error: macro "ADJUST_FIELD_ALIGN" >> passed 3 arguments, but takes just 2 >> ../../trunk/gcc/stor-layout.c: In function 'place_field': >> ../../trunk/gcc/stor-layout.c:991: error: 'ADJUST_FIELD_ALIGN' >> undeclared (first use in this function) >> ../../trunk/gcc/stor-layout.c:1031:44: error: macro "ADJUST_FIELD_ALIGN" >> passed 3 arguments, but takes just 2 >> make[1]: *** [stor-layout.o] Error 1 >> make[1]: Leaving directory `/home/varth/project/llvm-cvs/llvm-gcc4/obj/gcc' >> make: *** [all-gcc] Error 2 >> >> >> I looked a bit at the source, and the gcc/config/darwin.h declares a >> ADJUST_FIELD_ALIGN with two arguments whereas all other back-ends that >> declare ADJUST_FIELD_ALIGN have only two arguments. And it seems that >> stor-layout.c assumes that if we have ADJUST_FIELD_ALIGN defined, then >> we're on darwin. >> >> Nicolas >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.org/