public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Symbols _fe_dfl_env and _fe_nomask_env not exported on x86_64
Date: Fri, 20 Jul 2018 03:03:00 -0000	[thread overview]
Message-ID: <7a7e499a7abcb1ae5f614ee38b4530ec@xs4all.nl> (raw)

L.S.,

This STC fails to compile on Cygwin for x86_64:

// gcc -Wall -o stc-fenv stc-fenv.c
// Linux: gcc -Wall -o stc-fenv stc-fenv.c -lm
#define _GNU_SOURCE
#include <fenv.h>

int main()
{
     fesetenv(FE_DFL_ENV);
     fesetenv(FE_NOMASK_ENV);
}

64-@@ gcc -Wall -o stc-fenv stc-fenv.c
/tmp/cchxZMgV.o:stc-fenv.c:(.rdata$.refptr._fe_nomask_env[.refptr._fe_nomask_env]+0x0): 
undefined reference to `_fe_nomask_env'
/tmp/cchxZMgV.o:stc-fenv.c:(.rdata$.refptr._fe_dfl_env[.refptr._fe_dfl_env]+0x0): 
undefined reference to `_fe_dfl_env'
collect2: error: ld returned 1 exit status

However the STC does compile on x86.

Where has the machinery gone wrong?

Regards,

Henri

-----
File /usr/include/fenv.h contains: (line 124 ff)

extern const fenv_t *_fe_dfl_env;
#define FE_DFL_ENV (_fe_dfl_env)
[snip]
...
#if __GNU_VISIBLE
[snip]
...
extern const fenv_t *_fe_nomask_env;
#define FE_NOMASK_ENV (_fe_nomask_env)
#endif /* __GNU_VISIBLE */

File winsup/cygwin/fenv.cc contains: (line 35 ff)

/* These are writable so we can initialise them at startup.  */
static fenv_t fe_dfl_env;
static fenv_t fe_nomask_env;

/* These pointers provide the outside world with read-only access to 
them.  */
const fenv_t *_fe_dfl_env = &fe_dfl_env;
const fenv_t *_fe_nomask_env = &fe_nomask_env

=====

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2018-07-19 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20  3:03 Houder [this message]
2018-07-20 12:03 ` Houder
2018-07-20 12:44 ` Corinna Vinschen
2018-07-20 13:36   ` Houder

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=7a7e499a7abcb1ae5f614ee38b4530ec@xs4all.nl \
    --to=houder@xs4all.nl \
    --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).