You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by ro...@apache.org on 2026/09/03 17:07:23 UTC

(axis-axis2-c-core) 01/04: Set the char signedness flag in the remaining sub-packages

This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git

commit 07e1bc2285c07b672f8b834d2e9d0b1b321969fe
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Thu Sep 3 04:00:34 2026 -1000

    Set the char signedness flag in the remaining sub-packages
    
    samples, tools/md5 and tools/tcpmon have their own GCC flag blocks and were
    missed by the previous commit. samples builds with -Werror, so it gets
    -fsigned-char only -- a signedness warning there would fail the build rather
    than inform anyone. tools/tcpmon is not built at all; the edit is for
    consistency if it is ever revived.
    
    Co-Authored-By: Claude <no...@anthropic.com>
---
 docs/HTTP2_ANDROID.md     | 14 ++++++++++++--
 samples/configure.ac      | 11 +++++++++++
 tools/md5/configure.ac    |  8 ++++++++
 tools/tcpmon/configure.ac |  8 ++++++++
 4 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/docs/HTTP2_ANDROID.md b/docs/HTTP2_ANDROID.md
index daeb5d0e5..3534f43a7 100644
--- a/docs/HTTP2_ANDROID.md
+++ b/docs/HTTP2_ANDROID.md
@@ -39,10 +39,20 @@ if test "$GCC" = "yes"; then
 fi
 ```
 
-All eight configure.ac files carry their own `-std=gnu99` block:
+Eight configure.ac files carry their own `-std=gnu99` block, but only seven are
+live:
 
 - `configure.ac` (root), `util/`, `axiom/`, `neethi/`, `guththila/`,
-  `samples/`, `tools/md5/`, `tools/tcpmon/`
+  `samples/`, `tools/md5/`
+- `tools/tcpmon/` is **not built**. It was dropped from the root `Makefile.am`
+  in January 2026 ("TCP transport obsolete, use HTTP/2 instead"), but its 27
+  files were left in the tree, so its configure.ac is never run. Edits there
+  have no effect.
+
+`samples/` builds with `-Werror`, so warning flags must not be added to it
+casually — a warning in a sample would fail the build rather than inform
+anyone. It gets `-fsigned-char` (a codegen flag, no warning risk) but not
+`-Wsign-compare`.
 
 **Each sub-package must set the hardening flags itself.** `util`, `axiom`,
 `neethi` and `guththila` are separate packages configured through
diff --git a/samples/configure.ac b/samples/configure.ac
index 7fcfd78bd..c01aca2d5 100644
--- a/samples/configure.ac
+++ b/samples/configure.ac
@@ -77,6 +77,17 @@ AC_MSG_RESULT([$android_build])
 if test "$GCC" = "yes"; then
     dnl Use gnu99 for json-c compatibility
     CFLAGS="$CFLAGS -std=gnu99 -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE"
+    dnl Set here rather than inherited: this is a separate package configured
+    dnl through AC_CONFIG_SUBDIRS, which does not pick up CFLAGS additions the
+    dnl root configure makes to its own shell variable. Keep in step with the
+    dnl root configure.ac.
+    dnl -fsigned-char: axis2_char_t is plain char, signed on x86 and unsigned on
+    dnl ARM. See docs/HTTP2_ANDROID.md.
+    dnl -Wsign-compare is deliberately NOT added here: this package builds
+    dnl with -Werror, so a signedness warning in a sample would fail the
+    dnl build rather than inform anyone.
+    CFLAGS="$CFLAGS -fsigned-char"
+    CXXFLAGS="$CXXFLAGS -fsigned-char"
 fi
 
 AC_MSG_CHECKING(whether to set -Werror)
diff --git a/tools/md5/configure.ac b/tools/md5/configure.ac
index 860e5f41c..dec02e0da 100644
--- a/tools/md5/configure.ac
+++ b/tools/md5/configure.ac
@@ -48,6 +48,14 @@ AC_MSG_RESULT([$android_build])
 if test "$GCC" = "yes"; then
     dnl Use gnu99 for json-c compatibility
     CFLAGS="$CFLAGS -std=gnu99 -Wall -Wno-implicit-function-declaration"
+    dnl Set here rather than inherited: this is a separate package configured
+    dnl through AC_CONFIG_SUBDIRS, which does not pick up CFLAGS additions the
+    dnl root configure makes to its own shell variable. Keep in step with the
+    dnl root configure.ac.
+    dnl -fsigned-char: axis2_char_t is plain char, signed on x86 and unsigned on
+    dnl ARM. See docs/HTTP2_ANDROID.md.
+    CFLAGS="$CFLAGS -Wformat-security -Wsign-compare -fsigned-char"
+    CXXFLAGS="$CXXFLAGS -fsigned-char"
 fi
 
 
diff --git a/tools/tcpmon/configure.ac b/tools/tcpmon/configure.ac
index cafaa7796..c249b0f93 100644
--- a/tools/tcpmon/configure.ac
+++ b/tools/tcpmon/configure.ac
@@ -48,6 +48,14 @@ AC_MSG_RESULT([$android_build])
 if test "$GCC" = "yes"; then
     dnl Use gnu99 for json-c compatibility
     CFLAGS="$CFLAGS -std=gnu99 -Wall -Wno-implicit-function-declaration -g"
+    dnl Set here rather than inherited: this is a separate package configured
+    dnl through AC_CONFIG_SUBDIRS, which does not pick up CFLAGS additions the
+    dnl root configure makes to its own shell variable. Keep in step with the
+    dnl root configure.ac.
+    dnl -fsigned-char: axis2_char_t is plain char, signed on x86 and unsigned on
+    dnl ARM. See docs/HTTP2_ANDROID.md.
+    CFLAGS="$CFLAGS -Wformat-security -Wsign-compare -fsigned-char"
+    CXXFLAGS="$CXXFLAGS -fsigned-char"
 fi