문제

I'm trying to port to Macintosh OSX where clang is provided instead of gcc. When building on Linux with gcc, I pass -static-libgcc to gcc.

What is the nearest equivalent I might replace this option when using clang?

도움이 되었습니까?

해결책

Probably this has already been sorted out, but for the sake of completeness,
-- you cannot not link with system libraries statically on mac, till you do some extra work of compiling crt0.o.

So, simply remove this flag.

Please see

stackoverflow.com/questions/5259249/creating-static-mac-os-x-c-build

https://developer.apple.com/library/mac/qa/qa1118/_index.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top