Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2014 08:36:05 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r348170 - in head/lang: gcc-aux gcc-aux/files gnat_util
Message-ID:  <201403140836.s2E8a5gR076375@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Fri Mar 14 08:36:05 2014
New Revision: 348170
URL: http://svnweb.freebsd.org/changeset/ports/348170
QAT: https://qat.redports.org/buildarchive/r348170/

Log:
  lang/gcc-aux: Upgrade from gcc-4.7.3 to gcc49-20140302 snapshot
  
  GCC4.9 hasn't been released yet, but the Ada portion of it is pretty
  stable and perfectly passes ACATS and gnat.dg testsuites.  The only
  trick was to change the unwind mechanism on i386 away from KERN_PS_STRINGS
  because it will not work with 32-bit compatability mode on AMD64.  This
  is because on AMD64, the signal trampoline is located on a random area
  on a shared page rather than a fixed location before KERN_PS_STRINGS.  To
  support both true i386 and AMD64-32 compatibility mode, unwind now looks
  for frame pattern in all cases.  Apparently stack checking has been broken
  on AMD64-32 until now.
  
  It is important to get the Ada Framework in ports to be based on gcc49
  because this compiler supports the full Ada-2012 standard implementation,
  and in fact some new programs require this already.
  
  This port will stay on snapshots until 4.9.0 is released, then it will
  return to be based on releases.
  
  The Ada and C++ options have been removed.  These are now always built.
  In fact, GCC now requires C++ to build, so new bootstraps had to be
  created.  FreeBSD8 has its own bootstrap, and FreeBSD 9+ uses a pure
  static bootstrap (including GNAT tools) which should last a long time.
  Additionally a "Bootstrap" option was added, but this overrides all
  other options to create new bootstraps. It is not intended for general
  use.
  
  Most of the Ada Framework in ports has been pretested and adjusted to
  work with gcc49 out of the box, but some ports will need to be updated
  immediately, which will happen right after this one.  The update to
  lang/gnat_util had to be synchronized with lang/gcc-aux because they
  share version information and the PORTREVISION needed to be reset.

Deleted:
  head/lang/gcc-aux/files/diff-static-version
Modified:
  head/lang/gcc-aux/Makefile
  head/lang/gcc-aux/Makefile.common
  head/lang/gcc-aux/Makefile.version
  head/lang/gcc-aux/distinfo
  head/lang/gcc-aux/files/diff-ada
  head/lang/gcc-aux/files/diff-ada-testsuite
  head/lang/gcc-aux/files/diff-core
  head/lang/gcc-aux/files/diff-cxx
  head/lang/gcc-aux/files/diff-cxx-testsuite
  head/lang/gcc-aux/files/diff-fortran
  head/lang/gcc-aux/files/diff-gcc-testsuite
  head/lang/gcc-aux/pkg-descr
  head/lang/gnat_util/Makefile

Modified: head/lang/gcc-aux/Makefile
==============================================================================
--- head/lang/gcc-aux/Makefile	Fri Mar 14 08:36:03 2014	(r348169)
+++ head/lang/gcc-aux/Makefile	Fri Mar 14 08:36:05 2014	(r348170)
@@ -3,12 +3,11 @@
 
 PORTNAME=	gcc-aux
 PORTVERSION=	${SNAPSHOT}
-PORTREVISION=	4
 CATEGORIES=	lang
 MASTER_SITES=	http://downloads.dragonlace.net/src/:boot \
-		${MASTER_SITE_GCC}
-MASTER_SITE_SUBDIR=	releases/gcc-${GCC_VERSION}
-DISTFILES=	gcc-${GCC_VERSION}.tar.bz2
+		LOCAL/marino:boot ${MASTER_SITE_GCC}
+MASTER_SITE_SUBDIR= ${MS_SUBDIR}
+DISTFILES=	${IDENTIFICATION}.tar.bz2
 
 MAINTAINER=	marino@FreeBSD.org
 COMMENT=	Version of GCC ${GCC_BRANCH} with full Ada support
@@ -18,64 +17,54 @@ LICENSE_COMB=	multi
 
 .include "${.CURDIR}/Makefile.common"
 
-LANGS=			c
-APPLY_DIFFS=		core
+LANGS=			c c++ ada
+APPLY_DIFFS=		core cxx ada
 INTENDED_COMPILER=	NATIVE
-BOOTSTRAP_COMPILER=	NOT_REQUIRED
-BOOTSTRAP_TRIPLET=	NOT_SET
-FULL_GNATGCC=		NOT_SET
-OS_LABEL4VERS=		[${OPSYS}]
 GARCH=			${ARCH:S/amd64/x86_64/}
