[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Request for help] mash



Hi Nilesh,

On Thu, Mar 11, 2021 at 02:49:59AM +0530, Nilesh Patra wrote:
> I've attached a patch towards the end, and would really appreciate
> another review

Looks good except for one aspect.

> > Also running uname -s in Makefile.in is bad (for cross compilation).
> > Such detection should happen at configure time and the resulting value
> > should be substituted (e.g. using AC_SUBST).
> 
> Since it is _only_ used to determine if the machine is darwin or not, and
> passing some flags if it is -- this is practically useless for our
> usecase, so I purged it altogether

I'd hope that you want to upstream your Makefile.in changes instead of
keeping them in a Debian patch for eternity. This change may be faced
with resistance on the upstream side though. Consider replacing it with
something else:

configure.ac:

case ${host} in
	*-*-darwin*)
		DARWIN_CXXFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++"
	;;
	*)
		DARWIN_CXXFLAGS=""
	;;
esac
AC_SUBST(DARWIN_CXXFLAGS)

And then in Makefile.in:
CXXFLAGS += @DARWIN_CXXFLAGS@

Admittedly, this is a little difficult to test on Debian, but it is not
actually that hard to preserve the functionality in a cross-compatible
way.

Helmut


Reply to: