From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: thomas.de_schampheleire@nokia.com
Subject: [ebtables PATCH 2/2] configure.ac: add option --enable-kernel-64-userland-32
Date: Tue, 18 May 2021 20:17:30 +0200 [thread overview]
Message-ID: <20210518181730.13436-2-patrickdepinguin@gmail.com> (raw)
In-Reply-To: <20210518181730.13436-1-patrickdepinguin@gmail.com>
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
The ebtables build system seems to assume that 'sparc64' is the
only case where KERNEL_64_USERSPACE_32 is relevant, but this is not true.
This situation can happen on many architectures, especially in embedded
systems. For example, an Aarch64 processor with kernel in 64-bit but
userland built for 32-bit Arm. Or a 64-bit MIPS Octeon III processor, with
userland running in the 'n32' ABI.
While it is possible to set CFLAGS in the environment when calling the
configure script, the caller would need to know to not only specify
KERNEL_64_USERSPACE_32 but also the EBT_MIN_ALIGN value.
Instead, add a configure option. All internal details can then be handled by
the configure script.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
configure.ac | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c24ede3..3e89c0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,10 +15,17 @@ AS_IF([test "x$LOCKFILE" = x], [LOCKFILE="/var/lib/ebtables/lock"])
regular_CFLAGS="-Wall -Wunused"
regular_CPPFLAGS=""
+
case "$host" in
sparc64-*)
- regular_CPPFLAGS="$regular_CPPFLAGS -DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32";;
+ enable_kernel_64_userland_32=yes ;;
esac
+AC_ARG_ENABLE([kernel-64-userland-32],
+ AC_HELP_STRING([--enable-kernel-64-userland-32], [indicate that ebtables will be built as a 32-bit application but run under a 64-bit kernel])
+)
+AS_IF([test "x$enable_kernel_64_userland_32" = xyes],
+ [regular_CPPFLAGS="$regular_CPPFLAGS -DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32"]
+)
AC_SUBST([regular_CFLAGS])
AC_SUBST([regular_CPPFLAGS])
--
2.26.3
next prev parent reply other threads:[~2021-05-18 18:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 18:17 [ebtables PATCH 1/2] ebtables.h: restore KERNEL_64_USERSPACE_32 checks Thomas De Schampheleire
2021-05-18 18:17 ` Thomas De Schampheleire [this message]
2021-05-24 15:26 ` [ebtables PATCH 2/2] configure.ac: add option --enable-kernel-64-userland-32 Pablo Neira Ayuso
2021-05-25 11:52 ` Thomas De Schampheleire
2021-05-27 19:30 ` Pablo Neira Ayuso
2021-05-28 17:10 ` Florian Westphal
2021-05-31 12:11 ` Thomas De Schampheleire
2021-06-01 14:50 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210518181730.13436-2-patrickdepinguin@gmail.com \
--to=patrickdepinguin@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=thomas.de_schampheleire@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).