develooper Front page | perl.perl5.porters | Postings from June 2019

[perl #134189] configure: ubuntu without gcc

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
June 13, 2019 04:10
Subject:
[perl #134189] configure: ubuntu without gcc
Message ID:
rt-4.0.24-22322-1560399030-1273.134189-15-0@perl.org
On Tue, 11 Jun 2019 08:41:37 -0700, hv wrote:
> On Mon, 10 Jun 2019 14:06:38 -0700, ilmari wrote:
> > As far as I can tell there's no
> > Configure variable for this, but Configure has a comment that
> > ccname=gcc for clang
> 
> Sadly that doesn't appear to be the case here: after removing gcc{,-7}
> again to test, $ccname is empty when I try that here. The concept
> works though: using instead
>  +elif [ X"$cc" = Xclang ] ; then
>  +    gcc=$cc
> does give me a successful build.
> 
> I'm sure there are better ways to do this: we should at least allow
> for both 'clang' and '/usr/bin/clang'. I'd also be tempted to test
> this before '-x /usr/bin/gcc', on the assumption that if the invoker
> asked for clang we should try to use it.

clang might not be called clang.

For example, I installed clang and no gcc on a clean Ubuntu and /usr/bin/cc was an alias for clang, so a default Configure used "cc".

The attached tries to detect if $cc is clang or if clang is available in PATH (and works-for-me).

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=134189

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About