[Bug go/63731] Fallback to netgo does not work

yohei at jp dot ibm.com gcc-bugzilla@gcc.gnu.org
Fri Nov 14 04:49:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63731

--- Comment #2 from Yohei Ueda <yohei at jp dot ibm.com> ---
I tested this issue with the latest GC trunk again, and noticed that GC always
compiles programs that contains DNS lookups with dynamic linking even if
-static is specified.

$ go version
go version devel +ae495517bd72 Fri Nov 14 11:43:01 2014 +1100 linux/amd64
$ go build -ldflags '-extldflags "-static"' lookup.go
$ ./lookup 
209.132.180.131
$ file lookup
lookup: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
(uses shared libs), not stripped
$ ldd lookup
    linux-vdso.so.1 =>  (0x00007fff81550000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f50b943d000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f50b9078000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f50b9677000)

Any suggestions? Should I report this issue to GC?



More information about the Gcc-bugs mailing list