From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: environ: fix link error on 64-bit Cygwin
Date: Tue, 27 Feb 2018 10:38:00 -0000 [thread overview]
Message-ID: <20180227103803.GC3806@calimero.vinschen.de> (raw)
In-Reply-To: <0d34d107-43ff-18f5-4284-b8a6ada9a927@cornell.edu>
[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]
On Feb 26 16:28, Ken Brown wrote:
> On 1/31/2018 9:40 AM, Corinna Vinschen wrote:
> > On Jan 31 07:52, Eric Blake wrote:
> > > Forwarding from the gnulib list; is this something we should fix in
> > > cygwin proper?
> >
> > Why does anybody remove the -Wl,--disable-auto-import flag? What for?
> > The idea was to never use this flag on Cygwin and to get rid of the
> > dllimport/dllexport nonsense...
> >
> > > On 01/31/2018 04:42 AM, Bruno Haible wrote:
> > > > On 64-bit Cygwin, a libunistring build fails like this:
> > > > [...]
> > > > libtool: link: x86_64-pc-cygwin-gcc -g -O2 -Wl,--disable-auto-import -o .libs/test-environ.exe test-environ.o -L/usr/local/cygwin64/lib libtests.a ../lib/.libs/libunistring.dll.a -liconv libtests.a -L/usr/local/cygwin64/lib
> > > > test-environ.o:test-environ.c:(.rdata$.refptr.environ[.refptr.environ]+0x0): undefined reference to `environ'
> > > > collect2: error: ld returned 1 exit status
> > > >
> > > > This fixes it.
> > > > [...]
> > > > +_GL_EXTERN_C __declspec(dllimport) char **environ;
> >
> > But, other than that, an equivalent newlib patch would be ok.
>
> Before patching newlib, please note that Bruno's patch doesn't work on
> 32-bit Cygwin. Projects (like emacs and clisp) that use gnulib's unistd
> module with that patch will get link errors like this:
>
> undefined reference to `_imp__environ'
>
> I have no idea why this error occurs only on 32-bit.
>
> I've made Bruno aware of the problem, and I'm waiting to see what he comes
> up with.
No worries. I'll wait patiently for a newlib patch.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-02-27 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <36131639.liFsmjX0ip@omega>
2018-01-31 13:53 ` Eric Blake
2018-01-31 14:40 ` Corinna Vinschen
2018-02-26 21:28 ` Ken Brown
2018-02-27 10:38 ` Corinna Vinschen [this message]
2018-02-27 14:10 ` cyg Simple
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180227103803.GC3806@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).