pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/gcc12



Module Name:    pkgsrc
Committed By:   wiz
Date:           Fri Apr  7 06:48:27 UTC 2023

Modified Files:
        pkgsrc/lang/gcc12: Makefile options.mk
Added Files:
        pkgsrc/lang/gcc12: Makefile.common

Log Message:
gcc12: split off Makefile.common

Sync more with gcc10 package.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/gcc12/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc12/Makefile.common
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc12/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/gcc12/Makefile
diff -u pkgsrc/lang/gcc12/Makefile:1.4 pkgsrc/lang/gcc12/Makefile:1.5
--- pkgsrc/lang/gcc12/Makefile:1.4      Tue Dec  6 14:23:02 2022
+++ pkgsrc/lang/gcc12/Makefile  Fri Apr  7 06:48:27 2023
@@ -1,57 +1,15 @@
-# $NetBSD: Makefile,v 1.4 2022/12/06 14:23:02 jperkin Exp $
+# $NetBSD: Makefile,v 1.5 2023/04/07 06:48:27 wiz Exp $
 
-GCC_PKGNAME=           gcc12
-.include               "version.mk"
-
-DISTNAME=      gcc-${GCC12_DIST_VERSION}
 PKGNAME=       ${GCC_PKGNAME}-${GCC12_DIST_VERSION}
 ## When bumping the PKGREVISION of this package the PKGREVISION of
 ## lang/gcc12-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-${GCC12_DIST_VERSION}/}
-EXTRACT_SUFX=  .tar.xz
-
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      https://gcc.gnu.org/
 COMMENT=       The GNU Compiler Collection (GCC) - 12.0 Release Series
