delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/07/19/19:00:48

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:message-id; q=
dns; s=default; b=XPMEzxWWgnYxZoGaCcuf6TfY5KDvDiQWyGPLxRGInm4y+l
7dazZM9G1ebxAJFqtjXCl2dJs038b6jDPSZmzyEFdtxJmsDmcpt2hunFdfRZYEOl
14o38nBkZtVoslRG/DJQSuN33KDTXB8H+ag9ABK46JtsjhXZePzUp7pH1RmqU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:message-id; s=
default; bh=m7LTXzuYaIlPdTqvain7ASenOBw=; b=FjXxXAu+wh9LMb6j2Zbt
ZEaej8lvAQGPGQTMcTcJG16A8O7CJvOwOyNjKE85GhQwAAT/MKFUv8cl2ZsHXHiE
SjeL9nRjrKWdrxLUfbYrtq59oZv3MSSaOn612T9C4CEeKnzvNQ8rDNXQ+7wXtauJ
vtBNkQfIQEj4BnkFbOaE51g=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_NUMSUBJECT,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=64, LS, H*F:D*nl, H*r:POST
X-HELO: lb3-smtp-cloud8.xs4all.net
MIME-Version: 1.0
Date: Fri, 20 Jul 2018 01:00:01 +0200
From: Houder <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
Subject: Symbols _fe_dfl_env and _fe_nomask_env not exported on x86_64
Message-ID: <7a7e499a7abcb1ae5f614ee38b4530ec@xs4all.nl>
X-Sender: houder AT xs4all DOT nl
User-Agent: XS4ALL Webmail
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019