Re: default clang on Debian

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: default clang on Debian

Rik-4
On 02/25/2016 09:00 AM, [hidden email] wrote:

Also, I had both clang 3.6 and 3.7 installed, but though I installed 3.7 after 3.6, it was not set up as the default version of clang.  Then I removed 3.6 and there was no default version of clang (I still had to use clang-3.7 and clang++-3.7 to invoke them).  Is there a proper way to set up 3.7 as the default version on Debian?

Maybe 'update-alternatives'?

--Rik
Reply | Threaded
Open this post in threaded view
|

Re: default clang on Debian

Mike Miller-4
On Thu, Feb 25, 2016 at 09:34:44 -0800, Rik wrote:
> On 02/25/2016 09:00 AM, [hidden email] wrote:
> >
> > Also, I had both clang 3.6 and 3.7 installed, but though I installed 3.7
> > after 3.6, it was not set up as the default version of clang.  Then I
> > removed 3.6 and there was no default version of clang (I still had to use
> > clang-3.7 and clang++-3.7 to invoke them).  Is there a proper way to set
> > up 3.7 as the default version on Debian?
> >
> Maybe 'update-alternatives'?

No, compilers on Debian do not use the alternatives facility. The
symlinks to the default versions are hardcoded. I have clang 3.6, 3.7,
and 3.8 installed and 3.6 is still the default.

I configure Octave for clang with

  CC="clang-$ver" CXX="clang++-$ver -stdlib=libc++"

(the latter option instructs clang to use libc++ instead of libstdc++).

--
mike

Reply | Threaded
Open this post in threaded view
|

Re: default clang on Debian

José Luis García Pallero
2016-02-25 18:48 GMT+01:00 Mike Miller <[hidden email]>:

> On Thu, Feb 25, 2016 at 09:34:44 -0800, Rik wrote:
>> On 02/25/2016 09:00 AM, [hidden email] wrote:
>> >
>> > Also, I had both clang 3.6 and 3.7 installed, but though I installed 3.7
>> > after 3.6, it was not set up as the default version of clang.  Then I
>> > removed 3.6 and there was no default version of clang (I still had to use
>> > clang-3.7 and clang++-3.7 to invoke them).  Is there a proper way to set
>> > up 3.7 as the default version on Debian?
>> >
>> Maybe 'update-alternatives'?
>
> No, compilers on Debian do not use the alternatives facility. The
> symlinks to the default versions are hardcoded. I have clang 3.6, 3.7,
> and 3.8 installed and 3.6 is still the default.
>
> I configure Octave for clang with
>
>   CC="clang-$ver" CXX="clang++-$ver -stdlib=libc++"
>
> (the latter option instructs clang to use libc++ instead of libstdc++).

Is not possible to use the alias command in bash?

>
> --
> mike
>



--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************

Reply | Threaded
Open this post in threaded view
|

Re: default clang on Debian

John W. Eaton
Administrator
On 02/25/2016 12:49 PM, José Luis García Pallero wrote:

> 2016-02-25 18:48 GMT+01:00 Mike Miller <[hidden email]>:
>> On Thu, Feb 25, 2016 at 09:34:44 -0800, Rik wrote:
>>> On 02/25/2016 09:00 AM, [hidden email] wrote:
>>>>
>>>> Also, I had both clang 3.6 and 3.7 installed, but though I installed 3.7
>>>> after 3.6, it was not set up as the default version of clang.  Then I
>>>> removed 3.6 and there was no default version of clang (I still had to use
>>>> clang-3.7 and clang++-3.7 to invoke them).  Is there a proper way to set
>>>> up 3.7 as the default version on Debian?
>>>>
>>> Maybe 'update-alternatives'?
>>
>> No, compilers on Debian do not use the alternatives facility. The
>> symlinks to the default versions are hardcoded. I have clang 3.6, 3.7,
>> and 3.8 installed and 3.6 is still the default.
>>
>> I configure Octave for clang with
>>
>>    CC="clang-$ver" CXX="clang++-$ver -stdlib=libc++"
>>
>> (the latter option instructs clang to use libc++ instead of libstdc++).
>
> Is not possible to use the alias command in bash?

Sure, and I know how to select the compiler I want to use.  That's not
the issue.  I was looking for an accepted way to select the system
default.  Apparently there isn't one and that's fine.

jwe