| www.delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Date: | Sun, 17 Sep 2006 22:11:27 +0200 |
| From: | Stefan Traby <stefan AT hello-penguin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Cc: | pcg AT goof DOT com |
| Subject: | -fno-inline -O1 breaks ntohs() |
| Message-ID: | <20060917201127.GA29813@hello-penguin.com> |
| Reply-To: | Stefan Traby <stefan AT hello-penguin DOT com> |
| MIME-Version: | 1.0 |
| X-Operating-System: | Linux 2.6.16.20-km (i686) |
| X-PGP: | Key fingerprint = C090 8941 DAD8 4B09 77B1 E284 7873 9310 3BDB EA79 |
| X-MIL: | A-6172171143 |
| User-Agent: | Mutt/1.5.13 (2006-08-11) |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| 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 |
Hi!
Testcase:
------------------------------
#include <arpa/inet.h>
int main()
{
volatile short s = 33, t;
t = ntohs(s);
return 0;
}
------------------------------
> i686-pc-cygwin-gcc -fno-inline -o test test.c
> i686-pc-cygwin-gcc -O1 -fno-inline -o test test.c
/tmp/ccswmuY9.o:test.c:(.text+0x27): undefined reference to `___ntohs'
collect2: ld returned 1 exit status
>
This is my crosscompiler (gcc-4.1.1) but it breaks with gcc-3.4.4
(included in cygwin) exactly the same way (it compiles without -O1
and breaks otherwise).
If -fno-inline is not supported under cygwin sorry for wasting your time.
--
ciao -
Stefan
" Whip me. Beat me. Make me maintain VMS. "
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |