Menu

#415 CRT is incompatible with -Wl,--disable-auto-import

v1.0 (example)
closed-fixed
None
5
2014-08-31
2014-08-17
Noah Misch
No

The following test procedure is based on a fresh mingw-w64-install.exe
installation, started with the "Run terminal" start menu link.

C:\Program Files\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev0>echo off
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>echo int main(int argc, char **argv) { return 0; } >trivial.c

C:\>gcc -Wl,--disable-auto-import trivial.c
C:/Program Files/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0x26f): undefined reference to `_set_invalid_parameter_handler'
collect2.exe: error: ld returned 1 exit status

C:\>gcc trivial.c

C:\>a.exe

C:\>

I can also reproduce it with mingw64-x86_64-runtime-3.1.0-1 currently shipping
with Cygwin's setup-x86.exe.

This seems liable to be related to [#335], [0eb0c0] and [532e1c].

Thanks,
nm

Related

Bugs: #335
Commit: [0eb0c0]
Commit: [532e1c]

Discussion

  • Jonathan Yong

    Jonathan Yong - 2014-08-18

    Can you please try this patch?

    Thanks.

     
  • Noah Misch

    Noah Misch - 2014-08-19

    That patch fixes my trivial test case. This bug report originated from an
    attempt to build PostgreSQL 9.4. With this patch, PostgreSQL builds and
    passes "make check". Thanks for the rapid help.

     
  • Jonathan Yong

    Jonathan Yong - 2014-08-19

    Thanks, applied to v3.x and master, will update Cygwin release soon.

     
  • Jonathan Yong

    Jonathan Yong - 2014-08-19
    • status: open --> closed-fixed
    • assigned_to: Jonathan Yong
     

Log in to post a comment.

MongoDB Logo MongoDB