Help me to develop a FreeBSD patch for gcc-4.2.1
unga888 at yahoo.com
Tue Oct 7 09:06:04 UTC 2008
--- On Tue, 10/7/08, Peter Jeremy <peterjeremy at optushome.com.au> wrote:
> On 2008-Oct-06 06:19:34 -0700, Unga
> <unga888 at yahoo.com> 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
> 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
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
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: *** [c-format.o] Error 1
So where is the flag_format_extensions is declared in FreeBSD?
More information about the freebsd-stable