-LICENSE=       gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
-
-DISTFILES=             ${DEFAULT_DISTFILES}
-EXTRACT_ONLY=          ${DEFAULT_DISTFILES}
-
-# Relocations result in a linker error on AArch64, but not x86.
-MKPIE_SUPPORTED=       no
-CHECK_RELRO_SKIP+=     ${GCC_PKGNAME}/lib/*
-
-NOT_FOR_PLATFORM=      Interix-*-*
-
-USE_LANGUAGES=         c99 c++
-USE_TOOLS+=            gmake makeinfo sed:run tar:build
-USE_TOOLS.NetBSD+=     gsed
-
-GNU_CONFIGURE=         yes
-GNU_CONFIGURE_STRICT=  no
-## Build outside ${WRKSRC}
-OBJDIR=                        ../build
-CONFIGURE_DIRS=                ${OBJDIR}
-CONFIGURE_SCRIPT=      ../${DISTNAME}/configure
-GCC_SUBPREFIX=         ${GCC_PKGNAME}
-GCC_PREFIX=            ${PREFIX}/${GCC_SUBPREFIX}
-GNU_CONFIGURE_PREFIX=  ${GCC_PREFIX}
-INFO_FILES=            yes
-CONFIGURE_ARGS+=       --disable-libstdcxx-pch
-
-UNLIMIT_RESOURCES+=    datasize
-UNLIMIT_RESOURCES+=    stacksize
-
-CHECK_PORTABILITY_SKIP+=       contrib/*
-CHECK_PORTABILITY_SKIP+=       gcc/configure.orig_dist
-
-.include "../../mk/bsd.prefs.mk"
 
 LANGS=                 c
 
+.include "Makefile.common"
+
 # In some cases LINKER_RPATH_FLAG needs a trailing space.
 LINKER_RPATH_FLAG:=    ${LINKER_RPATH_FLAG:S/-rpath/& /}
 
@@ -76,24 +34,6 @@ SUBST_FILES.fixinc=  gcc/Makefile.in
 SUBST_SED.fixinc=      -e "s,\./fixinc.sh,-c true,"
 .endif
 
-.include "options.mk"
-
-.if ${MACHINE_PLATFORM:MDarwin-*-aarch64}
-BUILDLINK_TRANSFORM+=  rm:-nodefaultrpaths
-CONFIGURE_ARGS+=       --disable-darwin-at-rpath
-PATCHFILES=            gcc-12.2.0-arm.diff
-PATCH_SITES=           https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/
-PATCH_DIST_STRIP=      -p1
-.endif
-
-## For graphite support.
-.if !empty(PKG_OPTIONS:Mgcc-graphite)
-
-post-extract:
-       ${TAR} -jxf ${DISTDIR}/${ISL16}.tar.bz2 -C ${WRKSRC}
-       ${MV} ${WRKSRC}/${ISL16} ${WRKSRC}/isl
-.endif
-
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-*)
 # on NetBSD, use the native SSP code in libc
 CONFIGURE_ARGS+=       --disable-libssp
@@ -112,82 +52,9 @@ CONFIGURE_ENV+=             LDFLAGS_FOR_TARGET=${LD
 
 CONFIGURE_ARGS+=       --enable-languages=${LANGS:Q}
 CONFIGURE_ARGS+=       --enable-shared
-CONFIGURE_ARGS+=       --enable-long-long
-CONFIGURE_ARGS+=       --with-local-prefix=${GCC_PREFIX:Q}
-CONFIGURE_ARGS+=       --enable-threads=posix
-CONFIGURE_ARGS+=       --with-boot-ldflags=${BOOT_LDFLAGS:Q}
-CONFIGURE_ARGS+=       --without-zstd
-# causes build errors even when using lang/gcc12 to self-host.
-CONFIGURE_ARGS.SunOS+= --disable-libsanitizer
-# multilib on Darwin requires fat-binaries
-CONFIGURE_ARGS.Darwin+=        --disable-multilib
-.if !empty(OSX_SDK_PATH)
-CONFIGURE_ARGS.Darwin+=        --with-sysroot=${OSX_SDK_PATH}
-.endif
-CONFIGURE_ARGS.NetBSD+=        --with-gnu-ld --with-ld=/usr/bin/ld
-CONFIGURE_ARGS.NetBSD+=        --with-gnu-as --with-as=/usr/bin/as
-MAKE_ENV.NetBSD+=      ac_cv_func_clock_gettime=yes
-MAKE_ENV.NetBSD+=      ac_cv_func_gethostbyname_r=no
-MAKE_ENV.NetBSD+=      ac_cv_func_freelocale=no
-MAKE_ENV.NetBSD+=      ac_cv_func_newlocale=no
-MAKE_ENV.NetBSD+=      ac_cv_func_uselocale=no
-MAKE_ENV.SunOS+=       ac_cv_func_mkostemp=no
-
-.if !empty(PKGSRC_COMPILER:Mclang) || ${OPSYS} == "DragonFly"
-CONFIGURE_ARGS+=       --disable-bootstrap
-.endif
-
-.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386)
-CONFIGURE_ARGS+=       --with-arch=i486 --with-tune=i486
-.endif
-
-.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
-CONFIGURE_ARGS+=       --with-arch=nocona --with-tune=nocona --with-fpmath=sse
-.endif
-
-.if !empty(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
 
 CTF_FILES_SKIP+=       */gengtype      # CPU limit exceeded
 
-pre-configure:
-       ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
-
 TEST_TARGET=   -j ${MAKE_JOBS} -k check || ${TRUE}
 TEST_DEPENDS+= dejagnu-[0-9]*:../../devel/dejagnu
 
@@ -208,14 +75,4 @@ GENERATE_PLIST+= \
        cd ${DESTDIR}${PREFIX} && \
        ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT};
 
-CHECK_BUILTIN.zlib:= yes
-.include "../../devel/zlib/builtin.mk"
-CHECK_BUILTIN.zlib:= no
-.if ${USE_BUILTIN.zlib:M[yY][eE][sS]}
-CONFIGURE_ARGS+=       --with-system-zlib
-.else
-CONFIGURE_ARGS+=       --without-system-zlib
-.endif
-.include "../../mk/dlopen.buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/lang/gcc12/options.mk
diff -u pkgsrc/lang/gcc12/options.mk:1.1 pkgsrc/lang/gcc12/options.mk:1.2
--- pkgsrc/lang/gcc12/options.mk:1.1    Thu Jun 16 15:43:55 2022
+++ pkgsrc/lang/gcc12/options.mk        Fri Apr  7 06:48:27 2023
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2022/06/16 15:43:55 adam Exp $
+# $NetBSD: options.mk,v 1.2 2023/04/07 06:48:27 wiz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.${GCC_PKGNAME}
 PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran \
