Working on getting MingW32/native tools-only source build up

Using MingW32/GCC 4.2.1 binary release, mix of Cygwin and MingW32 auxilliary tools, ActivePerl's Perl 5.8.8; operating system Vista. I'm not going to worry about bootstrapping llvm-gcc until I know I can bootstrap gcc.

1) ActivePerl uses the wrong shell (cmd.exe rather than sh.exe) when doing backticks. I had to moderately rewrite llvm-config to use the Cwd module's abs_path function before it worked.

Apologies in advance if this is already documented on the site: which files would I need to modify so that llvm-config gets auto-generated correctly? [I haven't done the work to determine what a proper patch would be. I'd think that configure would have to test for the usability of Cwd 'abs_path' before replacing the current $PWD implementation with abs_path calls, which suggests I can't compose the patch (autoconf won't install cleanly).]

2) I'm getting massive link errors on template function instantiations (no tools are being created), and won't have time to properly play with this further "today". It looks like they're being stripped out prematurely; I'll be checking the GCC documentation for how to prevent this when I do have time.

Kenneth Boyd

Kenneth Boyd wrote:

Using MingW32/GCC 4.2.1 binary release, mix of Cygwin and MingW32 auxilliary tools, ActivePerl's Perl 5.8.8; operating system Vista. I'm not going to worry about bootstrapping llvm-gcc until I know I can bootstrap gcc.
  

I have the tools-only target building without errors on my end :slight_smile:

1) ActivePerl uses the wrong shell (cmd.exe rather than sh.exe) when doing backticks. I had to moderately rewrite llvm-config to use the Cwd module's abs_path function before it worked.

Apologies in advance if this is already documented on the site: which files would I need to modify so that llvm-config gets auto-generated correctly?

llvm-config.in.in, "of course". Would a patch that tries to use the Cmd module, as well as the current implementation, be reasonable?

2) I'm getting massive link errors on template function instantiations (no tools are being created), ....
  

Libraries weren't being linked in; I worked around this by adjusting the affected makefiles to explicitly mention the required library shorthands. I was doing a static-only build:
../llvm.svn/configure --prefix=/cpp_app/llvm.svn.obj --disable-shared --enable-assertions --enable-expensive-checks

Affected tools: bugpoint, llc, lli, llvm2cpp, llvmc, llvm-ar, llvm-as, llvm-bcanalyzer, llvm-db, llvm-dis, llvm-extract, llvm-ld, llvm-link, llvm-nm, llvm-prof, llvm-ranlib, llvm-upgrade, opt .

Kenneth Boyd