Source: openipmi
Version: 2.0.37-1
X-Debbugs-Cc: [email protected], [email protected]
User: [email protected]
Usertags: arm64
User: [email protected]
Usertags: amd64
User: [email protected]
Usertags: ftcbfs
openipmi fails to cross build from source, because it passes host
compiler flags to the build architecture compiler. This breaks when
building for amd64 or arm64, because those architectures have unique
compiler flags that are not accepted by other compilers. I'm attaching a
patch to differentiate those flags.
Helmut
--- openipmi-2.0.37.orig/configure.ac
+++ openipmi-2.0.37/configure.ac
@@ -761,8 +761,10 @@
AC_CHECK_PROGS(BUILD_CC, [${build_alias}-gcc ${build}-gcc gcc])
else
BUILD_CC="$CC"
+ BUILD_CFLAGS="$CFLAGS"
fi
AC_SUBST([BUILD_CC])
+AC_SUBST([BUILD_CFLAGS])
AC_CONFIG_FILES([Makefile
utils/Makefile
--- openipmi-2.0.37.orig/lanserv/sdrcomp/Makefile.am
+++ openipmi-2.0.37/lanserv/sdrcomp/Makefile.am
@@ -19,4 +19,4 @@
$(top_srcdir)/utils/string.c
BUILD_SDRCOMP_SRCS = $(top_srcdir)/$(subdir)/sdrcomp.c
sdrcomp_build$(EXEEXT): $(BUILD_SDRCOMP_SRCS) $(BUILD_SDRCOMP_DEPS)
- $(BUILD_CC) -o $@ $(BUILD_SDRCOMP_SRCS) $(CFLAGS) $(AM_CFLAGS) -lm
+ $(BUILD_CC) -o $@ $(BUILD_SDRCOMP_SRCS) $(BUILD_CFLAGS) $(AM_CFLAGS) -lm