Is It Possible To Use More Than One Version Of GCC ?

Abhishek Rawal
@abhishek-fg9tRh โ€ข Oct 26, 2024

I have currently enabled testing and multilib testing repo and thus my GCC is updated to 5.1.0
Problem is some of programs can't be compiled with optimizations enabled. Is there anyway to use two versions of GCC in one system (5.1.0 & < 5.0.0) and switch as per my like ? like we do in python ?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Kaustubh Katdare

    @thebigk • Jul 1, 2015

    #-Link-Snipped-#

  • Abhishek Rawal

    @abhishek-fg9tRh • Jul 1, 2015

    Never mind, found the solution.
    However, I have to make changes in all my pkgbuild now :/ :/

  • rahul69

    @rahul69-97fAOs • Jul 2, 2015

    I am guessing, we need to install at different paths manually and set the path each time we want to use, however, please share the solution/link so that other may also be benefited. ๐Ÿ˜€

  • Abhishek Rawal

    @abhishek-fg9tRh • Jul 2, 2015

    rahul69I am guessing, we need to install at different paths manually and set the path each time we want to use, however, please share the solution/link so that other may also be benefited. ๐Ÿ˜€

    MAN page ftw! <a href="https://gcc.gnu.org/faq.html#multiple" target="_blank" rel="nofollow noopener noreferrer">GCC Frequently Asked Questions- GNU Project</a>
    I hate this method tho, there should be something like 'gcc -select' to switch to other versions, like we do for Java ๐Ÿ˜›

  • simplycoder

    @simplycoder-NsBEdD • Jul 6, 2015

    It seems that I am late to reply here.
    I too came across the same method,
    I agree that it is very cumbersome if you need to switch every time.

    I need to try if this configuration can be a part of make file or similar