texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: XS build flags


From: Gavin D. Smith
Subject: branch master updated: XS build flags
Date: Mon, 20 Nov 2023 15:54:56 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 121d510410 XS build flags
121d510410 is described below

commit 121d5104101f8c7c5ef3fd8430b9b87fb48f59fe
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Nov 20 20:52:51 2023 +0000

    XS build flags
    
    * tp/Texinfo/XS/configure.ac (perl_conf_CFLAGS, perl_conf_LDFLAGS):
    Set and output with AC_SUBST.  Append to CFLAGS and LDFLAGS for
    checks only.
    * tp/Texinfo/XS/Makefile.am: Reuse perl_conf_CFLAGS and
    perl_conf_LDFLAGS.  This makes it clearer that we are adding the
    same flags for building as for configure checks.
---
 ChangeLog                  | 11 +++++++++++
 tp/Texinfo/XS/Makefile.am  |  4 ++--
 tp/Texinfo/XS/configure.ac | 16 +++++++++++++---
 3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 88bdd400a3..f880a6d3fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-11-20  Gavin Smith <gavinsmith0123@gmail.com>
+
+       XS build flags
+
+       * tp/Texinfo/XS/configure.ac (perl_conf_CFLAGS, perl_conf_LDFLAGS):
+       Set and output with AC_SUBST.  Append to CFLAGS and LDFLAGS for
+       checks only.
+       * tp/Texinfo/XS/Makefile.am: Reuse perl_conf_CFLAGS and
+       perl_conf_LDFLAGS.  This makes it clearer that we are adding the
+       same flags for building as for configure checks.
+
 2023-11-19  Patrice Dumas  <pertusus@free.fr>
 
        * tp/texi2any.supp: Add suppression specification for leaks and errors
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 6d91f121f4..92379f3181 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -49,7 +49,7 @@ XSUBPPARGS = -typemap $(PERL_CONF_privlibexp)/ExtUtils/typemap
 XSLIBS_CPPFLAGS = -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(VERSION)\"
 XSLIBS_CPPFLAGS += -I$(PERL_INC)
 
-XSLIBS_CFLAGS = $(PERL_CONF_ccflags) $(PERL_CONF_optimize) 
$(PERL_CONF_cccdlflags)
+XSLIBS_CFLAGS = $(perl_conf_CFLAGS)
 
 if HOST_NEEDS_NO_UNDEFINED
   PLATFORM_LDFLAGS = -no-undefined -L$(PERL_INC) $(PERL_CONF_libperl)
@@ -60,7 +60,7 @@ else
   PLATFORM_LDFLAGS =
 endif
 
-XSLIBS_LDFLAGS = -avoid-version -module $(PERL_CONF_ccdlflags)
+XSLIBS_LDFLAGS = -avoid-version -module $(perl_conf_LDFLAGS)
 XSLIBS_LDFLAGS += $(PLATFORM_LDFLAGS)
 
 
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index b3ae01ad08..a29da0ead4 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -68,6 +68,9 @@ AC_ARG_VAR([PERL_EXT_CPPFLAGS], [C preprocessor flags for a 
Perl extension])
 AC_ARG_VAR([PERL_EXT_LDFLAGS], [Linker flags for a Perl extension])
 AC_ARG_VAR([PERL_EXT_CC], [Compiler for a Perl extension])
 
+perl_conf_CFLAGS=
+perl_conf_LDFLAGS=
+
 # See (automake)Conditional Subdirectories.  Even if --disable-perl-xs
 # is given, we still need to configure this directory minimally, so that
 # "make dist" will work.
@@ -93,12 +96,16 @@ if test x$disable_xs != xyes; then
   # flags for linking the extension, e.g. -rpath.
   lookup_perl_conf([ccdlflags])
 
+  perl_conf_CFLAGS="$PERL_CONF_ccflags $PERL_CONF_optimize 
$PERL_CONF_cccdlflags"
+  perl_conf_LDFLAGS="$PERL_CONF_ccdlflags"
+
   # Override these variables set by configure at the top level, because 
   # the compiler used in this subdirectory might be different.
-  # Change these now so they are used in the checks that follow.
-  CFLAGS="$PERL_EXT_CFLAGS $PERL_CONF_ccflags $PERL_CONF_optimize 
$PERL_CONF_cccdlflags"
+  # Change these now so they are used in the checks that follow so that
+  # we are using the same flags for the checks as for the build.
+  CFLAGS="$PERL_EXT_CFLAGS $perl_conf_CFLAGS"
   CPPFLAGS=$PERL_EXT_CPPFLAGS
-  LDFLAGS="$PERL_EXT_LDFLAGS $PERL_CONF_ccdlflags"
+  LDFLAGS="$PERL_EXT_LDFLAGS $perl_conf_LDFLAGS"
   
   lookup_perl_conf([libperl])
   # Change libperl.so into -lperl to indicate a library dependency to 
@@ -114,6 +121,9 @@ if test x$disable_xs != xyes; then
   AC_CONFIG_HEADERS([config.h:config.in])
 fi # not disable_xs
 
+AC_SUBST([perl_conf_CFLAGS], [$perl_conf_CFLAGS])
+AC_SUBST([perl_conf_LDFLAGS], [$perl_conf_LDFLAGS])
+
 
 AC_PROG_CC
 



reply via email to

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