-NO_LICENSES_INSTALL=	yes
-NO_MTREE=		yes
+BOOTSTRAP_COMPILER=	gnat-bootstrap.${GARCH}.${OPSYS:L}.tar.bz2
+BLD_TARGET=		${GARCH}-aux-${OPSYS:L}${OSREL}
+FULL_GNATGCC=		NOT_SET
+OS_LABEL4VERS=		[${OPSYS}${GARCH:M*64:S/amd_//:S/x86_//}]
 
-OPTIONS_DEFINE=	ADA CXX FORT OBJC STATIC TESTSUITE NLS
-OPTIONS_DEFAULT=	ADA CXX FORT OBJC
+OPTIONS_GROUP=		Standard Bootstrap
+OPTIONS_GROUP_Standard= FORT OBJC NLS TESTSUITE STATIC
+OPTIONS_GROUP_Bootstrap=BOOTSTRAP
+OPTIONS_DEFAULT=	FORT OBJC
 NO_OPTIONS_SORT=	yes
 
-ADA_DESC=		Build Ada language
-CXX_DESC=		Build C++ language
-FORT_DESC=		Build Fortran language
-OBJC_DESC=		Build Objective-C language
-STATIC_DESC=		Build with no shared libraries other than libc
+FORT_DESC=		Fortran language support
+OBJC_DESC=		Objective-C language support
 TESTSUITE_DESC=		Activate test support
+STATIC_DESC=		Link compilers and drivers statically
+BOOTSTRAP_DESC=		Create bootstrap compiler (overrides other options)
+
+# The BOOTSTRAP option overrides all the others.  "make stage" will build a 
+# static compiler that supports C, C++, and Ada languages and then create
+# a new distfile in $WRKDIR/newbsd with the name following the pattern:
+# ada-bootstrap.$ARCH.$OPSYS.XY.tar.bz2.  There is no need to "make install"
 
 .include <bsd.port.options.mk>
 
 .if ${OPSYS} == FreeBSD
 .  if ${OSVERSION} < 900000
-USE_BINUTILS=		yes
-EXTRA_CONFIG+=		--with-as=${LOCALBASE}/bin/as
-EXTRA_CONFIG+=		--with-ld=${LOCALBASE}/bin/ld
-RUN_DEPENDS+=		${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
-.  endif
-.  if ${GARCH} == x86_64
-OS_LABEL4VERS=		[FreeBSD64]
-BOOTSTRAP_TRIPLET=	x86_64-bootstrap-freebsd8.1/4.6.0
+BOOTSTRAP_COMPILER=	ada-bootstrap.${GARCH}.freebsd.84.tar.bz2
 .  else
-BOOTSTRAP_TRIPLET=	i386-bootstrap-freebsd8.0/4.6.0
+BOOTSTRAP_COMPILER=	ada-bootstrap.${GARCH}.freebsd.100B.tar.bz2
 .  endif
 .endif
 .if ${OPSYS} == DragonFly
-.  if ${GARCH} == x86_64
-OS_LABEL4VERS=		[DragonFly64]
-BOOTSTRAP_TRIPLET=	x86_64-bootstrap-dragonfly2.8/4.6.0
-.  else
-BOOTSTRAP_TRIPLET=	i386-bootstrap-dragonfly2.8/4.6.0
-.  endif
+BOOTSTRAP_COMPILER=	ada-bootstrap.${GARCH}.dragonfly.36A.tar.bz2
 .endif
-BLD_TARGET=		${GARCH}-aux-${OPSYS:L}${OSREL}
-BOOTSTRAP_COMPILER=	gnat-bootstrap.${GARCH}.${OPSYS:L}.tar.bz2
 
-WRKSRC=			${WRKDIR}/gcc-${GCC_VERSION}
+WRKSRC=			${WRKDIR}/${IDENTIFICATION}
 BUILDDIR=		${WRKDIR}/build
+NEWBSDIR=		${WRKDIR}/newbs/bootstrap
 CFG_SCRIPT=		${WRKSRC}/configure
 REVFILE=		${WRKSRC}/gcc/REVISION
 BOOTSTRAP_PREFIX=	${WRKDIR}/bootstrap
 PKG_PREFIX=		${PREFIX}/${PORTNAME}
-STICONV=		${PREFIX}/lib/libiconv.a
-STINTL=			\$${top_builddir}/../intl/libintl.a
-AWKMANPAGE=		'{if ($$0 ~ /^man\/man[1-9]\/.+[1-9]$$/) print $$0 ".gz"; else print $$0}'
+MANPREFIX=		${PREFIX}/${PORTNAME}/share
+BSFILENAME=		ada-bootstrap.${GARCH}.${OPSYS:L}.${OSREL:S/.//}.tar.bz2
 
 # If we find gnatmake and friends in a standard location, then we'll use this
 # compiler instead of downloading the bootstrap.
@@ -84,6 +73,7 @@ AWKMANPAGE=		'{if ($$0 ~ /^man\/man[1-9]
 .if exists (${LOCALBASE}/${PORTNAME}/bin/gnatlink)
 .if exists (${LOCALBASE}/${PORTNAME}/bin/gnatmake)
 FULL_GNATGCC=${LOCALBASE}/${PORTNAME}/bin/ada
+FULL_GNATGXX=${LOCALBASE}/${PORTNAME}/bin/g++
 FULL_PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/${PORTNAME}/bin:${PREFIX}/bin
 .endif
 .endif
@@ -93,46 +83,25 @@ FULL_PATH=/sbin:/bin:/usr/sbin:/usr/bin:
 # If FULL_GNATGCC is not set, we'll request the bootstrap compiler
 .if ${FULL_GNATGCC} == NOT_SET
 INTENDED_COMPILER=BOOTSTRAP
-FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gnatgcc
+FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gcc
+FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++
 FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/bin
 DISTFILES+=	${BOOTSTRAP_COMPILER}:boot
-.if ${OPSYS} == DragonFly && ${DFLYVERSION} > 300500
-BUILD_DEPENDS+=	${LOCALBASE}/lib/compat/libc.so.7:${PORTSDIR}/misc/compat34x
-.endif
 .endif
 
 # for port maintenance, invoke "make makesum PLUS_BOOTSTRAPS=1"
 .if defined(PLUS_BOOTSTRAPS)
-DISTFILES=gcc-${GCC_VERSION}.tar.bz2 \
-   gnat-bootstrap.i386.dragonfly.tar.bz2:boot \
-   gnat-bootstrap.x86_64.dragonfly.tar.bz2:boot \
-   gnat-bootstrap.i386.freebsd.tar.bz2:boot \
-   gnat-bootstrap.x86_64.freebsd.tar.bz2:boot
-.endif
-
-###########
-##  Ada  ##
-###########
-
-.if ${PORT_OPTIONS:MADA}
-LANGS+=		ada
-APPLY_DIFFS+=	ada
-.endif
-
-###########
-##  C++  ##
-###########
-
-.if ${PORT_OPTIONS:MCXX}
-LANGS+=		c++
-APPLY_DIFFS+=	cxx
+DISTFILES= \
+   ${IDENTIFICATION}.tar.bz2 \
+   ada-bootstrap.i386.dragonfly.36A.tar.bz2:boot \
+   ada-bootstrap.i386.freebsd.84.tar.bz2:boot \
+   ada-bootstrap.i386.freebsd.100B.tar.bz2:boot \
+   ada-bootstrap.x86_64.dragonfly.36A.tar.bz2:boot \
+   ada-bootstrap.x86_64.freebsd.84.tar.bz2:boot \
+   ada-bootstrap.x86_64.freebsd.100B.tar.bz2:boot
 .endif
 
-###############
-##  Fortran  ##
-###############
-
-.if ${PORT_OPTIONS:MFORT}
+.if ${PORT_OPTIONS:MFORT} && !${PORT_OPTIONS:MBOOTSTRAP}
 LANGS+=		fortran
 APPLY_DIFFS+=	fortran
 EXTRA_CONFIG+=	--enable-libquadmath
@@ -140,19 +109,11 @@ EXTRA_CONFIG+=	--enable-libquadmath
 EXTRA_CONFIG+=	--disable-libquadmath
 .endif
 
-###################
-##  Objective-C  ##
-###################
-
-.if ${PORT_OPTIONS:MOBJC}
+.if ${PORT_OPTIONS:MOBJC} && !${PORT_OPTIONS:MBOOTSTRAP}
 LANGS+=		objc
 .endif
 
-#########################
-##  Testsuite Support  ##
-#########################
-
-.if ${PORT_OPTIONS:MTESTSUITE}
+.if ${PORT_OPTIONS:MTESTSUITE} && !${PORT_OPTIONS:MBOOTSTRAP}
 BUILD_DEPENDS+=	dejagnu>=1.4:${PORTSDIR}/misc/dejagnu
 APPLY_DIFFS+=	ada-testsuite
 APPLY_DIFFS+=	fortran-testsuite
@@ -160,28 +121,29 @@ APPLY_DIFFS+=	cxx-testsuite
 APPLY_DIFFS+=	gcc-testsuite
 .endif
 
-#################################
-##  NATIONAL LANGUAGE SUPPORT  ##
-#################################
-
-.if ${PORT_OPTIONS:MNLS}
+.if ${PORT_OPTIONS:MNLS} && !${PORT_OPTIONS:MBOOTSTRAP}
 USES+=	gettext:build
 EXTRA_CONFIG+=	--enable-nls
 .else
 EXTRA_CONFIG+=	--disable-nls
 .endif
 
-###############################
-##  STATICALLY BUILT OPTION  ##
-###############################
-#
-# The "static" option is handled in the post-extract phase.
+.if ${PORT_OPTIONS:MSTATIC} && !${PORT_OPTIONS:MBOOTSTRAP}
+EXTRA_CONFIG+=		--with-stage1-ldflags=-static
+.endif
+
+.if ${PORT_OPTIONS:MBOOTSTRAP}
+EXTRA_CONFIG+=		--disable-shared --disable-lto
+EXTRA_CONFIG+=		--with-boot-ldflags=-static
+.else
+EXTRA_CONFIG+=		--disable-bootstrap
+.endif
 
 # Establish Ada-aware compiler for use
-ADA_CONFIGURE_ENV=	CC=${FULL_GNATGCC}
+ADA_CONFIGURE_ENV+=	CC=${FULL_GNATGCC}
+ADA_CONFIGURE_ENV+=	CXX=${FULL_GNATGXX}
 ADA_CONFIGURE_ENV+=	PATH=${FULL_PATH}
-ADA_MAKE_ENV=		PATH=${FULL_PATH}
-ADA_MAKE_ENV+=		ICONVPREFIX=${PREFIX}
+ADA_MAKE_ENV+=		PATH=${FULL_PATH}
 ADA_MAKE_ENV+=		LD_LIBRARY_PATH=${BUILDDIR}/gcc
 
 # The standard configuration options
@@ -195,7 +157,6 @@ ADA_CONFIG_ARGS+=	--with-mpc=${PREFIX}
 ADA_CONFIG_ARGS+=	${ICONV_CONFIGURE_ARG}
 ADA_CONFIG_ARGS+=	--enable-shared
 ADA_CONFIG_ARGS+=	--enable-threads=posix
-ADA_CONFIG_ARGS+=	--disable-bootstrap
 ADA_CONFIG_ARGS+=	--disable-libmudflap
 ADA_CONFIG_ARGS+=	--disable-libgomp
 ADA_CONFIG_ARGS+=	--disable-libssp
@@ -204,19 +165,26 @@ ADA_CONFIG_ARGS+=	${EXTRA_CONFIG}
 post-extract:
 	# Personalize GNAT for each different machine
 	@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE}
-
 	# Create new directories in preparation of applying diff files
-.if ${PORT_OPTIONS:MCXX}
 	${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly
 	${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly
-.endif
-
 	# Apply required composite diff files
 .for suffix in ${APPLY_DIFFS}
 	@${ECHO} "Applying composite patch diff-${suffix}"
 	@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix}
 .endfor
-
+.if ${PORT_OPTIONS:MSTATIC} || ${PORT_OPTIONS:MBOOTSTRAP}
+	# Ensure GNAT tools are built statically
+	${REINPLACE_CMD} -e 's/^GCC_LINK_FLAGS=.*/GCC_LINK_FLAGS=-static/' \
+	  ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
+.endif
+.if ${PORT_OPTIONS:MBOOTSTRAP} && ${OPSYS} == FreeBSD
+	# FreeBSD 8 linker doesn't understand --hash-style, so do not
+	# allow the bootstrap to use it.
+	${REINPLACE_CMD} -e 's|" ELF_HASH_STYLE "||' \
+	  ${WRKSRC}/gcc/config/i386/freebsd64.h \
+	  ${WRKSRC}/gcc/config/i386/freebsd.h
+.endif
 	# Update LINK_SPEC to add gcc-aux lib runpath in every binary
 	@${ECHO} "Configuring LINK_SPEC runpath"
 	@${REINPLACE_CMD} -e 's;\@PREFIX\@;${PREFIX};' \
@@ -224,82 +192,69 @@ post-extract:
 	  ${WRKSRC}/gcc/config/i386/freebsd64.h \
 	  ${WRKSRC}/gcc/config/i386/freebsd.h
 
-.if ${PORT_OPTIONS:MSTATIC}
-	@${ECHO} "Reconfiguring GCC Makefile to build compiler statically"
-	@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-static-version
-.if ${PORT_OPTIONS:MNLS}
-	@${REINPLACE_CMD} -e 's;\@LIBINTL\@;${STINTL} ${STICONV};' \
-	  ${WRKSRC}/intl/config.intl.in
-	@${REINPLACE_CMD} -e 's;\@LIBICONV\@;;' \
-	  ${WRKSRC}/gcc/Makefile.in \
-	  ${WRKSRC}/libcpp/Makefile.in \
-	  ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
-.else
-	@${REINPLACE_CMD} -e 's;\@LIBICONV\@;${STICONV};' \
-	  ${WRKSRC}/gcc/Makefile.in \
-	  ${WRKSRC}/libcpp/Makefile.in \
-	  ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
-.endif
-.endif
-
-.if ${INTENDED_COMPILER} == BOOTSTRAP
-	${MKDIR} ${BOOTSTRAP_PREFIX}
-	${MV} ${BOOTSTRAP_PREFIX}/../bin ${BOOTSTRAP_PREFIX}
-	${MV} ${BOOTSTRAP_PREFIX}/../lib ${BOOTSTRAP_PREFIX}
-	${MV} ${BOOTSTRAP_PREFIX}/../libexec ${BOOTSTRAP_PREFIX}
-
-	# Bootstrap compiler has statically linked z, gmp, mpc, mpfr and iconv
-	# The only shared lib is libc.so.7, so it should work for a long time.
-
-	${RM} -rf ${BOOTSTRAP_PREFIX}/lib/gcc/${BOOTSTRAP_TRIPLET}/include-fixed
-.endif
-
 do-configure:
 	${MKDIR} ${BUILDDIR}
 	cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \
-	${CFG_SCRIPT} ${ADA_CONFIG_ARGS}
+		${CFG_SCRIPT} ${ADA_CONFIG_ARGS}
 
 do-build:
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -j${MAKE_JOBS_NUMBER} all
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -j${MAKE_JOBS_NUMBER} ${MAKE_ARGS} all
 
+.if ${PORT_OPTIONS:MTESTSUITE} && !${PORT_OPTIONS:MBOOTSTRAP}
 test: build test-ada test-fortran test-objc test-cxx test-c
 
 test-ada:
-.if ${PORT_OPTIONS:MADA} && ${PORT_OPTIONS:MTESTSUITE}
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-ada
-.endif
-
-test-fortran:
-.if ${PORT_OPTIONS:MFORT} && ${PORT_OPTIONS:MTESTSUITE}
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-fortran
-.endif
-
-test-objc:
-.if ${PORT_OPTIONS:MOBJC} && ${PORT_OPTIONS:MTESTSUITE}
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-objc
-.endif
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-ada
 
 test-cxx:
-.if ${PORT_OPTIONS:MCXX} && ${PORT_OPTIONS:MTESTSUITE}
-	# libstdc++ testsuite will break every time, TRUE used to force continuation
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-c++ || true
-.endif
+	# libstdc++ testsuite will break every time, for TRUE to continue
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-c++ || true
 
 test-c:
-.if ${PORT_OPTIONS:MTESTSUITE}
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-c
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-c
+
+test-fortran:
+.  if ${PORT_OPTIONS:MFORT}
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-fortran
+.  endif
+
+test-objc:
+.  if ${PORT_OPTIONS:MOBJC}
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-objc
+.  endif
 .endif
 
 do-install:
-	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} install-strip DESTDIR=${STAGEDIR}
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} install-strip ${MAKE_ARGS}
+	${RM} -rf ${STAGEDIR}${PKG_PREFIX}/share/info
 
 post-install:
-	${MV} ${STAGEDIR}${PKG_PREFIX}/share/man ${STAGEDIR}/${PKG_PREFIX}
 	cd ${STAGEDIR}${PKG_PREFIX}; ${FIND} * -type d -empty | \
 	   ${SORT} -dr | ${XARGS} ${RMDIR}
-	cd ${STAGEDIR}${PREFIX}; ${FIND} ${PORTNAME} \( -type f -or -type l \) | \
-	   ${AWK} ${AWKMANPAGE} | ${SORT} >> ${TMPPLIST}
+	cd ${STAGEDIR}${PREFIX}; \
+	   ${FIND} ${PORTNAME} \( -type f -or -type l \) | \
+	   ${SORT} | ${SED} -e 's/\/man\/man[1578]\/.*[1578]$$/&.gz/' \
+	    >> ${TMPPLIST}
 	cd ${STAGEDIR}${PREFIX}; ${FIND} ${PORTNAME} -type d | ${SORT} -r | \
-	   ${SED} -E -e 's/^/@dirrm /g' >> ${TMPPLIST}
+	   ${SED} -e '/^share/d' -e 's/^/@dirrm /g' >> ${TMPPLIST}
+
+.if ${PORT_OPTIONS:MBOOTSTRAP}
+post-stage:
+	${MKDIR} ${NEWBSDIR}
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/bin ${NEWBSDIR}/
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/lib ${NEWBSDIR}/
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/include ${NEWBSDIR}/
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/libexec ${NEWBSDIR}/
+	${RM} ${NEWBSDIR}/bin/${GARCH}*
+	${RM} -rf ${NEWBSDIR}/lib/gcc/${BLD_TARGET}/${GCC_VERSION}/include-fixed
+	(cd ${NEWBSDIR}/.. ; ${TAR} -cyf ${BSFILENAME} bootstrap)
+.endif
 
 .include <bsd.port.mk>

Modified: head/lang/gcc-aux/Makefile.common
==============================================================================
--- head/lang/gcc-aux/Makefile.common	Fri Mar 14 08:36:03 2014	(r348169)
+++ head/lang/gcc-aux/Makefile.common	Fri Mar 14 08:36:05 2014	(r348170)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.include "Makefile.version"
+.include "${.CURDIR}/Makefile.version"
 
 LIB_DEPENDS=		libgmp.so:${PORTSDIR}/math/gmp
 LIB_DEPENDS+=		libmpfr.so:${PORTSDIR}/math/mpfr

Modified: head/lang/gcc-aux/Makefile.version
==============================================================================
--- head/lang/gcc-aux/Makefile.version	Fri Mar 14 08:36:03 2014	(r348169)
+++ head/lang/gcc-aux/Makefile.version	Fri Mar 14 08:36:05 2014	(r348170)
@@ -1,6 +1,12 @@
 # $FreeBSD$
 
-GCC_BRANCH=		4.7
-GCC_POINT=		3
+GCC_BRANCH=		4.9
+GCC_POINT=		0
 GCC_VERSION=		${GCC_BRANCH}.${GCC_POINT}
-SNAPSHOT=		20130411
+SNAPSHOT=		20140302
+IDENTIFICATION=		gcc-${GCC_BRANCH}-${SNAPSHOT}
+MS_SUBDIR=		snapshots/${GCC_BRANCH}-${SNAPSHOT}
+
+# Release naming pattern
+#IDENTIFICATION=	gcc-${GCC_BRANCH}
+#MS_SUBDIR=		releases/gcc-${GCC_BRANCH}

Modified: head/lang/gcc-aux/distinfo
==============================================================================
--- head/lang/gcc-aux/distinfo	Fri Mar 14 08:36:03 2014	(r348169)
+++ head/lang/gcc-aux/distinfo	Fri Mar 14 08:36:05 2014	(r348170)
@@ -1,10 +1,14 @@
-SHA256 (gcc-4.7.3.tar.bz2) = 2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
-SIZE (gcc-4.7.3.tar.bz2) = 82904224
-SHA256 (gnat-bootstrap.i386.dragonfly.tar.bz2) = 9148952791231e7d302238b690b183af72867b19ecac8ac482f035c06583cb0c
-SIZE (gnat-bootstrap.i386.dragonfly.tar.bz2) = 28205489
-SHA256 (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = ccd361f3fa15fad38ea68530b120517f0049767d6b98cf02898d5adf9ef2b23e
-SIZE (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 31380342
-SHA256 (gnat-bootstrap.i386.freebsd.tar.bz2) = c38e1c960f651c3f248c1ef540b1df724058fa71c1d046af93ce975483abb645
-SIZE (gnat-bootstrap.i386.freebsd.tar.bz2) = 27973176
-SHA256 (gnat-bootstrap.x86_64.freebsd.tar.bz2) = c4abd6af1281785d47d99352e28e41b2a1455e25ff347eca0de5791cdede9ed8
-SIZE (gnat-bootstrap.x86_64.freebsd.tar.bz2) = 31565201
+SHA256 (gcc-4.9-20140302.tar.bz2) = 78838c2e96460326f2d39855afeae4f1473ac4280bdf513c239841bced24d149
+SIZE (gcc-4.9-20140302.tar.bz2) = 85100991
+SHA256 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 6b1a6ff0fe0e3bf13c667db2fef177b811329cd998400a1303969a86911cb1c8
+SIZE (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 39357314
+SHA256 (ada-bootstrap.i386.freebsd.84.tar.bz2) = b410336cb0e71c8a29dd5f831a17b4b7282e7d590f452475a94c6a625cfc8846
+SIZE (ada-bootstrap.i386.freebsd.84.tar.bz2) = 39727003
+SHA256 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 7231209f2600275f554f788ad1d036cf633c4339ebd25bd479a5bb1ddcddedf3
+SIZE (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 41229192
+SHA256 (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = ba9b193f1f5c780c0e94086a9af6f1c8e843b6782c133b9948789b95b2e605c4
+SIZE (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = 40747242
+SHA256 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = ba1a407d936e7b3f2bfe825d1fb5a1f0e85e8edbdd9e8440bb49ef643fec05fc
+SIZE (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = 40227668
+SHA256 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 1066d7c5e71d78b4416de3b73348227678ca07db52488409e270db7b00467f55
+SIZE (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 42163803

Modified: head/lang/gcc-aux/files/diff-ada
==============================================================================
--- head/lang/gcc-aux/files/diff-ada	Fri Mar 14 08:36:03 2014	(r348169)
+++ head/lang/gcc-aux/files/diff-ada	Fri Mar 14 08:36:05 2014	(r348170)
@@ -1,6 +1,6 @@
 --- gcc/ada/a-exetim-posix.adb.orig
 +++ gcc/ada/a-exetim-posix.adb
-@@ -106,11 +106,11 @@
+@@ -105,11 +105,11 @@
        --  Time is equal to Duration (although it is a private type) and
        --  CPU_Time is equal to Time.
  
@@ -14,7 +14,7 @@
        --  Function from the POSIX.1b Realtime Extensions library
  
     begin
-@@ -118,7 +118,7 @@
+@@ -117,7 +117,7 @@
           raise Program_Error;
        end if;
  
@@ -445,7 +445,7 @@
 +end Ada.Interrupts.Names;
 --- gcc/ada/adaint.c.orig
 +++ gcc/ada/adaint.c
-@@ -1077,6 +1077,7 @@
+@@ -1144,6 +1144,7 @@
    strcpy (path, "GNAT-XXXXXX");
  
  #if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \
@@ -453,7 +453,7 @@
    || defined (linux) || defined(__GLIBC__)) && !defined (__vxworks)
    return mkstemp (path);
  #elif defined (__Lynx__)
-@@ -1227,7 +1228,49 @@
+@@ -1310,7 +1311,49 @@
      free (pname);
    }
  
@@ -503,16 +503,18 @@
    || defined (__OpenBSD__) || defined(__GLIBC__)
  #define MAX_SAFE_PATH 1000
    char *tmpdir = getenv ("TMPDIR");
-@@ -2468,6 +2511,8 @@
+@@ -2562,7 +2605,9 @@
+ {
    int cores = 1;
  
- #if defined (linux) || defined (sun) || defined (AIX) \
-+    || defined (__FreeBSD__) || defined (__DragonFly__) \
-+    || defined (__OpenBSD__) || defined (__NetBSD__) \
-     || (defined (__alpha__)  && defined (_osf_)) || defined (__APPLE__)
+-#if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__)
++#if defined (linux) || defined (sun) || defined (AIX) \
++ || defined (__APPLE__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
++ || defined (__DragonFly__) || defined (__NetBSD__)
    cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
  
-@@ -3530,37 +3575,6 @@
+ #elif defined (__hpux__)
+@@ -3608,35 +3653,6 @@
  }
  #endif
  
@@ -527,10 +529,8 @@
 -      && ! defined (__hpux__) \
 -      && ! defined (__APPLE__) \
 -      && ! defined (_AIX) \
--      && ! (defined (__alpha__)  && defined (__osf__)) \
 -      && ! defined (VMS) \
--      && ! defined (__MINGW32__) \
--      && ! (defined (__mips) && defined (__sgi)))
+-      && ! defined (__MINGW32__))
 -
 -/* Dummy function to satisfy g-trasym.o. See the preprocessor conditional
 -   just above for a list of native platforms that provide a non-dummy
@@ -550,50 +550,9 @@
  #if defined (_WIN32)
  int __gnat_argument_needs_quote = 1;
  #else
-@@ -3864,6 +3878,17 @@
-   CPU_SET (cpu - 1, set);
- }
- #endif
-+
-+#ifdef __ANDROID__
-+/* No-op, Android doesn't support pthread_rwlockattr_setkind_np, but we want
-+   to use the s-taprop-linux.ads without modification */
-+int __gnat_set_threadlock_kind (pthread_rwlockattr_t *attr ATTRIBUTE_UNUSED,
-+    int pref ATTRIBUTE_UNUSED)
-+{
-+  return 0;
-+}
-+#endif
-+
- #endif
- 
- #ifdef __cplusplus
---- gcc/ada/adaint.h.orig
-+++ gcc/ada/adaint.h
-@@ -257,6 +257,20 @@
- 
- #include <sched.h>
- 
-+#ifdef __ANDROID__
-+struct pthread_rwlockattr;
-+typedef struct	pthread_rwlockattr	*pthread_rwlockattr_t;
-+typedef struct {
-+	unsigned long int  __bits[ 1 ];
-+} cpu_set_t;
-+#  define __CPU_MASK(x)		((unsigned long int)1 << ((x) & 31))
-+#  define CPU_ZERO(set_)	do { (set_)->__bits[0] = 0; } while(0)
-+#  define CPU_SET(cpu_,set_) \
-+	do { size_t __cpu = (cpu_); \
-+	if (__cpu < 32) (set_)->__bits[0] |= __CPU_MASK(__cpu); } while (0)
-+int __gnat_set_threadlock_kind (pthread_rwlockattr_t *, int);
-+#endif
-+
- extern cpu_set_t *__gnat_cpu_alloc                 (size_t);
- extern size_t __gnat_cpu_alloc_size                (size_t);
- extern void   __gnat_cpu_free                  (cpu_set_t *);
 --- gcc/ada/cio.c.orig
 +++ gcc/ada/cio.c
-@@ -46,7 +46,8 @@
+@@ -49,7 +49,8 @@
  
  /* Don't use macros on GNU/Linux since they cause incompatible changes between
     glibc 2.0 and 2.1 */
@@ -617,21 +576,20 @@
  
  #ifdef stderr
  #  undef stderr
-@@ -187,7 +188,10 @@
+@@ -187,7 +188,9 @@
  	  *p = '\\';
      }
  
--#elif defined (sgi) || defined (__FreeBSD__)
-+#elif defined (sgi) \
-+  || defined (__FreeBSD__) \
-+  || defined (__DragonFly__) \
-+  || defined (__OpenBSD__)
+-#elif defined (__FreeBSD__)
++#elif defined (__FreeBSD__) \
++   || defined (__DragonFly__) \
++   || defined (__OpenBSD__)
  
    /* Use realpath function which resolves links and references to . and ..
       on those Unix systems that support it. Note that GNU/Linux provides it but
 --- gcc/ada/env.c.orig
 +++ gcc/ada/env.c
-@@ -188,7 +188,9 @@
+@@ -180,7 +180,9 @@
        LIB$SIGNAL (status);
    }
  
@@ -642,7 +600,7 @@
    setenv (name, value, 1);
  
  #else
-@@ -310,6 +312,7 @@
+@@ -301,6 +303,7 @@
    }
  #elif defined (__MINGW32__) || defined (__FreeBSD__) || defined (__APPLE__) \
     || (defined (__vxworks) && defined (__RTP__)) || defined (__CYGWIN__) \
@@ -650,48 +608,9 @@
     || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__rtems__)
    /* On Windows, FreeBSD and MacOS there is no function to clean all the
       environment but there is a "clean" way to unset a variable. So go
---- gcc/ada/errno.c.orig
-+++ gcc/ada/errno.c
-@@ -39,6 +39,7 @@
- #define _REENTRANT
- #define _THREAD_SAFE
- #define _SGI_MP_SOURCE
-+#define GNAT_SET_ERRNO
- 
- #ifdef MaRTE
- 
-@@ -52,6 +53,17 @@
- 
- #endif
- 
-+#ifdef __ANDROID__
-+
-+/* The ANDROID errno.h file also defines __set_errno as an external variable
-+   for use with syscalls.  It should not be referenced directly, but we are
-+   going to do it anyway because the alternative solution is to rename all 
-+   uses of __set_errno in GNAT. */
-+
-+#undef GNAT_SET_ERRNO   
-+#endif
-+
-+
- #include <errno.h>
- int
- __get_errno(void)
-@@ -59,8 +71,10 @@
-   return errno;
- }
- 
-+#ifdef GNAT_SET_ERRNO
- void
- __set_errno(int err)
- {
-   errno = err;
- }
-+#endif
 --- gcc/ada/g-comlin.adb.orig
 +++ gcc/ada/g-comlin.adb
-@@ -514,6 +514,7 @@
+@@ -525,6 +525,7 @@
     begin
        Index_In_Switches := 0;
        Switch_Length     := 0;
@@ -701,7 +620,7 @@
        --  at the start of the first switch.
 --- gcc/ada/g-expect.adb.orig
 +++ gcc/ada/g-expect.adb
-@@ -1332,15 +1332,20 @@
+@@ -1335,15 +1335,20 @@
  
        --  The following commands are not executed on Unix systems, and are only
        --  required for Windows systems. We are now in the parent process.
@@ -731,7 +650,7 @@
     ---------------------------
 --- /dev/null
 +++ gcc/ada/g-socthi-bsd.adb
-@@ -0,0 +1,376 @@
+@@ -0,0 +1,356 @@
 +------------------------------------------------------------------------------
 +--                                                                          --
 +--                         GNAT COMPILER COMPONENTS                         --
@@ -740,7 +659,7 @@
 +--                                                                          --
 +--                                 B o d y                                  --
 +--                                                                          --
-+--                     Copyright (C) 2001-2010, AdaCore                     --
++--                     Copyright (C) 2001-2013, AdaCore                     --
 +--                                                                          --
 +-- GNAT is free software;  you can  redistribute it  and/or modify it under --
 +-- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -778,9 +697,6 @@
 +
 +package body GNAT.Sockets.Thin is
 +
-+   Unknown_System_Error : constant C.Strings.chars_ptr :=
-+                            C.Strings.New_String ("Unknown system error");
-+
 +   function Syscall_Accept
 +     (S       : C.int;
 +      Addr    : System.Address;
@@ -895,12 +811,11 @@
 +      Addr    : System.Address;
 +      Addrlen : not null access C.int) return C.int
 +   is
-+      Res : constant C.int := Syscall_Accept (S, Addr, Addrlen);
++      R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
 +   begin
 +
-+      Disable_SIGPIPE (Res);
-+      return Res;
-+
++      Disable_SIGPIPE (R);
++      return R;
 +   end C_Accept;
 +
 +   ---------------
@@ -913,9 +828,7 @@
 +      Namelen : C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Connect (S, Name, Namelen);
-+
 +   end C_Connect;
 +
 +   ------------------
@@ -924,29 +837,29 @@
 +
 +   function Socket_Ioctl
 +     (S   : C.int;
-+      Req : C.int;
++      Req : SOSC.IOCTL_Req_T;
 +      Arg : access C.int) return C.int
 +   is
-+      --  Currently all requests are of the FIONBIO type, so always calc flags
-+      use Interfaces;
-+      flags    : constant Unsigned_32 :=
-+                          Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
-+      nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.FNDELAY);
-+      enabled  : constant Boolean := Arg.all = 1;
-+      newval   : C.int;
 +   begin
 +      if Req = SOSC.FIONBIO then
-+         if enabled then
-+            newval := C.int (flags or nonblock);
-+         elsif (flags and nonblock) > 0 then
-+            newval := C.int (flags - nonblock);
-+         else
-+            newval := C.int (flags);
-+         end if;
-+         return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
-+      else
-+         return C_Ioctl (Fd => S, Req => Req, Arg => Arg);
++         declare
++            use Interfaces;
++            flags    : constant Unsigned_32 :=
++                                Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
++            nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.FNDELAY);
++            enabled  : constant Boolean := Arg.all = 1;
++            newval   : C.int := C.int (flags);
++         begin
++            if enabled then
++               newval := C.int (flags or nonblock);
++            elsif (flags and nonblock) > 0 then
++               newval := C.int (flags - nonblock);
++            end if;
++            return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
++         end;
 +      end if;
++
++      return C_Ioctl (S, Req, Arg);
 +   end Socket_Ioctl;
 +
 +   ------------
@@ -960,9 +873,7 @@
 +      Flags : C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Recv (S, Msg, Len, Flags);
-+
 +   end C_Recv;
 +
 +   ----------------
@@ -978,9 +889,7 @@
 +      Fromlen : not null access C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
-+
 +   end C_Recvfrom;
 +
 +   ---------------
@@ -993,9 +902,7 @@
 +      Flags : C.int) return System.CRTL.ssize_t
 +   is
 +   begin
-+
 +      return  Syscall_Recvmsg (S, Msg, Flags);
-+
 +   end C_Recvmsg;
 +
 +   ---------------
@@ -1008,9 +915,7 @@
 +      Flags : C.int) return System.CRTL.ssize_t
 +   is
 +   begin
-+
 +      return Syscall_Sendmsg (S, Msg, Flags);
-+
 +   end C_Sendmsg;
 +
 +   --------------
@@ -1026,9 +931,7 @@
 +      Tolen : C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
-+
 +   end C_Sendto;
 +
 +   --------------
@@ -1040,12 +943,10 @@
 +      Typ      : C.int;
 +      Protocol : C.int) return C.int
 +   is
