Re: Help me to develop a FreeBSD patch for gcc-4.2.1
--- On Wed, 10/8/08, Alexander Kabaev [EMAIL PROTECTED] wrote: If you still have CVS tree available, you can do 'cvs diff -rFSF' in contrib/gcc and apply the patches to files gcc-4.2.1/gcc. Hi Alexander Here is how I made the patch: cd ~ mkdir -pv freebsd cd freebsd cvs -d [EMAIL PROTECTED]:/home/ncvs co -rRELENG_7 src cvs diff -rFSF FreeBSD-gcc-4.2.1.patch I have applied the patch on a fresh copy of gcc-4.2.1 and compiled. As before it develops errors: ../../gcc-4.2.1/gcc/c-format.c: In function 'check_format_info_main': ../../gcc-4.2.1/gcc/c-format.c:1780: error: 'flag_format_extensions' undeclared (first use in this function) ../../gcc-4.2.1/gcc/c-format.c:1780: error: (Each undeclared identifier is reported only once ../../gcc-4.2.1/gcc/c-format.c:1780: error: for each function it appears in.) gmake[2]: *** [c-format.o] Error 1 Have I missed out something? Could you help me to move forward from here? For an example, I can over come the above error by adding following lines to the gcc-4.2.1/gcc/config/i386/i386.opt: fformat-extensions Common Report Var(flag_format_extensions) Init(0) Allow FreeBSD kernel-specific printf format specifiers. Is that the correct move forward? Best regards Unga ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Help me to develop a FreeBSD patch for gcc-4.2.1
On 2008-Oct-07 02:06:03 -0700, Unga [EMAIL PROTECTED] wrote: Now I unpacked the gcc-4.2.1.tar.bz2 into some other directory and applied this FreeBSD-gcc.patch. Ran configure and compiled. It develop following error: ../../gcc-4.2.1/gcc/c-format.c:1780: error: 'flag_format_extensions' undeclared (first use in this function) ../../gcc-4.2.1/gcc/c-format.c:1780: error: (Each undeclared identifier is reported only once ../../gcc-4.2.1/gcc/c-format.c:1780: error: for each function it appears in.) gmake[2]: *** [c-format.o] Error 1 Note that the FreeBSD gcc is not built using the gcc configure script. Instead, all the target-specific configuration is under /usr/src/gnu/usr.bin/cc -- Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. pgpMQOa258nXA.pgp Description: PGP signature
Re: Help me to develop a FreeBSD patch for gcc-4.2.1
On Tue, 7 Oct 2008 20:25:03 -0700 (PDT) Unga [EMAIL PROTECTED] wrote: --- On Wed, 10/8/08, Alexander Kabaev [EMAIL PROTECTED] wrote: If you still have CVS tree available, you can do 'cvs diff -rFSF' in contrib/gcc and apply the patches to files gcc-4.2.1/gcc. Hi Alexander, thanks for the reply. I'm new to 'cvs diff -rFSF'. I need to do more home work before I try your method. Could you kindly confirm it work for you? after applying the patch, does your compilation of gcc complete cleanly? I get errors. Therefore, could you try it please. I'm waiting for your reply. Best regards Unga I never had a good reason to try, but it should compile with little or no extra work. Getting diff against vendor branch in CVS is much easier way than what you are doing anyway. -- Alexander Kabaev signature.asc Description: PGP signature
Re: Help me to develop a FreeBSD patch for gcc-4.2.1
--- On Tue, 10/7/08, Peter Jeremy [EMAIL PROTECTED] wrote: On 2008-Oct-06 06:19:34 -0700, Unga [EMAIL PROTECTED] wrote: The FreeBSD stable comes with gcc-4.2.1 but the sources are scattered over the /usr/src, therefore, I find it difficult to re-create the gcc-4.2.1 to its original directory layout to make a patch. The original sources for gcc can be found in /usr/src/contrib/gcc - note that this is not a complete gcc 4.2.1 distribution as parts of gcc that are not relevant for FreeBSD have been deleted. Refer to the FREEBSD-* files for details. Here is how I did that: 1. Unpack original GCC sources tar -xjf gcc-4.2.1.tar.bz2 mv -v gcc-4.2.1 gcc-4.2.1.orig 2. Bring under one roof FreeBSD-modified GCC sources mkdir -pv gcc-4.2.1 cd gcc-4.2.1 cp -R /usr/src/contrib/gcc . cp -R /usr/src/contrib/gcclibs/ . cp -R /usr/src/contrib/libobjc . cp -R /usr/src/contrib/libstdc++ libstdc++-v3 cd .. 3. Make a patch diff -aur gcc-4.2.1.orig gcc-4.2.1 FreeBSD-gcc.patch Now the question is have I collected all the GCC sources from FreeBSD source tree? Have I missed any? Now I unpacked the gcc-4.2.1.tar.bz2 into some other directory and applied this FreeBSD-gcc.patch. Ran configure and compiled. It develop following error: ../../gcc-4.2.1/gcc/c-format.c:1780: error: 'flag_format_extensions' undeclared (first use in this function) ../../gcc-4.2.1/gcc/c-format.c:1780: error: (Each undeclared identifier is reported only once ../../gcc-4.2.1/gcc/c-format.c:1780: error: for each function it appears in.) gmake[2]: *** [c-format.o] Error 1 So where is the flag_format_extensions is declared in FreeBSD? Best regards Unga ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Help me to develop a FreeBSD patch for gcc-4.2.1
On Mon, 6 Oct 2008 06:19:34 -0700 (PDT) Unga [EMAIL PROTECTED] wrote: Hi all I need to patch the gcc original sources to suit the FreeBSD, specially to support FreeBSD kernel compilation. I have tried it, spent lot of time, but it still develops compilation errors. The FreeBSD stable comes with gcc-4.2.1 but the sources are scattered over the /usr/src, therefore, I find it difficult to re-create the gcc-4.2.1 to its original directory layout to make a patch. I appreciate it very much, if you guys could help me to identify the pieces. Or alternatively, if someone could straight away put the FreeBSD gcc sources back to a directory and make a patch compared to the original gcc-4.2.1 sources from GNU and post here, I could apply the patch on my side and verify it was done correctly, whether I can compile the FreeBSD kernel or not. Many thanks in advance. Kind regards Unga If you still have CVS tree available, you can do 'cvs diff -rFSF' in contrib/gcc and apply the patches to files gcc-4.2.1/gcc. -- Alexander Kabaev signature.asc Description: PGP signature
Re: Help me to develop a FreeBSD patch for gcc-4.2.1
--- On Wed, 10/8/08, Alexander Kabaev [EMAIL PROTECTED] wrote: If you still have CVS tree available, you can do 'cvs diff -rFSF' in contrib/gcc and apply the patches to files gcc-4.2.1/gcc. Hi Alexander, thanks for the reply. I'm new to 'cvs diff -rFSF'. I need to do more home work before I try your method. Could you kindly confirm it work for you? after applying the patch, does your compilation of gcc complete cleanly? I get errors. Therefore, could you try it please. I'm waiting for your reply. Best regards Unga ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Help me to develop a FreeBSD patch for gcc-4.2.1
Hi all I need to patch the gcc original sources to suit the FreeBSD, specially to support FreeBSD kernel compilation. I have tried it, spent lot of time, but it still develops compilation errors. The FreeBSD stable comes with gcc-4.2.1 but the sources are scattered over the /usr/src, therefore, I find it difficult to re-create the gcc-4.2.1 to its original directory layout to make a patch. I appreciate it very much, if you guys could help me to identify the pieces. Or alternatively, if someone could straight away put the FreeBSD gcc sources back to a directory and make a patch compared to the original gcc-4.2.1 sources from GNU and post here, I could apply the patch on my side and verify it was done correctly, whether I can compile the FreeBSD kernel or not. Many thanks in advance. Kind regards Unga ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Help me to develop a FreeBSD patch for gcc-4.2.1
Please wrap your mail before 80 columns. On 2008-Oct-06 06:19:34 -0700, Unga [EMAIL PROTECTED] wrote: The FreeBSD stable comes with gcc-4.2.1 but the sources are scattered over the /usr/src, therefore, I find it difficult to re-create the gcc-4.2.1 to its original directory layout to make a patch. The original sources for gcc can be found in /usr/src/contrib/gcc - note that this is not a complete gcc 4.2.1 distribution as parts of gcc that are not relevant for FreeBSD have been deleted. Refer to the FREEBSD-* files for details. -- Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. pgpR6Xaf4xjLH.pgp Description: PGP signature