This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fno-inline -O1 breaks ntohs()


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]