delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/16/07:20:14

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <250085.68907.qm@web25501.mail.ukl.yahoo.com>
References: <AANLkTimru_XVCwHrUsVUgbLfE7MjzO68NzA_14aUCWxZ AT mail DOT gmail DOT com> <250085 DOT 68907 DOT qm AT web25501 DOT mail DOT ukl DOT yahoo DOT com>
Date: Sat, 16 Oct 2010 13:19:55 +0200
Message-ID: <AANLkTi=fHP=JvYFB0BoLkmcZibYoLXcC4BFeR7f7EEpF@mail.gmail.com>
Subject: Re: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
From: Cornelis de Gier <cwdegier AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

2010/10/16 Marco Atzeri <marco_atzeri AT yahoo DOT it>:
> As Dave wrote the problem is inside cygwin
>
>> I thought it was just because we are failing to export
>> them in the cygwin.din file. =C2=A0The correct .o files are
>> compiled as part of the newlib libm build.
>
> but we forgot to make a patch.
>
> I will look on it.
>
> Marco

Below follows a C program that triggers the same undefined reference
(gcc 4.3.4, current cygwin). A simpler version using e.g. llround(4.5)
is optimized away. A strings command on /lib/libm.a shows llround is
not available.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
#include <math.h>
float test(){
return(4.569);
}=09

int main(){
return(llround(test()));
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
$ gcc -Wall -lm testllround.c
/tmp/ccLX7lEo.o:testllround.c:(.text+0x32): undefined reference to `_llroun=
d'
collect2: ld returned 1 exit status
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
$ strings /lib/libm.a | grep lround
_lround
_lroundf
_lround
__imp__lround
_lroundf
__imp__lroundf
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D

--
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