pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang Add lang/gcc6-aux to pkgsrc



details:   https://anonhg.NetBSD.org/pkgsrc/rev/85dc050b6d0c
branches:  trunk
changeset: 355834:85dc050b6d0c
user:      marino <marino%pkgsrc.org@localhost>
date:      Tue Dec 13 01:19:19 2016 +0000

description:
Add lang/gcc6-aux to pkgsrc

I had intended to migrate the ada framework to use gcc6-aux instead of
lang/gcc5-aux, but unfortunately there's been a regression on NetBSD.
It builds and tests perfectly on DragonFly and FreeBSD, but it only
builds on NetBSD.  All the ACAT tests that involve tasking fail, but
the cause is unclear.  All the modifications used on gcc5-aux for NetBSD
are present in gcc6-aux but pthread destruction results in a segfault.

Since then gcc5-aux support has been improved, so I'm putting this away
for a while.  NetBSD has been removed from the platform support list
for now, but I'll review any patches I get to fix NetBSD tasking.

This compiler is based on gcc 6.2 and is primarily used for the Ada
frontend.

diffstat:

 lang/Makefile                          |     3 +-
 lang/gcc6-aux/DESCR                    |    14 +
 lang/gcc6-aux/Makefile                 |   327 +++++
 lang/gcc6-aux/Makefile.version         |    21 +
 lang/gcc6-aux/buildlink3.mk            |    22 +
 lang/gcc6-aux/distinfo                 |    34 +
 lang/gcc6-aux/files/diff-ada           |  2036 ++++++++++++++++++++++++++++++++
 lang/gcc6-aux/files/diff-ada-testsuite |   705 +++++++++++
 lang/gcc6-aux/files/diff-core          |   212 +++
 lang/gcc6-aux/files/diff-cxx           |   173 ++
 lang/gcc6-aux/files/diff-fortran       |    42 +
 lang/gcc6-aux/files/diff-gcc-testsuite |    46 +
 lang/gcc6-aux/options.mk               |   109 +
 13 files changed, 3743 insertions(+), 1 deletions(-)

diffs (truncated from 3806 to 300 lines):

diff -r 463566301c7b -r 85dc050b6d0c lang/Makefile
--- a/lang/Makefile     Tue Dec 13 00:59:44 2016 +0000
+++ b/lang/Makefile     Tue Dec 13 01:19:19 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.445 2016/11/17 06:32:10 jnemeth Exp $
+# $NetBSD: Makefile,v 1.446 2016/12/13 01:19:19 marino Exp $
 #
 
 COMMENT=       Programming languages
@@ -76,6 +76,7 @@
 SUBDIR+=       gcc5-aux
 SUBDIR+=       gcc5-libs
 SUBDIR+=       gcc6
+SUBDIR+=       gcc6-aux
 SUBDIR+=       gcc6-libs
 SUBDIR+=       gforth
 SUBDIR+=       ghc
diff -r 463566301c7b -r 85dc050b6d0c lang/gcc6-aux/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc6-aux/DESCR       Tue Dec 13 01:19:19 2016 +0000
@@ -0,0 +1,14 @@
+The AUX compiler supports several languages: Ada, C, C++, Fortran and
+Objective-C.  Since Ada support must be built by an Ada-capable compiler,
+only platforms for which a bootstrap compiler is available can build it.
+
+The AUX compiler is based on release versions of the Free Software
+Foundation's GNU Compiler Collection.  It carries with it the GMGPL license,
+the modified version of the GPL that exempts generic instantiation from
+resulting in a GPL-licensed executable.  It also carries the GCC Runtime
+Library Exception, so the resulting binaries have no licensing requirements.
+Binaries produced by the AUX compiler should be legally handled the same as
+binaries produced by any FSF compiler.
+
+This compiler implements the full Ada-83, Ada-95, Ada-2005 and Ada-2012
+standards.
diff -r 463566301c7b -r 85dc050b6d0c lang/gcc6-aux/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc6-aux/Makefile    Tue Dec 13 01:19:19 2016 +0000
@@ -0,0 +1,327 @@
+# $NetBSD: Makefile,v 1.1 2016/12/13 01:19:20 marino Exp $
+#
+
+PKGNAME=       gcc6-aux-${SNAPSHOT}
+PKGREVISION=   ${MAIN_PR}
+DISTNAME=      ${IDENTIFICATION}
+CATEGORIES=    lang
+MASTER_SITES=  ${MASTER_SITE_GNU:=gcc/${IDENTIFICATION}/}
+DISTFILES=     ${DISTNAME}.tar.bz2
+
+MAINTAINER=    draco%marino.st@localhost
+HOMEPAGE=      http://www.dragonlace.net/
+COMMENT=       GNAT Ada compiler based on GCC ${GCC_BRANCH}
+LICENSE=       gnu-gpl-v3 AND gnu-lgpl-v3
+
+LANGS=         c ada c++
+USE_TOOLS+=    gmake sed:run perl makeinfo bzip2 patch pod2man tar
+APPLY_DIFFS=   core ada cxx
+
+.include "Makefile.version"
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
+# Requires bootstrap compiler, which is only available for on selected systems
+
+ONLY_FOR_PLATFORM=     DragonFly-*-x86_64   \
+                       FreeBSD-*-i386       \
+                       FreeBSD-*-x86_64     \
+                       SunOS-5.1[1-9]*-i386 \
+                       SunOS-5.1[1-9]*-x86_64
+# Tasking is broken on NetBSD.  The reason for this is unknown
+# Until pthread support is fixed, remove NetBSD from PLATFORM list
+#                      NetBSD-[5-9]*-i386   \
+#                      NetBSD-[5-9]*-x86_64
+
+GARCH=                 ${MACHINE_ARCH:S/amd64/x86_64/}
+BLD_TARGET=            ${GARCH}-aux-${LOWER_OPSYS}${OS_VERSION}
+OS_LABEL4VERS=         [${OPSYS}${GARCH:M*64:S/amd_//:S/x86_//}]
+FULL_GNATGCC=          NOT SET
+FULL_PATH=             /sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/gcc6-aux/bin:${PREFIX}/sbin:${PREFIX}/bin
+
+.if ${OPSYS} == DragonFly
+BOOTSTRAP_COMPILER=    ada-bootstrap.${GARCH}.dragonfly.41.tar.bz2
+.endif
+
+.if ${OPSYS} == FreeBSD
+MODERN_BINUTILS=       yes
+BOOTSTRAP_COMPILER=    ada-bootstrap.${GARCH}.freebsd.100B.tar.bz2
+.endif
+
+.if ${OPSYS} == NetBSD
+.  if !empty(OS_VERSION:M7.99.*)
+NSUFF= 8.0_DEV
+.  else
+NSUFF= ${OS_VERSION}
+.  endif
+.  if ${GARCH} == i386
+NELF=  elf
+.  endif
+XLDF=                  -lm
+.  if ${OS_VERSION:R} < 7
+MODERN_BINUTILS=       yes
+.  endif
+BOOTSTRAP_COMPILER=    ada-bootstrap.${GARCH}.netbsd.614.tar.bz2
+BLD_TARGET=            ${MACHINE_ARCH}-aux-netbsd${NELF}${NSUFF}
+.  if ${OS_VERSION:R} == 5
+CORRECTIONS=           g-socthi-bsd.adb
+CRXN=                  C5
+.  else
+CORRECTIONS=           g-socthi-bsd.adb g-socthi.ads \
+                       s-osinte-netbsd.ads s-osprim-posix.adb
+CRXN=                  C6
+.  endif
+C5_g-socthi-bsd.adb=   Syscall_Socket/__socket30
+C6_g-socthi-bsd.adb=   Syscall_Socket/__socket30
+C6_g-socthi.ads=       C_Select/__select50
+C6_s-osinte-netbsd.ads=        nanosleep/__nanosleep50 \
+                       clock_getres/__clock_getres50 \
+                       clock_gettime/__clock_gettime50
+C6_s-osprim-posix.adb= nanosleep/__nanosleep50 \
+                       gettimeofday/__gettimeofday50
+.endif
+
+.if ${OPSYS} == SunOS
+SOL_OSV!=              expr substr ${OS_VERSION} 3 2
+BLD_TARGET=            ${MACHINE_ARCH}-aux-${LOWER_OPSYS}2.${SOL_OSV}
+BOOTSTRAP_COMPILER=    ada-bootstrap.x86_64.solaris.511.tar.bz2
+.  if ${ABI} == 64
+EXTRA_CONFARGS+=       --enable-multilib
+.  else
+COMPILER_ABI_SWITCH=   -m32
+.  endif
+MY_CONFIGURE_ENV+=     OBJDUMP=${PREFIX}/bin/gobjdump
+MODERN_BINUTILS=       yes
+NATIVE_LINKER!=                which ld
+.endif
+
+.if defined(MODERN_BINUTILS)
+BUILDLINK_DEPMETHOD.binutils=  full
+.include "../../devel/binutils/buildlink3.mk"
+EXTRA_CONFARGS+=       --with-gnu-as --with-as=${PREFIX}/bin/gas
+MY_CONFIGURE_ENV+=     AR=${PREFIX}/bin/gar
+MY_CONFIGURE_ENV+=     AS=${PREFIX}/bin/gas
+MY_CONFIGURE_ENV+=     NM=${PREFIX}/bin/gnm
+MY_CONFIGURE_ENV+=     RANLIB=${PREFIX}/bin/granlib
+.  if defined(NATIVE_LINKER)
+EXTRA_CONFARGS+=       --without-gnu-ld --with-ld=${NATIVE_LINKER}
+.  else
+EXTRA_CONFARGS+=       --with-gnu-ld --with-ld=${PREFIX}/bin/gld.bfd
+MY_CONFIGURE_ENV+=     LD=${PREFIX}/bin/gld.bfd
+.  endif
+.else
+EXTRA_CONFARGS+=       --with-gnu-ld --with-ld=/usr/bin/ld
+EXTRA_CONFARGS+=       --with-gnu-as --with-as=/usr/bin/as
+.endif
+
+
+# define some important directories and files
+WRKSRC=                        ${WRKDIR}/gcc-${GCC_VERSION}
+BUILDDIR=              ${WRKDIR}/build
+NEWBSDIR=              ${WRKDIR}/newbs/bootstrap
+SYSLIBDIR=             ${WRKDIR}/lib
+CFG_SCRIPT=            ${WRKSRC}/configure
+REVFILE=               ${WRKSRC}/gcc/REVISION
+PHASEFILE=             ${WRKSRC}/gcc/DEV-PHASE
+BOOTSTRAP_PREFIX=      ${WRKDIR}/bootstrap
+PKG_PREFIX=            ${PREFIX}/gcc6-aux
+BSFILENAME=            ada-bootstrap.${GARCH}.${LOWER_OPSYS}.${OS_VERSION:C/[A-Z_.-]//g}.tar
+
+
+# testing if gcc6-aux is already installed - if so, use this compiler along with
+# its gnatlink, gnatbind, and gnatmake rather than the older bootstrap versions
+.if exists(${LOCALBASE}/gcc6-aux/bin/ada)
+FULL_GNATGCC=${LOCALBASE}/gcc6-aux/bin/ada
+FULL_GNATGXX=${LOCALBASE}/gcc6-aux/bin/g++
+.endif
+
+
+.if ${FULL_GNATGCC} == "NOT SET"
+# here we know we need to install the bootstrap compiler
+.  if defined(BOOTSTRAP_TRIPLET)
+FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gnatgcc
+.  else
+FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gcc ${COMPILER_ABI_SWITCH}
+FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++ ${COMPILER_ABI_SWITCH}
+.  endif
+DISTFILES+= ${BOOTSTRAP_COMPILER}
+SITES.${BOOTSTRAP_COMPILER}=   http://downloads.dragonlace.net/src/
+FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin
+.endif
+
+
+# for port maintenance, invoke "make mdi PLUS_BOOTSTRAPS=1"
+.if defined(PLUS_BOOTSTRAPS)
+ALL_BOOTSTRAPS= \
+   ada-bootstrap.i386.freebsd.100B.tar.bz2 \
+   ada-bootstrap.i386.netbsd.614.tar.bz2 \
+   ada-bootstrap.x86_64.dragonfly.41.tar.bz2 \
+   ada-bootstrap.x86_64.freebsd.84.tar.bz2 \
+   ada-bootstrap.x86_64.freebsd.100B.tar.bz2 \
+   ada-bootstrap.x86_64.netbsd.614.tar.bz2 \
+   ada-bootstrap.x86_64.solaris.511.tar.bz2
+.for BC in ${ALL_BOOTSTRAPS}
+SITES.${BC}=   http://downloads.dragonlace.net/src/
+.endfor
+DISTFILES= ${DISTNAME}.tar.bz2 ${ALL_BOOTSTRAPS}
+.endif
+
+# establish ada-aware compiler for use
+MY_CONFIGURE_ENV+=     CC=${FULL_GNATGCC:Q}
+MY_CONFIGURE_ENV+=     CXX=${FULL_GNATGXX:Q}
+MY_CONFIGURE_ENV+=     PATH=${FULL_PATH}
+MY_CONFIGURE_ENV+=     LDFLAGS="${XLDF} ${COMPILER_RPATH_FLAG}${PREFIX}/lib"
+MY_MAKE_ENV+=          PATH=${FULL_PATH}
+MY_MAKE_ENV+=          LD_LIBRARY_PATH=${BUILDDIR}/gcc${EXTRA_LLP}
+# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
+# a binary so we need to make sure we give it the installed sed and not
+# the tool wrapped one.
+MY_MAKE_ENV+=          ac_cv_path_SED=${TOOLS_SED}
+MY_MAKE_ENV+=          lt_cv_path_SED=${TOOLS_SED}
+
+
+# The standard configuration options
+CONFIGURE_ARGS=        --enable-languages=${LANGS:Q}
+CONFIGURE_ARGS+=       --build=${BLD_TARGET}
+CONFIGURE_ARGS+=       --prefix=${PKG_PREFIX:Q}
+CONFIGURE_ARGS+=       --enable-threads=posix
+CONFIGURE_ARGS+=       --enable-checking=release
+CONFIGURE_ARGS+=       --disable-libmudflap
+CONFIGURE_ARGS+=       --disable-libgomp
+CONFIGURE_ARGS+=       --disable-libssp
+CONFIGURE_ARGS+=       --disable-libcilkrts
+CONFIGURE_ARGS+=       --disable-libitm
+CONFIGURE_ARGS+=       ${EXTRA_CONFARGS}
+
+# Automatic package list generation
+GENERATE_PLIST=  cd ${DESTDIR}${PREFIX};
+GENERATE_PLIST+= ${FIND} * \( -type f -or -type l \) | ${SORT} -dr;
+
+
+post-extract:
+       # Personalize GNAT for each different machine
+       @${ECHO} "-=> GCC AUX ${OS_LABEL4VERS}" > ${REVFILE}
+       @${ECHO} ${PHASE} > ${PHASEFILE}
+       # 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 ${OPSYS} == NetBSD
+.  for sysfile in ${CORRECTIONS}
+.    for pair in ${${CRXN}_${sysfile}}
+       ${PERL5} -pi -e 's|C, ${pair:H}, ".*"|C, ${pair:H}, "${pair:T}"|' \
+               ${WRKSRC}/gcc/ada/${sysfile}
+.    endfor
+.  endfor
+.  if ${CRXN} == C5
+       ${PERL5} -pi -e 's|new int64_t|new int|' \
+               ${WRKSRC}/gcc/ada/s-osinte-netbsd.ads
+       ${PERL5} -pi -e 's|new Long_Integer|new Integer|' \
+               ${WRKSRC}/gcc/ada/s-osprim-posix.adb
+.  endif
+.endif
+.if defined(STATIC_BUILD) || !empty(PKG_OPTIONS:Mbootstrap)
+.  if ${OPSYS} != SunOS
+       # Ensure GNAT tools are built statically
+       ${PERL5} -pi -e 's/^GCC_LINK_FLAGS=.*/GCC_LINK_FLAGS=-static/' \
+         ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
+.  endif
+.endif
+.if !exists(${LOCALBASE}/gcc6-aux/bin/ada) && ${OPSYS} == SunOS
+       # In case /usr/pkg/bin/gas doesn't exist, establish fallback
+       ${LN} -s ${PREFIX}/bin/gas ${BOOTSTRAP_PREFIX}/bin/as
+.endif
+       # Illumos /usr/ccs binaries are symlinked to /usr/bin
+       # elfdump was present on OmniOS but not in Joyent dev area
+       ${PERL5} -i -pe 's|/usr/ccs/bin|/usr/bin|g;' \
+         -pe 's|readelf -s|greadelf -s|' ${WRKSRC}/contrib/make_sunver.pl
+       # Update LINK_SPEC to add gcc6-aux lib runpath in every binary
+       @${ECHO} "Configuring LINK_SPEC runpath"
+       ${PERL5} -pi -e 's;\@PREFIX\@/\@GCCAUX\@;${PREFIX}/gcc6-aux;' \
+         ${WRKSRC}/gcc/config/dragonfly.h \
+         ${WRKSRC}/gcc/config/netbsd-elf.h \
+         ${WRKSRC}/gcc/config/i386/freebsd.h
+
+.if defined(BOOTSTRAP_TRIPLET)
+       # 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.
+       # No longer used, only here to support future SunOS bootstrap generation
+
+       ${MKDIR} ${BOOTSTRAP_PREFIX}
+       ${MV} ${BOOTSTRAP_PREFIX}/../bin ${BOOTSTRAP_PREFIX}
+       ${MV} ${BOOTSTRAP_PREFIX}/../lib ${BOOTSTRAP_PREFIX}
+       ${MV} ${BOOTSTRAP_PREFIX}/../libexec ${BOOTSTRAP_PREFIX}
+       ${RM} -rf ${BOOTSTRAP_PREFIX}/lib/gcc/${BOOTSTRAP_TRIPLET}/include-fixed
+.endif
+
+
+do-configure:
+       ${MKDIR} ${BUILDDIR}
+       cd ${BUILDDIR} && ${SETENV} ${MY_CONFIGURE_ENV} \



Home | Main Index | Thread Index | Old Index