From umq@ueo.co.jp  Tue Oct 30 07:00:54 2007
Return-Path: <umq@ueo.co.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7E0BB16A419
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Oct 2007 07:00:53 +0000 (UTC)
	(envelope-from umq@ueo.co.jp)
Received: from msa2-25.plala.or.jp (msa2.plala.or.jp [58.93.251.202])
	by mx1.freebsd.org (Postfix) with ESMTP id 2A5F113C4C4
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Oct 2007 07:00:52 +0000 (UTC)
	(envelope-from umq@ueo.co.jp)
Received: from eupheme.kaumoge.org ([121.112.67.245])
          by msa2-25.plala.or.jp with ESMTP
          id <20071030070028.ZUXC23102.msa2-25.plala.or.jp@eupheme.kaumoge.org>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Tue, 30 Oct 2007 16:00:28 +0900
Received: from calliope.kaumoge.org (calliope.kaumoge.org [192.168.24.120])
	by eupheme.kaumoge.org (8.12.11/8.12.11/20030713) with ESMTP id l9U70o95006305
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Oct 2007 16:00:50 +0900 (JST)
	(envelope-from umq@ueo.co.jp)
Message-Id: <863avtm6ib.wl%umq@ueo.co.jp>
Date: Tue, 30 Oct 2007 16:00:28 +0900
From: Hirohisa Yamaguchi <umq@ueo.co.jp>
To: FreeBSD-gnats-submit@freebsd.org
Subject: lang/gcc41 does not build under CURRENT
X-Send-Pr-Version: 3.113

>Number:         117662
>Category:       ports
>Synopsis:       lang/gcc41 does not build under CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gerald
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 30 07:10:01 UTC 2007
>Closed-Date:    Thu Nov 08 12:44:46 UTC 2007
>Last-Modified:  Thu Nov  8 12:50:01 UTC 2007
>Originator:     Hirohisa Yamaguchi
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: FreeBSD calliope.****.org 8.0-CURRENT FreeBSD 8.0-CURRENT #13: Sat Oct 27 13:36:07 JST 2007 root@calliope.****.org:/usr/obj/usr/src/sys/CALLIOPE64 amd64

>Description:
	building lang/gcc41 under CURRENT fails.

# make clean build
===>  Cleaning for gcc-4.1.3_20071022
Making GCC 4.1.3 for FreeBSD 8.0  target=x86_64-portbld-freebsd8.0
===>  Extracting for gcc-4.1.3_20071022
...snip...
<built-in>: warning: "__FreeBSD__" redefined
<built-in>: warning: this is the location of the previous definition
In file included from .././..//gcc-4.1-20071022/gcc/tsystem.h:47,
                 from .././..//gcc-4.1-20071022/gcc/crtstuff.c:68:
./include/stddef.h:58:26: error: machine/ansi.h: No such file or directory
gmake[2]: *** [crtbegin.o] Error 1
gmake[2]: Leaving directory `/usr/ports/lang/gcc41/work/build/gcc'
gmake[1]: *** [stage1_build] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc41/work/build/gcc'
gmake: *** [bootstrap-lean] Error 2
*** Error code 2

Stop in /usr/ports/lang/gcc41.
*** Error code 1

Stop in /usr/ports/lang/gcc41.

>How-To-Repeat:
	under CURRENT:
	# cd ports/lang/gcc41
	# make
>Fix:

	the patch follows;

diff -Npru ports.orig/lang/gcc41/files/patch-gcc_config_freebsd-spec.h ports/lang/gcc41/files/patch-gcc_config_freebsd-spec.h
--- ports.orig/lang/gcc41/files/patch-gcc_config_freebsd-spec.h	1970-01-01 09:00:00.000000000 +0900
+++ ports/lang/gcc41/files/patch-gcc_config_freebsd-spec.h	2007-10-30 10:05:40.000000000 +0900
@@ -0,0 +1,11 @@
+--- gcc/config/freebsd-spec.h.orig	2005-07-19 22:42:12.000000000 +0900
++++ gcc/config/freebsd-spec.h	2007-10-30 09:58:58.000000000 +0900
+@@ -55,7 +55,7 @@ Boston, MA 02110-1301, USA.  */
+ 	  builtin_define ("__FreeBSD__=9");			       	\
+ 	else if (FBSD_MAJOR == 8)					\
+ 	  builtin_define ("__FreeBSD__=8");			       	\
+-	if (FBSD_MAJOR == 7)						\
++	else if (FBSD_MAJOR == 7)					\
+ 	  builtin_define ("__FreeBSD__=7");			       	\
+ 	else if (FBSD_MAJOR == 6)					\
+ 	  builtin_define ("__FreeBSD__=6");			       	\
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gerald 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Oct 30 14:26:26 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117662 
State-Changed-From-To: open->analyzed 
State-Changed-By: gerald 
State-Changed-When: Sat Nov 3 23:51:29 UTC 2007 
State-Changed-Why:  
Thanks for your report.  I agree with your fix and will try to push 
this upstream as well and then, if portmgr agrees since we are in a 
ports freeze for FreeBSD 6.3 and 7.0, will update the port next week. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117662 
State-Changed-From-To: analyzed->closed 
State-Changed-By: gerald 
State-Changed-When: Thu Nov 8 12:43:10 UTC 2007 
State-Changed-Why:  
I just updated lang/gcc41 to this Monday's snapshop of GCC which has  
the following two patches: 

2007-11-04  Hirohisa Yamaguchi  <umq@ueo.co.jp> 

* config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Fix 
broken else-if chain. 

2007-11-04  Gerald Pfeifer  <gerald@pfeifer.com> 

* config.gcc: Proactively add FreeBSD 10 and FreeBSD 11. 
* config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto. 

Thanks for your report and proposed fix! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117662 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/117662: commit references a PR
Date: Thu,  8 Nov 2007 12:41:10 +0000 (UTC)

 gerald      2007-11-08 12:40:57 UTC
 
   FreeBSD ports repository
 
   Modified files:
     lang/gcc41           Makefile distinfo 
   Log:
   Update to the 20071105 snapshot of GCC 4.1.3.  This fixes two codegen
   issues, improves some docus, and most importantly fixes the build on
   8-CURRENT.
   
   PR:             117662
   Approved by:    portmgr (linimon)
   
   Revision  Changes    Path
   1.334     +1 -1      ports/lang/gcc41/Makefile
   1.211     +15 -15    ports/lang/gcc41/distinfo
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
