Can I target older linux with newer gcc/clang? C++ -


right compile c++ software on old version of linux (sled 10) using provided gcc , can run on newer versions have newer glibc. problem is, old gcc doesn't support c++11 , i'd use new features.

now have ideas, i'm sure others have same need. what's worked you?

ideas:

  1. build on newer system, static link newer glibc. (not possible, right?)
  2. build on newer system, compile , link against older glibc.
  3. build on older system using updated gcc, link against older glibc.
  4. build on newer system, dynamic link newer glibc, set rpath , provide our glibc installer.

as bonus, software support plugins , has sdk. i'd prefer customers compile against libraries without huge hassle.

thanks in advance. ideas welcome, proven solutions preferred.

build newer gcc. either install new compiler on old machine or comile on new machine , install necessary dynamic libraries on old machine.

note multiple versions of libc (and libstdc++) supported on single machine since typically versioned (i.e. libc.so.5, libc.so.6, etc)


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -