From owner-freebsd-stable@FreeBSD.ORG Tue Oct 7 09:06:04 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C4831065697 for ; Tue, 7 Oct 2008 09:06:04 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57007.mail.re3.yahoo.com (web57007.mail.re3.yahoo.com [66.196.97.111]) by mx1.freebsd.org (Postfix) with SMTP id 2A90D8FC21 for ; Tue, 7 Oct 2008 09:06:04 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 2506 invoked by uid 60001); 7 Oct 2008 09:06:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=VO+R0zWtlm8VFKA4PxCsaHc1nMc5VufXtV3rlhv6DPqp1Clek15oDlRxTRqzT+75UwrvF3KiLBaDu7lu9E5dgzlrF9brdD8MqNstL+pgZH5NqOzvuv5p6pxpdEe+XBcV+jkCVWHWI9AKr+grUhbddpih3tgC7gSTv7axNxM4iiQ=; X-YMail-OSG: fm739tQVM1n.bkJVs5nJflqC48l8YdXw.8Wq3smt7qW6nUnoao3Of4bLzxMaAQFiUQ-- Received: from [220.255.7.197] by web57007.mail.re3.yahoo.com via HTTP; Tue, 07 Oct 2008 02:06:03 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Tue, 7 Oct 2008 02:06:03 -0700 (PDT) From: Unga To: Peter Jeremy In-Reply-To: <20081006180353.GF18237@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <579024.2364.qm@web57007.mail.re3.yahoo.com> Cc: freebsd-stable@freebsd.org Subject: Re: Help me to develop a FreeBSD patch for gcc-4.2.1 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: unga888@yahoo.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 09:06:04 -0000 --- On Tue, 10/7/08, Peter Jeremy wrote: > On 2008-Oct-06 06:19:34 -0700, Unga > 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