Bug 117287 - [patch] lang/gcc34 fails to build on 8.0-CURRENT
Summary: [patch] lang/gcc34 fails to build on 8.0-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-18 07:10 UTC by Scot Hetzel
Modified: 2007-10-22 08:20 UTC (History)
0 users

See Also:


Attachments
file.diff (486 bytes, patch)
2007-10-18 07:10 UTC, Scot Hetzel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scot Hetzel 2007-10-18 07:10:01 UTC
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

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:
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-18 07:10:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gerald

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2007-10-22 00:20:18 UTC
State Changed
From-To: open->closed

Thanks for the report and the patch.  I have update lang/gcc34 accordingly 
and (after a round of testing on an older version of FreeBSD) committed the 
updated port.
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-10-22 08:18:08 UTC
gerald      2007-10-21 23:20:34 UTC

  FreeBSD ports repository

  Added files:
    lang/gcc34/files     patch-config-freebsd-spec.h 
  Log:
  Fix the build on FreeBSD 8.
  
  PR:             117287
  Submitted by:   Scot Hetzel <swhetzel@gmail.com>,
                  Stephane E. Potvin <sepotvin@videotron.ca>
  
  Revision  Changes    Path
  1.1       +11 -0     ports/lang/gcc34/files/patch-config-freebsd-spec.h (new)
_______________________________________________
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"