-+      Res : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
++      R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
 +   begin
-+
-+      Disable_SIGPIPE (Res);
-+      return Res;
-+
++      Disable_SIGPIPE (R);
++      return R;
 +   end C_Socket;
 +
 +   --------------
@@ -1103,14 +1004,12 @@
 +   -- Socket_Error_Message --
 +   --------------------------
 +
-+   function Socket_Error_Message
-+     (Errno : Integer) return C.Strings.chars_ptr
-+   is separate;
++   function Socket_Error_Message (Errno : Integer) return String is separate;
 +
 +end GNAT.Sockets.Thin;
 --- /dev/null
 +++ gcc/ada/g-socthi-netbsd.adb
-@@ -0,0 +1,378 @@
+@@ -0,0 +1,358 @@
 +------------------------------------------------------------------------------
 +--                                                                          --
 +--                         GNAT COMPILER COMPONENTS                         --
@@ -1119,7 +1018,7 @@
 +--                                                                          --
 +--                                 B o d y                                  --
 +--                                                                          --
-+--                     Copyright (C) 2001-2010, AdaCore                     --
++--                     Copyright (C) 2001-2013, AdaCore                     --
 +--                                                                          --
 +-- GNAT is free software;  you can  redistribute it  and/or modify it under --
 +-- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -1159,9 +1058,6 @@
 +
 +package body GNAT.Sockets.Thin is
 +
