From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 18 06:50:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F97916A41A for ; Thu, 18 Oct 2007 06:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8B213C455 for ; Thu, 18 Oct 2007 06:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9I6o1Tu045905 for ; Thu, 18 Oct 2007 06:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9I6o1Ro045904; Thu, 18 Oct 2007 06:50:01 GMT (envelope-from gnats) Resent-Date: Thu, 18 Oct 2007 06:50:01 GMT Resent-Message-Id: <200710180650.l9I6o1Ro045904@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16D9116A418 for ; Thu, 18 Oct 2007 06:44:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 00EDA13C468 for ; Thu, 18 Oct 2007 06:44:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9I6hsqC008143 for ; Thu, 18 Oct 2007 06:43:54 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9I6hsCn008142; Thu, 18 Oct 2007 06:43:54 GMT (envelope-from nobody) Message-Id: <200710180643.l9I6hsCn008142@www.freebsd.org> Date: Thu, 18 Oct 2007 06:43:54 GMT From: Scot Hetzel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/117289: [patch] devel/gccxml fails to buildd on 8.0-CURRENT X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 06:50:01 -0000 >Number: 117289 >Category: ports >Synopsis: [patch] devel/gccxml fails to buildd 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:50:00 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@hp010:/usr/src/sys/amd64/compile/GENERIC.debug amd64 >Description: devel/gccxml fails to build due to GCC/gcc/config.gcc doesn't know how to build for 8.0-CURRENT, and the freebsd8.h header file is missing. >How-To-Repeat: Attempt to build the port: cd /usr/ports/devel/gccxml make build : running /bin/sh "/usr/ports/devel/gccxml/work/gccxml-0.6.0/GCC/config_cmake/gcc_platform.sh" "/usr/ports/devel/gccxml/work/gccxml-build/GCC/config_cmake/gcc_platform.cmake" "/usr/local/bin/cmake" 2>&1 Please update *-*-freebsd* in gcc/config.gcc CMake Error: Cannot find gcc_platform.cmake. -- Configuring done *** Error code 255 Stop in /usr/ports/devel/gccxml. >Fix: Apply the attached patch. Modified files: - Makefile ....- create GCC/gcc/config/freebsd.h ....- patch freebsd-spec.h so that it recognizes OSMAJOR > 6 - files/patch-GCC::gcc::config.gcc ....- add entries for FreeBSD 8 and 9. Removed file: - files/patch-GCC::gcc::config::freebsd7.h ....- patch not required due to freebsd7.h is created from the ports Makefile. Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/devel/gccxml/Makefile,v retrieving revision 1.12 diff -u -r1.12 Makefile --- Makefile 28 Aug 2007 09:33:13 -0000 1.12 +++ Makefile 17 Oct 2007 07:23:38 -0000 @@ -32,14 +32,14 @@ ${WRKSRC}/../gccxml-0.6.0/GCC/gcc/config.gcc cd ${WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} \ ${LOCALBASE}/bin/cmake ../${DISTNAME} -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \ -DGCCXML_MAN_DIR:PATH="/man" .include .if ${ARCH} == "alpha" BROKEN= Build fails on alpha -.elif ${OSVERSION} >= 700000 +.elif ${OSVERSION} >= 700042 # GCC-XML has some constructs that GCC 4.2 does not like. Namely, # the use of casted-pointer-dereferences as an lvalue to post-increment # operations. @@ -52,4 +52,16 @@ CXX=${LOCALBASE}/bin/g++34 .endif +.if ${OSVERSION} >= 700000 +OSMAJOR=${OSREL:C|^([0-9]+)\..*|\1|} +GCC_CONFIG=${PATCH_WRKSRC}/GCC/gcc/config + +post-patch: + ${SED} -e "s,MAJOR 6,MAJOR ${OSMAJOR}," \ + ${GCC_CONFIG}/freebsd6.h > ${GCC_CONFIG}/freebsd${OSMAJOR}.h + ${REINPLACE_CMD} -e "s,FBSD_MAJOR == 6,FBSD_MAJOR == ${OSMAJOR},g" \ + -e "s,__FreeBSD__=6,__FreeBSD__=${OSMAJOR},g" \ + ${GCC_CONFIG}/freebsd-spec.h +.endif + .include Index: files/patch-GCC::gcc::config.gcc =================================================================== RCS file: /home/ncvs/ports/devel/gccxml/files/patch-GCC::gcc::config.gcc,v retrieving revision 1.1 diff -u -r1.1 patch-GCC::gcc::config.gcc --- files/patch-GCC::gcc::config.gcc 14 May 2006 13:02:28 -0000 1.1 +++ files/patch-GCC::gcc::config.gcc 18 Oct 2007 06:10:14 -0000 @@ -1,10 +1,12 @@ --- GCC/gcc/config.gcc.orig Thu Jan 22 23:50:26 2004 -+++ GCC/gcc/config.gcc Sat May 13 16:27:18 2006 -@@ -475,6 +475,7 @@ ++++ GCC/gcc/config.gcc Thu Oct 18 01:00:00 2007 +@@ -475,6 +475,9 @@ *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";; *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";; *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";; + *-*-freebsd7 | *-*-freebsd[7].*) fbsd_tm_file="freebsd7.h";; ++ *-*-freebsd8 | *-*-freebsd[8].*) fbsd_tm_file="freebsd8.h";; ++ *-*-freebsd9 | *-*-freebsd[9].*) fbsd_tm_file="freebsd9.h";; *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;; esac tmake_file="t-slibgcc-elf-ver t-freebsd" Index: files/patch-GCC::gcc::config::freebsd7.h =================================================================== RCS file: files/patch-GCC::gcc::config::freebsd7.h diff -N files/patch-GCC::gcc::config::freebsd7.h --- files/patch-GCC::gcc::config::freebsd7.h 14 May 2006 13:02:28 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,25 +0,0 @@ ---- /dev/null Sat May 13 16:25:00 2006 -+++ GCC/gcc/config/freebsd7.h Sat May 13 16:28:29 2006 -@@ -0,0 +1,22 @@ -+/* FreeBSD version number setting for FreeBSD 6.x systems. -+ Copyright (C) 2001 Free Software Foundation, Inc. -+ Contributed by David E. O'Brien and BSDi. -+ -+This file is part of GNU CC. -+ -+GNU CC is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2, or (at your option) -+any later version. -+ -+GNU CC is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GNU CC; see the file COPYING. If not, write to -+the Free Software Foundation, 59 Temple Place - Suite 330, -+Boston, MA 02111-1307, USA. */ -+ -+#define FBSD_MAJOR 7 >Release-Note: >Audit-Trail: >Unformatted: