From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ecc38b3271b36b88 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!34g2000pru.googlegroups.com!not-for-mail From: ytomino Newsgroups: comp.lang.ada Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Date: Sun, 27 Mar 2011 11:50:55 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0ea88302-a755-4a61-bf5b-728469c9d5d2@34g2000pru.googlegroups.com> References: <380fc033-6f6f-4e69-9371-89610c9c5d77@r19g2000prm.googlegroups.com> NNTP-Posting-Host: 114.164.26.2 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301251856 24279 127.0.0.1 (27 Mar 2011 18:50:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 27 Mar 2011 18:50:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 34g2000pru.googlegroups.com; posting-host=114.164.26.2; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19478 Date: 2011-03-27T11:50:55-07:00 List-Id: On Mar 27, 9:00=A0pm, a...@att.net wrote: > Using C you may need to also change the first underscore or remove both > such as > > =A0 pragma Import (C, isfinite, "_builtin_isfinite"); $ /usr/local/bin/gcc-4.6.0/gnatmake test1 gcc -c test1.adb gnatbind -x test1.ali gnatlink test1.ali Undefined symbols: "__builtin_isfinite", referenced from: __ada_test1 in test1.o __ada_test1 in test1.o ld: symbol(s) not found collect2: ld returned 1 exit status gnatlink: error when calling /usr/local/bin/gcc-4.6.0/gcc gnatmake: *** link failed. > or > =A0 pragma Import (C, isfinite, "builtin_isfinite"); $ /usr/local/bin/gcc-4.6.0/gnatmake test1 gcc -c test1.adb gnatbind -x test1.ali gnatlink test1.ali Undefined symbols: "_builtin_isfinite", referenced from: __ada_test1 in test1.o __ada_test1 in test1.o ld: symbol(s) not found collect2: ld returned 1 exit status gnatlink: error when calling /usr/local/bin/gcc-4.6.0/gcc gnatmake: *** link failed. In the first, libc.a (or libm.a) does not have the body of "isfinite" function. gcc expands builtin-functions to inline-assembly code. To tell the truth, libm.a has "_isfinite", but that is unused to call "__builtin_isfinite". Please make sure with nm.