On Sun, Dec 03, 2023 at 11:10:35AM +0100, Helmut Grohne wrote: > So here is a patch for dash that adds CFLAGS_FOR_BUILD support and thus > solves this instance. I think there are many more of this and appreciate > help with fixing them. Thanks in advance.
IRC user punit made me aware of a typo in the patch. Helmut
--- dash-0.5.12.orig/configure.ac +++ dash-0.5.12/configure.ac @@ -15,11 +15,17 @@ AC_MSG_CHECKING([for build system compiler]) if test "$cross_compiling" = yes; then CC_FOR_BUILD=${CC_FOR_BUILD-cc} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-} else CC_FOR_BUILD=${CC} + CFLAGS_FOR_BUILD=${CFLAGS} + CPPFLAGS_FOR_BUILD=${CPPFLAGS} fi AC_MSG_RESULT(${CC_FOR_BUILD}) AC_SUBST(CC_FOR_BUILD) +AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(CPPFLAGS_FOR_BUILD) AC_MSG_CHECKING([for __attribute__((__alias__()))]) dash_cv_have_attribute_alias=no --- dash-0.5.12.orig/src/Makefile.am +++ dash-0.5.12/src/Makefile.am @@ -12,7 +12,7 @@ COMPILE_FOR_BUILD = \ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \ $(CPPFLAGS_FOR_BUILD) \ - $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ + $(LDFLAGS) \ $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) bin_PROGRAMS = dash