pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/gcc9 lang/gcc9: add gcc-9.2.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0909222a55c9
branches:  trunk
changeset: 346969:0909222a55c9
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Jan 05 21:15:45 2020 +0000

description:
lang/gcc9: add gcc-9.2.0

The GNU Compiler Collection includes front ends for C, C++, Objective-C,
Fortran, Ada, Go, and D, as well as libraries for these languages
(libstdc++,...).

This is the 2019 version, initially released in April 2019.

pkgsrc-specific changes to lang/gcc8:

The PLIST file is fixed, to guarantee that all expected files are
installed properly. In lang/gcc8 it had been autogenerated.

Only those patches have been kept that were strictly necessary to build
GCC on NetBSD-amd64. The others may be added from lang/gcc8 as necessary.

Tested by bootstrapping pkgsrc using CC=$PREFIX/gcc9/bin/gcc.

diffstat:

 lang/gcc9/DESCR                                                                     |     3 +
 lang/gcc9/Makefile                                                                  |   189 +
 lang/gcc9/PLIST                                                                     |  1473 ++++++++++
 lang/gcc9/distinfo                                                                  |     8 +
 lang/gcc9/options.mk                                                                |   139 +
 lang/gcc9/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h             |    54 +
 lang/gcc9/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc |    81 +
 7 files changed, 1947 insertions(+), 0 deletions(-)

diffs (truncated from 1975 to 300 lines):

