pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang gcc*: only use system zlib if it is native, else ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/229970ca7130
branches: trunk
changeset: 375818:229970ca7130
user: tnn <tnn%pkgsrc.org@localhost>
date: Sun Mar 27 15:06:11 2022 +0000
description:
gcc*: only use system zlib if it is native, else use bundled
This is the logic we have in gcc8. Replicate it to newer GCC packages.
Using pkgsrc zlib causes problems linking gcov(1) on at least Linux
and SunOS. It is not worth bend-over-backwards rpath-patching.
diffstat:
lang/gcc10-aux/Makefile | 12 +++++++++---
lang/gcc10/Makefile | 12 +++++++++---
lang/gcc9/Makefile | 12 +++++++++---
3 files changed, 27 insertions(+), 9 deletions(-)
diffs (102 lines):
diff -r 81f275186e38 -r 229970ca7130 lang/gcc10-aux/Makefile
--- a/lang/gcc10-aux/Makefile Sun Mar 27 15:01:09 2022 +0000
+++ b/lang/gcc10-aux/Makefile Sun Mar 27 15:06:11 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2022/03/13 08:34:04 nia Exp $
+# $NetBSD: Makefile,v 1.2 2022/03/27 15:06:11 tnn Exp $
GCC_PKGNAME= gcc10-aux
.include "version.mk"
@@ -111,7 +111,6 @@
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+= --enable-threads=posix
CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q}
-CONFIGURE_ARGS+= --with-system-zlib
CONFIGURE_ARGS+= --without-zstd
# multilib on Darwin requires fat-binaries
CONFIGURE_ARGS.Darwin+= --disable-multilib
@@ -202,9 +201,16 @@
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 !empty(USE_BUILTIN.zlib:M[yY][eE][sS])
+CONFIGURE_ARGS+= --with-system-zlib
+.else
+CONFIGURE_ARGS+= --without-system-zlib
+.endif
# Add gcc6-aux as an explicit dependency. It is needed to bootstrap.
.include "../../lang/gcc6-aux/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 81f275186e38 -r 229970ca7130 lang/gcc10/Makefile
--- a/lang/gcc10/Makefile Sun Mar 27 15:01:09 2022 +0000
+++ b/lang/gcc10/Makefile Sun Mar 27 15:06:11 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2022/03/10 16:43:11 nia Exp $
+# $NetBSD: Makefile,v 1.16 2022/03/27 15:06:11 tnn Exp $
GCC_PKGNAME= gcc10
PKGREVISION= 1
@@ -108,7 +108,6 @@
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+= --enable-threads=posix
CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q}
-CONFIGURE_ARGS+= --with-system-zlib
CONFIGURE_ARGS+= --without-zstd
# multilib on Darwin requires fat-binaries
CONFIGURE_ARGS.Darwin+= --disable-multilib
@@ -199,7 +198,14 @@
cd ${DESTDIR}${PREFIX} && \
${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT};
-.include "../../devel/zlib/buildlink3.mk"
+CHECK_BUILTIN.zlib:= yes
+.include "../../devel/zlib/builtin.mk"
+CHECK_BUILTIN.zlib:= no
+.if !empty(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"
diff -r 81f275186e38 -r 229970ca7130 lang/gcc9/Makefile
--- a/lang/gcc9/Makefile Sun Mar 27 15:01:09 2022 +0000
+++ b/lang/gcc9/Makefile Sun Mar 27 15:06:11 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2022/03/10 16:43:11 nia Exp $
+# $NetBSD: Makefile,v 1.36 2022/03/27 15:06:11 tnn Exp $
GCC_PKGNAME= gcc9
.include "version.mk"
@@ -40,8 +40,6 @@
GNU_CONFIGURE_PREFIX= ${GCC9_PREFIX}
INFO_FILES= yes
CONFIGURE_ARGS+= --disable-libstdcxx-pch
-CONFIGURE_ARGS+= --with-system-zlib
-CONFIGURE_ARGS.Linux+= --without-system-zlib # to prevent "-lz not found"
UNLIMIT_RESOURCES= datasize stacksize
@@ -204,7 +202,15 @@
cd ${DESTDIR}${PREFIX} && \
${FIND} ${GCC9_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT};
+CHECK_BUILTIN.zlib:= yes
+.include "../../devel/zlib/builtin.mk"
+CHECK_BUILTIN.zlib:= no
+.if !empty(USE_BUILTIN.zlib:M[yY][eE][sS])
+CONFIGURE_ARGS+= --with-system-zlib
.include "../../devel/zlib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-system-zlib
+.endif
.include "../../lang/python/application.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
Home |
Main Index |
Thread Index |
Old Index