gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4742-gf10f4af3


From: Arnold Robbins
Subject: [SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4742-gf10f4af3
Date: Fri, 10 Jun 2022 07:55:17 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/pma2 has been updated
       via  f10f4af373c7ace425f2af9a68f5d6f4daa52bb3 (commit)
      from  920119080d877186165506ba819a548a5ea4ae85 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=f10f4af373c7ace425f2af9a68f5d6f4daa52bb3

commit f10f4af373c7ace425f2af9a68f5d6f4daa52bb3
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Fri Jun 10 14:54:54 2022 +0300

    Get persistent stuff working!

diff --git a/ChangeLog b/ChangeLog
index 85b5819f..af25bb6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,8 +4,9 @@
        * main.c (main): Check for error from pma_init. Set
        using_persistent_malloc.
        * symbol.c (init_symbol_table): Check using_persistent_malloc
-       appropriately.
+       appropriately. Adjust the flow for it.
        * NEWS: Updated.
+       * Makefile.am (LDADD): Add $(LDFLAGS).
 
 2022-06-09         Arnold D. Robbins     <arnold@skeeve.com>
 
diff --git a/Makefile.am b/Makefile.am
index 5e38aac2..4808fdb5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,7 +115,8 @@ gawk_SOURCES = $(base_sources)
 
 # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
 LDADD = support/libsupport.a \
-       $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR)
+       $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) \
+       $(LDFLAGS)
 
 # Directory for gawk's data files. Automake supplies datadir.
 pkgdatadir = $(datadir)/awk
diff --git a/Makefile.in b/Makefile.in
index 7aee5e87..597f3a8b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,7 +160,8 @@ gawk_LDADD = $(LDADD)
 am__DEPENDENCIES_1 =
 gawk_DEPENDENCIES = support/libsupport.a $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -558,7 +559,8 @@ gawk_SOURCES = $(base_sources)
 
 # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
 LDADD = support/libsupport.a \
-       $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR)
+       $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) \
+       $(LDFLAGS)
 
 
 # stuff for compiling gawk/pgawk
diff --git a/configure b/configure
index e37a108e..cb4954b9 100755
--- a/configure
+++ b/configure
@@ -12539,6 +12539,8 @@ fi
 printf "%s\n" "#define USE_PERSISTENT_MALLOC 1" >>confdefs.h
 
        use_persistent_malloc=yes
+       LDFLAGS="${LDFLAGS} -no-pie"
+       export LDFLAGS
   else
        use_persistent_malloc=no
   fi
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 1bb79033..dde3beec 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2022-06-10         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * pma.m4: Add -no-pie to LDFLAGS for persistent malloc.
+
 2022-06-09         Arnold D. Robbins     <arnold@skeeve.com>
 
        * pma.m4: New file.
diff --git a/m4/pma.m4 b/m4/pma.m4
index 388808ea..bf25d9a1 100644
--- a/m4/pma.m4
+++ b/m4/pma.m4
@@ -13,6 +13,8 @@ AC_DEFUN([GAWK_USE_PERSISTENT_MALLOC],
   then
        AC_DEFINE(USE_PERSISTENT_MALLOC, 1, [Define to 1 if we can use the pma 
allocator])
        use_persistent_malloc=yes
+       LDFLAGS="${LDFLAGS} -no-pie"
+       export LDFLAGS
   else
        use_persistent_malloc=no
   fi
diff --git a/symbol.c b/symbol.c
index 9b158f6e..5ac5656d 100644
--- a/symbol.c
+++ b/symbol.c
@@ -62,7 +62,9 @@ init_symbol_table()
                if (pma_root_node != NULL) {
                        global_table = pma_root_node;
                }
-       } else {
+       }
+
+       if (global_table == NULL) {
                getnode(global_table);
                memset(global_table, '\0', sizeof(NODE));
                null_array(global_table);
@@ -75,9 +77,9 @@ init_symbol_table()
        installing_specials = true;
        func_table = install_symbol(estrdup("FUNCTAB", 7), Node_var_array);
 
-       if (using_persistent_malloc && pma_root_node != NULL) {
+       if (using_persistent_malloc && pma_root_node != NULL)
                symbol_table = lookup("SYMTAB");
-       } else
+       else
                symbol_table = install_symbol(estrdup("SYMTAB", 6), 
Node_var_array);
 
        installing_specials = false;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    | 3 ++-
 Makefile.am  | 3 ++-
 Makefile.in  | 6 ++++--
 configure    | 2 ++
 m4/ChangeLog | 4 ++++
 m4/pma.m4    | 2 ++
 symbol.c     | 8 +++++---
 7 files changed, 21 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]