Changing default compiler on OpenSuSE

"'seasoned_geek' via scintilla-interest" <[email protected]>
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
Posting this here because now it matters. By default OpenSuSE appears to 
install gcc-7 and cpp-7.
After you install version 11 of both via the package manager you still have 
a bit of work to do.

roland@localhost:~> su -
Password: 
localhost:~ # update-alternatives --install /usr/bin/gcc gcc 
/usr/bin/gcc-11 50
update-alternatives: using /usr/bin/gcc-11 to provide /usr/bin/gcc (gcc) in 
auto mode
localhost:~ # update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 
20
localhost:~ # update-alternatives --install /usr/bin/cpp cpp 
/usr/bin/cpp-11 50
update-alternatives: using /usr/bin/cpp-11 to provide /usr/bin/cpp (cpp) in 
auto mode
localhost:~ # update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-7 
20
localhost:~ # 
localhost:~ # update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-11   50        auto mode
  1            /usr/bin/gcc-11   50        manual mode
  2            /usr/bin/gcc-7    20        manual mode

Press <enter> to keep the current choice[*], or type selection number: 
localhost:~ # update-alternatives --config cpp
There are 2 choices for the alternative cpp (providing /usr/bin/cpp).


  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/cpp-11   50        auto mode
  1            /usr/bin/cpp-11   50        manual mode
  2            /usr/bin/cpp-7    20        manual mode

Press <enter> to keep the current choice[*], or type selection number: 
localhost:~ # 

Should work on other Linux distros too. I don't know why they are still 
hanging back at 7 unless there is some kernel/core stuff that won't compile 
with newer compilers due to deprecation or later compilers forcing integer 
data types to be 2's complement. Real PITA for anyone working on a Unisys 
mainframe or doing low level device interfaces. 

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/54d08db4-29e3-422e-9b56-1e24c4ac9314n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.