-+   Unknown_System_Error : constant C.Strings.chars_ptr :=
-+                            C.Strings.New_String ("Unknown system error");
-+
 +   function Syscall_Accept
 +     (S       : C.int;
 +      Addr    : System.Address;
@@ -1276,12 +1172,11 @@
 +      Addr    : System.Address;
 +      Addrlen : not null access C.int) return C.int
 +   is
-+      Res : constant C.int := Syscall_Accept (S, Addr, Addrlen);
++      R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
 +   begin
 +
-+      Disable_SIGPIPE (Res);
-+      return Res;
-+
++      Disable_SIGPIPE (R);
++      return R;
 +   end C_Accept;
 +
 +   ---------------
@@ -1294,9 +1189,7 @@
 +      Namelen : C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Connect (S, Name, Namelen);
-+
 +   end C_Connect;
 +
 +   ------------------
@@ -1305,29 +1198,29 @@
 +
 +   function Socket_Ioctl
 +     (S   : C.int;
-+      Req : C.int;
++      Req : SOSC.IOCTL_Req_T;
 +      Arg : access C.int) return C.int
 +   is
-+      --  Currently all requests are of the FIONBIO type, so always calc flags
-+      use Interfaces;
-+      flags    : constant Unsigned_32 :=
-+                          Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
-+      nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.FNDELAY);
-+      enabled  : constant Boolean := Arg.all = 1;
-+      newval   : C.int;
 +   begin
 +      if Req = SOSC.FIONBIO then