@@ -7,6 +7,8 @@ PKG_SUPPORTED_OPTIONS=  nls gcc-inplace-m
 PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc gcc-objc++ \
                        gcc-graphite gcc-inplace-math
 
+.include "../../mk/bsd.fast.prefs.mk"
+
 .if ${OPSYS} == "NetBSD"
 PKG_SUGGESTED_OPTIONS+=        nls
 .elif ${OPSYS} == "Linux"
@@ -27,7 +29,7 @@ PKG_SUGGESTED_OPTIONS+=                       always-libgcc
 ### Determine if multilib is avalible.
 ###
 MULTILIB_SUPPORTED?=   unknown
-.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
+.if ${MACHINE_PLATFORM:MLinux-*-x86_64}
 .  if exists(/usr/include/x86_64-linux-gnu/gnu)
 _GNU_INCLUDE_DIR=      /usr/include/x86_64-linux-gnu/gnu
 .  else
@@ -54,7 +56,7 @@ PKG_SUGGESTED_OPTIONS+=       gcc-multilib
 
 .  for _libdir_ in ${_OPSYS_LIB_DIRS}
 .    if exists(${_libdir_})
-BASE_LIBGCC!=                  find ${_libdir_} -name libgcc_s.so
+BASE_LIBGCC!=                  find ${_libdir_} -name libgcc_s.so 2> /dev/null
 BASE_LIBGCC_MATCH_STRING!=     ${ECHO} ${BASE_LIBGCC} ${GCC12_DIST_VERSION} | \
                                ${AWK} -f ../../mk/scripts/larger_symbol_version.awk
 .      if ${BASE_LIBGCC_MATCH_STRING:Mnewer}
@@ -114,6 +116,7 @@ LIBS.SunOS+=                -lgmp
 .  include "../../math/mpfr/buildlink3.mk"
 .endif
 
+
 ###
 ### Graphite Support
 ###

Added files:

