ports/117289: [patch] devel/gccxml fails to buildd on 8.0-CURRENT
Scot Hetzel
swhetzel at gmail.com
Thu Oct 18 06:50:01 UTC 2007
>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 at 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<OSMAJOR>.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 <bsd.port.pre.mk>
.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 <bsd.port.post.mk>
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 <obrien at FreeBSD.org> 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:
More information about the freebsd-ports-bugs
mailing list