X-Spam-Check-By: sourceware.org Date: Sun, 17 Sep 2006 22:11:27 +0200 From: Stefan Traby 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 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: List-Archive: List-Post: List-Help: , 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 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/