Index: pkgsrc/lang/gcc12/Makefile.common
diff -u /dev/null pkgsrc/lang/gcc12/Makefile.common:1.1
--- /dev/null   Fri Apr  7 06:48:27 2023
+++ pkgsrc/lang/gcc12/Makefile.common   Fri Apr  7 06:48:27 2023
@@ -0,0 +1,153 @@
+# $NetBSD: Makefile.common,v 1.1 2023/04/07 06:48:27 wiz Exp $
+# used by lang/gcc12-libjit/Makefile
+
+GCC_PKGNAME=           gcc12
+.include               "version.mk"
+
+DISTNAME=      gcc-${GCC12_DIST_VERSION}
+CATEGORIES=    lang
+MASTER_SITES=  ${MASTER_SITE_GNU:=gcc/gcc-${GCC12_DIST_VERSION}/}
+EXTRACT_SUFX=  .tar.xz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://gcc.gnu.org/
+LICENSE=       gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
+
+DISTFILES=             ${DEFAULT_DISTFILES}
+EXTRACT_ONLY=          ${DEFAULT_DISTFILES}
+
+PATCHDIR=              ${.CURDIR}/../../lang/gcc12/patches
+DISTINFO_FILE=         ${.CURDIR}/../../lang/gcc12/distinfo
+
+# Relocations result in a linker error on AArch64, but not x86.
+MKPIE_SUPPORTED=       no
+CHECK_RELRO_SKIP+=     ${GCC_PKGNAME}/lib/*
+
+NOT_FOR_PLATFORM=      Interix-*-*
+
+USE_LANGUAGES=         c99 c++
+USE_TOOLS+=            gmake makeinfo sed:run tar:build
+USE_TOOLS.NetBSD+=     gsed
+
+GNU_CONFIGURE=         yes
+GNU_CONFIGURE_STRICT=  no
+## Build outside ${WRKSRC}
+OBJDIR=                        ../build
+CONFIGURE_DIRS=                ${OBJDIR}
+CONFIGURE_SCRIPT=      ../${DISTNAME}/configure
+GCC_SUBPREFIX=         ${GCC_PKGNAME}
+GCC_PREFIX=            ${PREFIX}/${GCC_SUBPREFIX}
+GNU_CONFIGURE_PREFIX=  ${GCC_PREFIX}
+INFO_FILES=            yes
+CONFIGURE_ARGS+=       --disable-libstdcxx-pch
+
+UNLIMIT_RESOURCES+=    datasize
+UNLIMIT_RESOURCES+=    stacksize
+
+CHECK_PORTABILITY_SKIP+=       contrib/*
+CHECK_PORTABILITY_SKIP+=       gcc/configure.orig_dist
+
+.include "../../mk/bsd.prefs.mk"
+
+.include "options.mk"
+
+.if ${MACHINE_PLATFORM:MDarwin-*-aarch64}
+BUILDLINK_TRANSFORM+=  rm:-nodefaultrpaths
+CONFIGURE_ARGS+=       --disable-darwin-at-rpath
+PATCHFILES=            gcc-12.2.0-arm.diff
+PATCH_SITES=           https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/
+PATCH_DIST_STRIP=      -p1
+.endif
+
+## For graphite support.
+.if !empty(PKG_OPTIONS:Mgcc-graphite)
+
+post-extract:
+       ${TAR} -jxf ${DISTDIR}/${ISL16}.tar.bz2 -C ${WRKSRC}
+       ${MV} ${WRKSRC}/${ISL16} ${WRKSRC}/isl
+.endif
+
+CONFIGURE_ARGS+=       --enable-long-long
+CONFIGURE_ARGS+=       --with-local-prefix=${GCC_PREFIX:Q}
+CONFIGURE_ARGS+=       --enable-threads=posix
+CONFIGURE_ARGS+=       --with-boot-ldflags=${BOOT_LDFLAGS:Q}
+CONFIGURE_ARGS+=       --without-zstd
+# causes build errors even when using lang/gcc12 to self-host.
+CONFIGURE_ARGS.SunOS+= --disable-libsanitizer
+# multilib on Darwin requires fat-binaries
+CONFIGURE_ARGS.Darwin+=        --disable-multilib
+.if !empty(OSX_SDK_PATH)
+CONFIGURE_ARGS.Darwin+=        --with-sysroot=${OSX_SDK_PATH}
+.endif
+CONFIGURE_ARGS.NetBSD+=        --with-gnu-ld --with-ld=/usr/bin/ld
+CONFIGURE_ARGS.NetBSD+=        --with-gnu-as --with-as=/usr/bin/as
+MAKE_ENV.NetBSD+=      ac_cv_func_clock_gettime=yes
+MAKE_ENV.NetBSD+=      ac_cv_func_gethostbyname_r=no
+MAKE_ENV.NetBSD+=      ac_cv_func_freelocale=no
+MAKE_ENV.NetBSD+=      ac_cv_func_newlocale=no
+MAKE_ENV.NetBSD+=      ac_cv_func_uselocale=no
+MAKE_ENV.SunOS+=       ac_cv_func_mkostemp=no
+
+.if !empty(PKGSRC_COMPILER:Mclang) || ${OPSYS} == "DragonFly"
+CONFIGURE_ARGS+=       --disable-bootstrap
+.endif
+
+.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
+
+pre-configure:
+       ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
+
+CHECK_BUILTIN.zlib:= yes
+.include "../../devel/zlib/builtin.mk"
+CHECK_BUILTIN.zlib:= no
+.if ${USE_BUILTIN.zlib:tl} == yes
+CONFIGURE_ARGS+=       --with-system-zlib
+.else
+CONFIGURE_ARGS+=       --without-system-zlib
+.endif
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"



Home | Main Index | Thread Index | Old Index