-+         if enabled then
-+            newval := C.int (flags or nonblock);
-+         elsif (flags and nonblock) > 0 then
-+            newval := C.int (flags - nonblock);
-+         else
-+            newval := C.int (flags);
-+         end if;
-+         return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
-+      else
-+         return C_Ioctl (Fd => S, Req => Req, Arg => Arg);
++         declare
++            use Interfaces;
++            flags    : constant Unsigned_32 :=
++                                Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
++            nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.FNDELAY);
++            enabled  : constant Boolean := Arg.all = 1;
++            newval   : C.int := C.int (flags);
++         begin
++            if enabled then
++               newval := C.int (flags or nonblock);
++            elsif (flags and nonblock) > 0 then
++               newval := C.int (flags - nonblock);
++            end if;
++            return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
++         end;
 +      end if;
++
++      return C_Ioctl (S, Req, Arg);
 +   end Socket_Ioctl;
 +
 +   ------------
@@ -1341,9 +1234,7 @@
 +      Flags : C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Recv (S, Msg, Len, Flags);
-+
 +   end C_Recv;
 +
 +   ----------------
@@ -1359,9 +1250,7 @@
 +      Fromlen : not null access C.int) return C.int
 +   is
 +   begin
-+
 +      return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
-+
 +   end C_Recvfrom;
 +
 +   ---------------
@@ -1374,9 +1263,7 @@
 +      Flags : C.int) return System.CRTL.ssize_t
 +   is
 +   begin
-+
 +      return  Syscall_Recvmsg (S, Msg, Flags);
-+
 +   end C_Recvmsg;
 +
 +   ---------------
@@ -1389,9 +1276,7 @@
 +      Flags : C.int) return System.CRTL.ssize_t
 +   is
 +   begin
-+
 +      return Syscall_Sendmsg (S, Msg, Flags);
-+
 +   end C_Sendmsg;
 +

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403140836.s2E8a5gR076375>