Changing default compiler for usr/ports buiding

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

Changing default compiler for usr/ports buiding

Denis Lapshin-2
I'm trying to change default compiler to build some ports.
Tried to do it using bsd.port.mk and by system variables CXX=eg++
CPP=egcc, but nothing changes while building a port.

How can I force the default gcc 4.2 to egcc (gcc 4.9)?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Changing default compiler for usr/ports buiding

Denis Lapshin-2
Ok, but how to point cmake-3.5.2 to build the needed "source" which
using Boost 1.53 or higher libraries ver.?

Boost 1.59.0 itself was downloaded from boost web site and builded from
sources using gcc 4.9 already. Some patches have been installed.

I have tried to point cmake-3.5.2 to Boost-1.59.0 (builded from source
by gcc 4.9) by using some documented hints
cmake -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_ROOT=/boost-gcc49/output
-DBOOST_INCLUDEDIR=/boost-gcc49/output/include -
DBOOST_LIBRARYDIR=/boost-gcc49/output/lib
-DCMAKE_INSTALL_PREFIX=/build/src-output

But Cmake wan't see the prebuilded Boost 1.59.0 libraries, but clearly
sees the paths to Boost ROOT dir, include, and lib dirs.

So I tried to build Boost 1.58 which is a part of ports of OpenBSD 6.0
amd64 by newer compiler gcc 4.9 which is required for the sources build...

What can I do to have Boost 1.58 or Boost 1.59 builded by gcc 4.9 and
working with cmake-3.5.2 ?

Thanks for answer in advance.

On 31.07.2017 21:34, Marc Espie wrote:

> On Mon, Jul 31, 2017 at 05:47:59PM +0300, Denis wrote:
>> I'm trying to change default compiler to build some ports.
>> Tried to do it using bsd.port.mk and by system variables CXX=eg++
>> CPP=egcc, but nothing changes while building a port.
>>
>> How can I force the default gcc 4.2 to egcc (gcc 4.9)?
>>
>> Thanks
> You can't.
>
> Things generally won't work.
>
> Current uses clang on i386 and amd64.
>
> And that's wildly incompatible with gcc 4.2 or 4.9...
>

Reply | Threaded
Open this post in threaded view
|

Re: Changing default compiler for usr/ports buiding

Stuart Henderson
What are you *actually* trying to do (end goal)?

If what you actually need is "boost and c++11", your best bet is
-current and clang. GCC is a dead end on OpenBSD for anything C++ that
uses C++ libraries from X or packages.



On 2017-08-01, Denis <[hidden email]> wrote:

> Ok, but how to point cmake-3.5.2 to build the needed "source" which
> using Boost 1.53 or higher libraries ver.?
>
> Boost 1.59.0 itself was downloaded from boost web site and builded from
> sources using gcc 4.9 already. Some patches have been installed.
>
> I have tried to point cmake-3.5.2 to Boost-1.59.0 (builded from source
> by gcc 4.9) by using some documented hints
> cmake -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_ROOT=/boost-gcc49/output
> -DBOOST_INCLUDEDIR=/boost-gcc49/output/include -
> DBOOST_LIBRARYDIR=/boost-gcc49/output/lib
> -DCMAKE_INSTALL_PREFIX=/build/src-output
>
> But Cmake wan't see the prebuilded Boost 1.59.0 libraries, but clearly
> sees the paths to Boost ROOT dir, include, and lib dirs.
>
> So I tried to build Boost 1.58 which is a part of ports of OpenBSD 6.0
> amd64 by newer compiler gcc 4.9 which is required for the sources build...
>
> What can I do to have Boost 1.58 or Boost 1.59 builded by gcc 4.9 and
> working with cmake-3.5.2 ?
>
> Thanks for answer in advance.
>
> On 31.07.2017 21:34, Marc Espie wrote:
>> On Mon, Jul 31, 2017 at 05:47:59PM +0300, Denis wrote:
>>> I'm trying to change default compiler to build some ports.
>>> Tried to do it using bsd.port.mk and by system variables CXX=eg++
>>> CPP=egcc, but nothing changes while building a port.
>>>
>>> How can I force the default gcc 4.2 to egcc (gcc 4.9)?
>>>
>>> Thanks
>> You can't.
>>
>> Things generally won't work.
>>
>> Current uses clang on i386 and amd64.
>>
>> And that's wildly incompatible with gcc 4.2 or 4.9...
>>
>
>