[vlc-devel] [PATCH 2/3] contrib: Add support for cross compilation with meson

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Sep 26 09:41:09 CEST 2018



On Wed, Sep 26, 2018, at 8:03 AM, Steve Lhomme wrote:
> 
> 
> On 25/09/2018 18:11, Hugo Beauzée-Luyssen wrote:
> > ---
> >   contrib/src/main.mak | 36 +++++++++++++++++++++++++++++++++++-
> >   1 file changed, 35 insertions(+), 1 deletion(-)
> >
> > diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> > index 0f8b51088f..71972fc896 100644
> > --- a/contrib/src/main.mak
> > +++ b/contrib/src/main.mak
> > @@ -286,7 +286,7 @@ HOSTTOOLS := \
> >   	CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
> >   	AR="$(AR)" CCAS="$(CCAS)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
> >   	PATH="$(PREFIX)/bin:$(PATH)"
> > -HOSTVARS := $(HOSTTOOLS) \
> > +HOSTVARS := \
> >   	CPPFLAGS="$(CPPFLAGS)" \
> >   	CFLAGS="$(CFLAGS)" \
> >   	CXXFLAGS="$(CXXFLAGS)" \
> > @@ -297,6 +297,11 @@ HOSTVARS_PIC := $(HOSTTOOLS) \
> >   	CXXFLAGS="$(CXXFLAGS) $(PIC)" \
> >   	LDFLAGS="$(LDFLAGS)"
> >   
> > +# Keep a version of HOSTVARS without the tools, since meson requires the
> > +# tools variables to point to the native ones
> > +HOSTVARS_NOTOOLS := $(HOSTVARS)
> > +HOSTVARS := $(HOSTTOOLS) $(HOSTVARS)
> > +
> 
> Does it support cross-compilation ? Also the flags for the native 
> compiler may not be the same as the ones for $(CC).
> 

I'm not sure I understand your question.
Good point about the flags, although AFAICS we don't check for compiler specific flags in the contribs, but should we want to do that, I guess we might as well switch to an full fledged build system for the contribs as well

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list