2

How can I link libc (or glibc) statically with CMake on Linux?

I have already linked libgcc and libstdc++ by using -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++".

ChaosP
  • 21
  • 1
  • 3
    You don't want to do this, see e.g. [here](https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged). – rubenvb Jan 13 '21 at 08:12

0 Answers0