About the binary compatibility of Linux

后端 未结 2 1271
时光说笑
时光说笑 2021-01-13 17:59

If I get some C++ code built by, lets say, GCC 4.8 on Ubuntu, the code has no GUI/interface, only call standard Linux libraries, then can the binary run on RHEL 5/6, with mu

2条回答
  •  北海茫月
    2021-01-13 18:15

    The issue is probably more Glibc than libstdc++ (which you can indeed link statically) or GCC itself.

    You could use an alternative Libc, such as MUSL libc (which is supposed to be more friendly with static linking)

    Also, there might be some kernel dependencies.

提交回复
热议问题