diff -r faf47a8ae25c -r 0909222a55c9 lang/gcc9/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc9/DESCR   Sun Jan 05 21:15:45 2020 +0000
@@ -0,0 +1,3 @@
+The GNU Compiler Collection includes front ends for C, C++, Objective-C,
+Fortran, Ada, Go, and D, as well as libraries for these languages
+(libstdc++,...).
diff -r faf47a8ae25c -r 0909222a55c9 lang/gcc9/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc9/Makefile        Sun Jan 05 21:15:45 2020 +0000
@@ -0,0 +1,189 @@
+# $NetBSD: Makefile,v 1.1 2020/01/05 21:15:45 rillig Exp $
+
+GCC9_PKGBASE=  gcc9
+GCC9_VERSION=  9.2.0
+
+DISTNAME=      gcc-${GCC9_VERSION}
+PKGNAME=       ${GCC9_PKGBASE}-${GCC9_VERSION}
+## When bumping the PKGREVISION of this package, the PKGREVISION of
+## lang/gcc9-libs needs to be bumped to be at least 1 more than the
+## PKGREVISION of this package!
+CATEGORIES=    lang
+MASTER_SITES=  ${MASTER_SITE_GNU:=gcc/gcc-${GCC9_VERSION}/}
+EXTRACT_SUFX=  .tar.xz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://gcc.gnu.org/
+COMMENT=       The GNU Compiler Collection (GCC) - Release 9 Series
+LICENSE=       gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
+
+# These are conditionally overwritten depending on the package options.
+DISTFILES=             ${DEFAULT_DISTFILES}
+EXTRACT_ONLY=          ${DEFAULT_DISTFILES}
+
+USE_LANGUAGES=         c c++
+USE_TOOLS+=            gmake makeinfo sed:run tar:build
+USE_TOOLS.NetBSD+=     gsed
+
+GNU_CONFIGURE=         yes
+GNU_CONFIGURE_STRICT=  no # has several configure scripts
+OBJDIR=                        ${WRKDIR}/build
+CONFIGURE_DIRS=                ${OBJDIR}
+CONFIGURE_SCRIPT=      ../${DISTNAME}/configure
+GCC9_SUBPREFIX=                ${GCC9_PKGBASE}
+GCC9_PREFIX=           ${PREFIX}/${GCC9_SUBPREFIX}
+GNU_CONFIGURE_PREFIX=  ${GCC9_PREFIX}
+INFO_FILES=            yes
+CONFIGURE_ARGS+=       --disable-libstdcxx-pch
+CONFIGURE_ARGS+=       --with-system-zlib
+
+UNLIMIT_RESOURCES=     datasize stacksize
+
+SUBST_CLASSES+=                vars
+SUBST_MESSAGE.vars=    Setting target machine name path
+SUBST_STAGE.vars=      pre-configure
+SUBST_FILES.vars=      gcc/Makefile.in
+SUBST_VARS.vars=       GCC_TARGET_MACHINE
+
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90142
+CHECK_PORTABILITY_SKIP=        contrib/download_prerequisites
+
+.include "../../mk/bsd.prefs.mk"
+
+LANGS=                 c
+
+# In some cases LINKER_RPATH_FLAG needs a trailing space.
+LINKER_RPATH_FLAG:=    ${LINKER_RPATH_FLAG:S/-rpath/& /}
+
+## The Library rpath to use in end programs.
+LDFLAGS_FOR_TARGET=    ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*}
+
+# The "-static-libstdc++ -static-libgcc" flags are normally added to the
+# boot-ldflags by configure but because we are supply the boot-ldflags
+# we mash supply them.
+BOOT_LDFLAGS=          -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET}
+# Needed on Darwin when LDFLAGS point to a SDK
+BOOT_LDFLAGS+=         ${LDFLAGS:M-Wl,-syslibroot*}
+# GCC does not understand this option; remove it, or stage build will fail
+BUILDLINK_TRANSFORM+=  rm:-stdlib=libc++
+
+.include "options.mk"
+
+.if ${MACHINE_PLATFORM:MNetBSD-*-*}
+# on NetBSD, use the native SSP code in libc
+CONFIGURE_ARGS+=       --disable-libssp
+# Match base libstdc++ major
+SUBST_CLASSES+=                libstdc
+SUBST_STAGE.libstdc=   pre-configure
+SUBST_FILES.libstdc=   libstdc++-v3/configure
+SUBST_MESSAGE.libstdc= Bumping libstdc++ major to 7
+SUBST_SED.libstdc=     -e 's,libtool_VERSION=6:,libtool_VERSION=7:,g'
+.else
+CONFIGURE_ARGS+=       --enable-libssp
+.endif
+
+## For target librarys and libjava programs.
+CONFIGURE_ENV+=                LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q}
+
+CONFIGURE_ARGS+=       --enable-languages=${LANGS:M*:Q}
+CONFIGURE_ARGS+=       --enable-shared
+CONFIGURE_ARGS+=       --enable-long-long
+CONFIGURE_ARGS+=       --with-local-prefix=${GCC9_PREFIX:Q}
+CONFIGURE_ARGS+=       --enable-threads=posix
+CONFIGURE_ARGS+=       --with-boot-ldflags=${BOOT_LDFLAGS:M*:Q}
+
+# multilib on Darwin requires fat-binaries
+CONFIGURE_ARGS.Darwin+=        --disable-multilib
+.if ${OSX_SDK_PATH:U}
+CONFIGURE_ARGS.Darwin+=        --with-sysroot=${OSX_SDK_PATH:Q}
+.endif
+
+.if ${OPSYS} == NetBSD
+CONFIGURE_ARGS+=       --with-gnu-ld --with-ld=/usr/bin/ld
+CONFIGURE_ARGS+=       --with-gnu-as --with-as=/usr/bin/as
+MAKE_ENV+=             ac_cv_func_clock_gettime=yes
+MAKE_ENV+=             ac_cv_func_gethostbyname_r=no
+MAKE_ENV+=             ac_cv_func_freelocale=no
+MAKE_ENV+=             ac_cv_func_newlocale=no
+MAKE_ENV+=             ac_cv_func_uselocale=no
+.endif
+
+MAKE_ENV.SunOS+=       ac_cv_func_mkostemp=no
+
+CONFIGURE_ARGS.DragonFly+=     --disable-bootstrap
+
+.if ${MACHINE_PLATFORM:MNetBSD-*-i386} || ${MACHINE_PLATFORM:MLinux-*-i386}
+CONFIGURE_ARGS+=       --with-arch=i486 --with-tune=i486
+.endif
+
+.if ${MACHINE_PLATFORM:MNetBSD-*-x86_64} || ${MACHINE_PLATFORM:MLinux-*-x86_64}
+CONFIGURE_ARGS+=       --with-arch=nocona --with-tune=nocona --with-fpmath=sse
+.endif
+
+.if ${MACHINE_PLATFORM:MDarwin-[0-8].*-*}
+CONFIGURE_ARGS+=       --with-dwarf2
+.endif
+
+# ${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.
+MAKE_ENV+=             ac_cv_path_SED=${TOOLS_SED}
+MAKE_ENV+=             lt_cv_path_SED=${TOOLS_SED}
+
+# Determine whether to use binutils
+.if ${OPSYS} == SunOS
+.  if exists(/usr/sfw/bin/gobjdump)
+CONFIGURE_ENV+=                OBJDUMP=/usr/sfw/bin/gobjdump
+.  endif
+.  if exists(/usr/bin/ld)
+CONFIGURE_ARGS+=       --without-gnu-ld --with-ld=/usr/bin/ld
+.  else
+CONFIGURE_ARGS+=       --without-gnu-ld --with-ld=/usr/ccs/bin/ld
+.  endif
+.  if exists(/usr/sfw/bin/gas)
+CONFIGURE_ARGS+=       --with-gnu-as --with-as=/usr/sfw/bin/gas
+.  elif exists(/usr/ccs/bin/as)
+CONFIGURE_ARGS+=       --without-gnu-as --with-as=/usr/ccs/bin/as
+.  else
+BUILDLINK_DEPMETHOD.binutils=  full
+.    include "../../devel/binutils/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-gnu-as --with-as=${PREFIX}/bin/gas
+.  endif
+.endif
+
+.if ${OS_VARIANT} == SmartOS
+SUBST_CLASSES+=                ccs
+SUBST_STAGE.ccs=       pre-configure
+SUBST_FILES.ccs=       contrib/make_sunver.pl
+SUBST_SED.ccs=         -e 's,/usr/ccs/bin,/usr/bin,g'
+.endif
+
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91621
+# Already fixed for GCC 10 and GCC 9, somewhere > 9.2.
+SUBST_CLASSES+=                eqeq
+SUBST_STAGE.eqeq=      pre-configure
+SUBST_FILES.eqeq=      libgo/mksysinfo.sh
+SUBST_SED.eqeq=                -e 's,== "",= "",'
+
+pre-configure:
+       ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
+
+TEST_TARGET=           -j ${MAKE_JOBS} -k check
+TEST_DEPENDS+=         dejagnu-[0-9]*:../../devel/dejagnu
+
+post-test:
+       ${RUN} cd ${WRKSRC} && cd ${OBJDIR} \
+       && ${SH} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log
+       @${INFO_MSG} "Test summary is available in ${WRKDIR}/test_summary.log"
+
+post-install:
+       ${TEST} -f ${DESTDIR}${GCC9_PREFIX}/bin/cc \
+       || (cd ${DESTDIR}${GCC9_PREFIX}/bin && ${LN} -f gcc cc)
+
+PRINT_PLIST_AWK+=      { gsub("${MACHINE_GNU_PLATFORM}", "$${MACHINE_GNU_PLATFORM}"); }
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r faf47a8ae25c -r 0909222a55c9 lang/gcc9/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc9/PLIST   Sun Jan 05 21:15:45 2020 +0000
@@ -0,0 +1,1473 @@
+@comment $NetBSD: PLIST,v 1.1 2020/01/05 21:15:45 rillig Exp $
+gcc9/bin/c++
+gcc9/bin/cc
+gcc9/bin/cpp
+gcc9/bin/g++
+gcc9/bin/gcc
+gcc9/bin/gcc-ar
+gcc9/bin/gcc-nm
+gcc9/bin/gcc-ranlib
+gcc9/bin/gcov
+gcc9/bin/gcov-dump
+gcc9/bin/gcov-tool
+gcc9/bin/gfortran
+gcc9/bin/${MACHINE_GNU_PLATFORM}-c++
+gcc9/bin/${MACHINE_GNU_PLATFORM}-g++
+gcc9/bin/${MACHINE_GNU_PLATFORM}-gcc
+gcc9/bin/${MACHINE_GNU_PLATFORM}-gcc-${PKGVERSION}
+gcc9/bin/${MACHINE_GNU_PLATFORM}-gcc-ar
+gcc9/bin/${MACHINE_GNU_PLATFORM}-gcc-nm
+gcc9/bin/${MACHINE_GNU_PLATFORM}-gcc-ranlib
+gcc9/bin/${MACHINE_GNU_PLATFORM}-gfortran
+gcc9/include/c++/algorithm
+gcc9/include/c++/any
+gcc9/include/c++/array
+gcc9/include/c++/atomic
+gcc9/include/c++/backward/auto_ptr.h
+gcc9/include/c++/backward/backward_warning.h
+gcc9/include/c++/backward/binders.h
+gcc9/include/c++/backward/hash_fun.h
+gcc9/include/c++/backward/hash_map
+gcc9/include/c++/backward/hash_set
+gcc9/include/c++/backward/hashtable.h
+gcc9/include/c++/backward/strstream
+gcc9/include/c++/bit
+gcc9/include/c++/bits/algorithmfwd.h
+gcc9/include/c++/bits/alloc_traits.h
+gcc9/include/c++/bits/allocated_ptr.h
+gcc9/include/c++/bits/allocator.h
+gcc9/include/c++/bits/atomic_base.h
+gcc9/include/c++/bits/atomic_futex.h
+gcc9/include/c++/bits/atomic_lockfree_defines.h
+gcc9/include/c++/bits/basic_ios.h
+gcc9/include/c++/bits/basic_ios.tcc
+gcc9/include/c++/bits/basic_string.h
+gcc9/include/c++/bits/basic_string.tcc
+gcc9/include/c++/bits/boost_concept_check.h
+gcc9/include/c++/bits/c++0x_warning.h
+gcc9/include/c++/bits/char_traits.h
+gcc9/include/c++/bits/codecvt.h
+gcc9/include/c++/bits/concept_check.h
+gcc9/include/c++/bits/cpp_type_traits.h
+gcc9/include/c++/bits/cxxabi_forced.h
+gcc9/include/c++/bits/cxxabi_init_exception.h
+gcc9/include/c++/bits/deque.tcc
+gcc9/include/c++/bits/enable_special_members.h
+gcc9/include/c++/bits/erase_if.h
+gcc9/include/c++/bits/exception.h
+gcc9/include/c++/bits/exception_defines.h
+gcc9/include/c++/bits/exception_ptr.h
+gcc9/include/c++/bits/forward_list.h
+gcc9/include/c++/bits/forward_list.tcc
+gcc9/include/c++/bits/fs_dir.h
+gcc9/include/c++/bits/fs_fwd.h
+gcc9/include/c++/bits/fs_ops.h
+gcc9/include/c++/bits/fs_path.h
+gcc9/include/c++/bits/fstream.tcc
+gcc9/include/c++/bits/functexcept.h
+gcc9/include/c++/bits/functional_hash.h
+gcc9/include/c++/bits/gslice.h
+gcc9/include/c++/bits/gslice_array.h
+gcc9/include/c++/bits/hash_bytes.h
+gcc9/include/c++/bits/hashtable.h
+gcc9/include/c++/bits/hashtable_policy.h
+gcc9/include/c++/bits/indirect_array.h
+gcc9/include/c++/bits/invoke.h
+gcc9/include/c++/bits/ios_base.h
+gcc9/include/c++/bits/istream.tcc
+gcc9/include/c++/bits/list.tcc
+gcc9/include/c++/bits/locale_classes.h
+gcc9/include/c++/bits/locale_classes.tcc
+gcc9/include/c++/bits/locale_conv.h
+gcc9/include/c++/bits/locale_facets.h
+gcc9/include/c++/bits/locale_facets.tcc
+gcc9/include/c++/bits/locale_facets_nonio.h
+gcc9/include/c++/bits/locale_facets_nonio.tcc
+gcc9/include/c++/bits/localefwd.h
+gcc9/include/c++/bits/mask_array.h
+gcc9/include/c++/bits/memoryfwd.h
+gcc9/include/c++/bits/move.h
+gcc9/include/c++/bits/nested_exception.h
+gcc9/include/c++/bits/node_handle.h
+gcc9/include/c++/bits/ostream.tcc
+gcc9/include/c++/bits/ostream_insert.h
+gcc9/include/c++/bits/parse_numbers.h
+gcc9/include/c++/bits/postypes.h
+gcc9/include/c++/bits/predefined_ops.h



Home | Main Index | Thread Index | Old Index