From 5cd9059618a0810ee47c21e6b44c5a876b75e23d Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Sun, 2 Aug 2020 09:57:39 -0400 Subject: build: undefine "mips" to prevent build problems for MIPS targets It turns out that the MIPS GCC compiler defines a "mips" cpp macro which was resulting in build failures on MIPS so we need to undefine the "mips" macro during build. As this should be safe to do in all architectures, just add it to the compiler flags by default. This was reported in the following GH issue: * https://github.com/seccomp/libseccomp/issues/274 Reported-by: Rongwei Zhang Suggested-by: Rongwei Zhang Acked-by: Tom Hromatka Signed-off-by: Paul Moore --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 40d9dcb..3e87734 100644 --- a/configure.ac +++ b/configure.ac @@ -65,9 +65,11 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl #### dnl build flags +dnl NOTE: the '-Umips' is here because MIPS GCC compilers "helpfully" define it +dnl for us which wreaks havoc on the build dnl #### AM_CPPFLAGS="-I\${top_srcdir}/include -I\${top_builddir}/include" -AM_CFLAGS="-Wall" +AM_CFLAGS="-Wall -Umips" AM_LDFLAGS="-Wl,-z -Wl,relro" AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_CFLAGS]) -- cgit v1.2.1