Help me to develop a FreeBSD patch for gcc-4.2.1

Unga unga888 at yahoo.com
Thu Oct 9 09:34:41 UTC 2008


--- On Wed, 10/8/08, Alexander Kabaev <kabaev at gmail.com> 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 freebsdanoncvs at anoncvs.FreeBSD.org:/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






      


More information about the freebsd-stable mailing list