ports/117287: [patch] lang/gcc34 fails to build on 8.0-CURRENT

Scot Hetzel swhetzel at gmail.com
Thu Oct 18 06:10:02 UTC 2007


>Number:         117287
>Category:       ports
>Synopsis:       [patch] lang/gcc34 fails to build on 8.0-CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 18 06:10:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Scot Hetzel
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Oct 16 00:07:03 CDT 2007     root at hp010:/usr/src/sys/amd64/compile/GENERIC.debug  amd64

>Description:
lang/gcc34 fails to build due to it is defining __FreeBSD__ twice in freebsd-spec.h.  This causes __FreeBSD__ to be set to 1.  With __FreeBSD__=1, it causes stddef.h to try to use the old machine/ansi.h, instead of sys/_types.h
>How-To-Repeat:
On a 8.0-CURRENT system try to build lang/gcc34:
cd /usr/ports/lang/gcc34
make build
:
./xgcc -B./ -B/usr/local/x86_64-portbld-freebsd8.0/bin/ -isystem /usr/local/x86_64-portbld-freebsd8.0/include -isystem /usr/local/x86_64-portbld-freebsd8.0/sys-include -L/usr/ports/lang/gcc34/work/build/gcc/../ld -O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I.././..//gcc-3.4.6/gcc -I.././..//gcc-3.4.6/gcc/. -I.././..//gcc-3.4.6/gcc/../include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
	   -c .././..//gcc-3.4.6/gcc/crtstuff.c -DCRT_BEGIN \
	  -o crtbegin.o
<built-in>:78:1: warning: "__FreeBSD__" redefined
<built-in>:77:1: warning: this is the location of the previous definition
In file included from .././..//gcc-3.4.6/gcc/tsystem.h:44,
                 from .././..//gcc-3.4.6/gcc/crtstuff.c:62:
./include/stddef.h:57:26: machine/ansi.h: No such file or directory
gmake[2]: *** [crtbegin.o] Error 1
gmake[2]: Leaving directory `/usr/ports/lang/gcc34/work/build/gcc'
gmake[1]: *** [stage1_build] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc34/work/build/gcc'
gmake: *** [bootstrap-lean] Error 2
*** Error code 2

Stop in /usr/ports/lang/gcc34.
hp010# exit

>Fix:
Place the attached patch into lang/gcc34/files.

This patch adds missing 'else' statement before the 'if (FBSD_MAJOR == 7)' test.

Patch attached with submission follows:

--- gcc/config/freebsd-spec.h.orig	2005-07-19 16:08:48.000000000 -0500
+++ gcc/config/freebsd-spec.h	2007-10-18 00:51:55.487472400 -0500
@@ -55,7 +55,7 @@
 	  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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list