pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/pgtclng pgtclng: Fix RELRO builds



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2894dcbeaa70
branches:  trunk
changeset: 385517:2894dcbeaa70
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Sep 18 13:03:11 2022 +0000

description:
pgtclng: Fix RELRO builds

diffstat:

 databases/pgtclng/distinfo         |   4 ++--
 databases/pgtclng/patches/patch-ab |  36 +++++++++++++++++++++++++++++++++---
 2 files changed, 35 insertions(+), 5 deletions(-)

diffs (74 lines):

diff -r 3159e223293a -r 2894dcbeaa70 databases/pgtclng/distinfo
--- a/databases/pgtclng/distinfo        Sun Sep 18 12:57:40 2022 +0000
+++ b/databases/pgtclng/distinfo        Sun Sep 18 13:03:11 2022 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.7 2021/10/26 10:09:44 nia Exp $
+$NetBSD: distinfo,v 1.8 2022/09/18 13:03:11 nia Exp $
 
 BLAKE2s (pgtcl1.5.3.tar.gz) = a8431cad17bf27b64021c2c235db2bd8b097244f5154384a33d71f8be42df637
 SHA512 (pgtcl1.5.3.tar.gz) = 6d0e5030d7aa84fd1ca52044204d905e5c3486ac09f4c7f4f8197d99b9be80df7f8926b146d752799844130a59ea6ea524c6decfd86784991023056b2aff4183
 Size (pgtcl1.5.3.tar.gz) = 166300 bytes
-SHA1 (patch-ab) = 11b7c0d9a628bf28779c7e3c300c075f849f5246
+SHA1 (patch-ab) = 985dccf7ce2c76d387807bdf858ae901bc1b490a
diff -r 3159e223293a -r 2894dcbeaa70 databases/pgtclng/patches/patch-ab
--- a/databases/pgtclng/patches/patch-ab        Sun Sep 18 12:57:40 2022 +0000
+++ b/databases/pgtclng/patches/patch-ab        Sun Sep 18 13:03:11 2022 +0000
@@ -1,10 +1,27 @@
-$NetBSD: patch-ab,v 1.4 2019/11/02 15:46:05 rillig Exp $
+$NetBSD: patch-ab,v 1.5 2022/09/18 13:03:12 nia Exp $
 
+Link with the compiler so LDFLAGS applies properly.
 Add support for DragonFly.
 
 --- configure.orig     2006-09-10 00:32:55.000000000 +0000
 +++ configure
-@@ -7381,7 +7381,7 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6
+@@ -7279,13 +7279,13 @@ echo "$as_me: WARNING: 64bit mode not su
+       NetBSD-*|FreeBSD-[1-2].*)
+           # NetBSD/SPARC needs -fPIC, -fpic will not do.
+           SHLIB_CFLAGS="-fPIC"
+-          SHLIB_LD="ld -Bshareable -x"
++          SHLIB_LD="cc -shared"
+           SHLIB_LD_LIBS='${LIBS}'
+           SHLIB_SUFFIX=".so"
+           DL_OBJS="tclLoadDl.o"
+           DL_LIBS=""
+           CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR},-rpath,${LIB_PGTCL_RUNTIME_DIR}'
+-          LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR} -rpath ${LIB_PGTCL_RUNTIME_DIR}'
++          LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR} -Wl,-R${LIB_PGTCL_RUNTIME_DIR}'
+           echo "$as_me:$LINENO: checking for ELF" >&5
+ echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+ if test "${tcl_cv_ld_elf+set}" = set; then
+@@ -7381,10 +7381,10 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6
            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
            TCL_LIB_VERSIONS_OK=nodots
            ;;
@@ -12,7 +29,11 @@
 +      FreeBSD-*|DragonFly-*)
            # FreeBSD 3.* and greater have ELF.
            SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="ld -Bshareable -x"
+-          SHLIB_LD="ld -Bshareable -x"
++          SHLIB_LD="cc $LDFLAGS -shared"
+           SHLIB_LD_LIBS='${LIBS}'
+           SHLIB_SUFFIX=".so"
+           DL_OBJS="tclLoadDl.o"
 @@ -7398,14 +7398,9 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6
                CFLAGS="$CFLAGS -pthread"
                LDFLAGS="$LDFLAGS -pthread"
@@ -31,6 +52,15 @@
            ;;
        Darwin-*)
            CFLAGS_OPTIMIZE="-Os"
+@@ -7639,7 +7634,7 @@ _ACEOF
+           # QNX RTP
+           # This may work for all QNX, but it was only reported for v6.
+           SHLIB_CFLAGS="-fPIC"
+-          SHLIB_LD="ld -Bshareable -x"
++          SHLIB_LD="cc -shared"
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           DL_OBJS="tclLoadDl.o"
 @@ -7941,7 +7936,7 @@ fi;
                    ;;
                IRIX*)



Home | Main Index | Thread Index | Old Index