pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang



Module Name:    pkgsrc
Committed By:   tnn
Date:           Sun Mar 27 15:06:11 UTC 2022

Modified Files:
        pkgsrc/lang/gcc10: Makefile
        pkgsrc/lang/gcc10-aux: Makefile
        pkgsrc/lang/gcc9: Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/gcc10/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc10-aux/Makefile
cvs rdiff -u -r1.35 -r1.36 pkgsrc/lang/gcc9/Makefile

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

Modified files:

Index: pkgsrc/lang/gcc10/Makefile
diff -u pkgsrc/lang/gcc10/Makefile:1.15 pkgsrc/lang/gcc10/Makefile:1.16
--- pkgsrc/lang/gcc10/Makefile:1.15     Thu Mar 10 16:43:11 2022
+++ pkgsrc/lang/gcc10/Makefile  Sun Mar 27 15:06:11 2022
@@ -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+=    --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+=       --with-system-zlib
 CONFIGURE_ARGS+=       --without-zstd
 # multilib on Darwin requires fat-binaries
 CONFIGURE_ARGS.Darwin+=        --disable-multilib
@@ -199,7 +198,14 @@ GENERATE_PLIST+= \
        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"

Index: pkgsrc/lang/gcc10-aux/Makefile
diff -u pkgsrc/lang/gcc10-aux/Makefile:1.1 pkgsrc/lang/gcc10-aux/Makefile:1.2
--- pkgsrc/lang/gcc10-aux/Makefile:1.1  Sun Mar 13 08:34:04 2022
+++ pkgsrc/lang/gcc10-aux/Makefile      Sun Mar 27 15:06:11 2022
@@ -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+=    --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+=       --with-system-zlib
 CONFIGURE_ARGS+=       --without-zstd
 # multilib on Darwin requires fat-binaries
 CONFIGURE_ARGS.Darwin+=        --disable-multilib
@@ -202,9 +201,16 @@ 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 !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"

Index: pkgsrc/lang/gcc9/Makefile
diff -u pkgsrc/lang/gcc9/Makefile:1.35 pkgsrc/lang/gcc9/Makefile:1.36
--- pkgsrc/lang/gcc9/Makefile:1.35      Thu Mar 10 16:43:11 2022
+++ pkgsrc/lang/gcc9/Makefile   Sun Mar 27 15:06:11 2022
@@ -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 @@ GCC9_PREFIX=          ${PREFIX}/${GCC9_SUBPREFIX
 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 @@ GENERATE_PLIST+= \
        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