[Mesa-dev] [Mesa-stable] [PATCH] configure.ac: detect LLVM patch level when built via cmake

Tom Stellard tom at stellard.net
Wed Sep 17 07:03:56 PDT 2014


On Wed, Sep 17, 2014 at 09:29:34PM +1000, Jonathan Gray wrote:
> On Tue, Sep 16, 2014 at 06:24:40PM -0400, Tom Stellard wrote:
> > On Tue, Sep 09, 2014 at 07:56:03PM +0100, Emil Velikov wrote:
> > > On 09/09/14 16:26, Tom Stellard wrote:
> > > > On Sat, Sep 06, 2014 at 01:43:55AM +1000, Jonathan Gray wrote:
> > > >> In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h when
> > > >> LLVM was built via autoconf and not when it was built with cmake.
> > > >> Fall back to retrieving the patch level from llvm-config --version to
> > > >> handle this case.
> > > >>
> > > > 
> > > > We should extract LLVM_VERSION_PATH from $LLVM_VERSION and then we won't
> > > > have to worry about which config file it is in.
> > > > 
> > > I believe you meant VERSION_PATCH above ? Indeed that would nice thing to have
> > > but I doubt that it will get back-ported to the llvm 3.4 branch.
> > > 
> > 
> > I mean we should do this in Mesa's configure script.  Something like:
> > 
> > LLVM_VERSION_PATCH = echo $LLVM_VERSION | sed 's/^[0-9]\+\.[0-9]\+\.//g'
> 
> This should be
> 
> LLVM_VERSION_PATCH = echo $LLVM_VERSION | sed -E 's/^[0-9]+\.[0-9]+\.//g'
> 
> $ echo 3.4.2 | sed 's/^[0-9]\+\.[0-9]\+\.//g'     
> 3.4.2
> 
> $ echo 3.4.2 | sed -E 's/^[0-9]+\.[0-9]+\.//g'  
> 2
> 
> $ echo 3.4.2 | gsed 's/^[0-9]\+\.[0-9]\+\.//g'
> 2
> 
> $ echo 3.4.2 | gsed -E 's/^[0-9]+\.[0-9]+\.//g'
> 2

Which of these examples are *BSD compatible?

-Tom


More information about the mesa-dev mailing list