How to safely deploy an application built with an upgraded compiler

后端 未结 1 1350
温柔的废话
温柔的废话 2021-01-28 06:34

I have an application that is deployed on a centos 6.7 plateform and built with the native C++ compiler of the distribution, that is gcc 4.4.7. Now for some reasons ( actually,

1条回答
  •  星月不相逢
    2021-01-28 07:24

    Nice to see someone else doing this - I recently started doing it too!

    My answer is not very authoritative, but for what it's worth, I rebuild all C++ libraries that I'll be linking against, and deploy those with my application. I also redistribute libstdc++ and libgcc_s, putting them in a special place out of the way (/usr/lib/myApplicationName/...). I ensure that my application links against all of these redistributed libraries instead of whatever's native.

    I had a concern that libc compatibility might be a problem, but I haven't found that I need to do anything about any C libraries, or with libc itself.

    Update: Turns out I didn't even need to do this, because I'm using devtoolset; FML.

    0 讨论(0)
提交回复
热议问题