[Cygwin] 'make install' woes

I am getting the following on ‘make install’ on Cygwin both on debug and release builds :-

llvm[3]: Installing Release /home/ang/llvm-coff/bin/llvmc.exe
make[3]: Leaving directory /home/ang/build/llvm-coff/tools/llvmc/driver' make[2]: Leaving directory /home/ang/build/llvm-coff/tools/llvmc’
make[1]: Leaving directory /home/ang/build/llvm-coff/tools' make[1]: Entering directory /home/ang/build/llvm-coff/runtime’
make[2]: Entering directory `/home/ang/build/llvm-coff/runtime/libprofile’
llvm[2]: Compiling BasicBlockTracing.c for Release build (PIC)
llvm[2]: Compiling BlockProfiling.c for Release build (PIC)
llvm[2]: Compiling CommonProfiling.c for Release build (PIC)
llvm[2]: Compiling EdgeProfiling.c for Release build (PIC)
llvm[2]: Compiling FunctionProfiling.c for Release build (PIC)

PIC seems to be enabled for some strange reason, even with --disable-pic on configure.

Then there seems to be a missing library too :-

llvm[2]: Linking Release Loadable Module profile_rt.dll
/usr/lib/gcc/i686-pc-cygwin/3.4.4/…/…/…/…/i686-pc-cygwin/bin/ld: warning: cannot find entry symbol __cygwin_dll_entry@12; defaulting to 702c1000

/home/ang/build/llvm-coff/runtime/libprofile/Release/BasicBlockTracing.o:BasicBl
ockTracing.c:(.text+0x36): undefined reference to _free' /home/ang/build/llvm-coff/runtime/libprofile/Release/BasicBlockTracing.o:BasicBl ockTracing.c:(.text+0xca): undefined reference to _malloc’
/home/ang/build/llvm-coff/runtime/libprofile/Release/BasicBlockTracing.o:BasicBl
ockTracing.c:(.text+0xe8): undefined reference to _atexit' /home/ang/build/llvm-coff/runtime/libprofile/Release/BlockProfiling.o:BlockProfi ling.c:(.text+0x65): undefined reference to _atexit’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x76): undefined reference to _strdup' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x9a): undefined reference to _memmove’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0xe3): undefined reference to _memmove' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x105): undefined reference to _printf’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x113): undefined reference to _puts' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x13c): undefined reference to _strlen’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x14e): undefined reference to _malloc' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x182): undefined reference to _strlen’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x19b): undefined reference to _memcpy' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x1fb): undefined reference to _write’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x21a): undefined reference to _write' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x23b): undefined reference to _write’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x25e): undefined reference to _open' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x296): undefined reference to _write’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x2b5): undefined reference to _write' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x2d6): undefined reference to _write’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x30d): undefined reference to _write' /home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro filing.c:(.text+0x332): undefined reference to _fprintf’
/home/ang/build/llvm-coff/runtime/libprofile/Release/CommonProfiling.o:CommonPro
filing.c:(.text+0x33e): undefined reference to _perror' /home/ang/build/llvm-coff/runtime/libprofile/Release/EdgeProfiling.o:EdgeProfili ng.c:(.text+0x65): undefined reference to _atexit’
/home/ang/build/llvm-coff/runtime/libprofile/Release/FunctionProfiling.o:Functio
nProfiling.c:(.text+0x65): undefined reference to _atexit' collect2: ld returned 1 exit status make[2]: *** [/home/ang/build/llvm-coff/Release/lib/profile_rt.dll] Error 1 make[2]: Leaving directory /home/ang/build/llvm-coff/runtime/libprofile’
make[1]: *** [libprofile/.makeinstall] Error 2
make[1]: Leaving directory `/home/ang/build/llvm-coff/runtime’

If anyone can give me a lead on this or even fix it I would be most greatful.

Aaron

PIC is force enabled because its building a shared library.

Not sure about the link error, does it get fixed if you add, say
  LINK_COMPONENTS := system
to runtime/libprofile/Makefile?

(Not the right fix, just curious)

- Daniel