This is the mail archive of the cygwin-developers 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]

problem adding complex to newlib/cygwin


Hi,
following a suggestion from Corinna I am trying to port
the netbsd complex functions to newlib.
Trying to compile cygwin1.dll with such changes, I hit 
a undefined reference that is puzzling me, so I am obviously
missing to consider something.

make[3]: Entering directory `/pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/cygwin'
g++ -L/pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup -L/pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/cygwin -L/pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/w32api/lib -isystem /pub/cygwin/cvs/src_clone/winsup/include -isystem /pub/cygwin/cvs/src_clone/winsup/cygwin/include -isystem /pub/cygwin/cvs/src_clone/winsup/w32api/include -B/pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/ -isystem /pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/targ-include -isystem /pub/cygwin/cvs/src_clone/newlib/libc/include    -g -O2 -MMD  -Werror -fmerge-constants -ftracer -mno-use-libstdc-wrappers  -Wl,--gc-sections -nostdlib -Wl,-T../../../../src_clone/winsup/cygwin/cygwin.sc \
        -Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o cygwin0.dll \
        -e _dll_entry@12 cygwin.def assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o cygtls.o cygxdr.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o dtable.o environ.o errno.o exceptions.o exec.o external.o fcntl.o fenv.o fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_disk_file.o fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o fhandler_mem.o fhandler_netdrive.o fhandler_nodevice.o fhandler_proc.o fhandler_process.o fhandler_procnet.o fhandler_procsys.o fhandler_random.o fhandler_raw.o fhandler_registry.o fhandler_serial.o fhandler_socket.o fhandler_tape.o fhandler_termios.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o fhandler_zero.o flock.o fnmatch.o fork.o fts.o ftw.o getopt.o glob.o glob_pattern_p.o globals.o grp.o heap.o hookapi.o inet_addr.o inet_network.o init.o ioctl.o ipc.o kernel32.o libstdcxx_wrapper.o localtime.o lsearch.o malloc_wrapper.o minires-os-if.o minires.o miscfuncs.o
 mktemp.o mmap.o msg.o mount.o net.o netdb.o nfs.o nftw.o nlsfuncs.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o posix_ipc.o pseudo-reloc.o pthread.o random.o regcomp.o regerror.o regexec.o regfree.o registry.o resource.o rexec.o rcmd.o scandir.o sched.o sec_acl.o sec_auth.o sec_helper.o security.o select.o sem.o setlsapwd.o shared.o shm.o sigfe.o signal.o sigproc.o smallprint.o spawn.o strace.o strfmon.o strfuncs.o strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o syslog.o termios.o thread.o timer.o times.o tls_pbuf.o tty.o uinfo.o uname.o wait.o wincap.o window.o winf.o xsique.o   malloc.o  version.o winver.o \
         /pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/cygserver/libcygserver.a /pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/libm/libm.a /pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/libc/libc.a \
        -lgcc /pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/w32api/lib/libadvapi32.a /pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/w32api/lib/libkernel32.a /pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/w32api/lib/libntdll.a -Wl,-Map,cygwin.map
Creating library file: cygdll.a/pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/libm/libm.a(lib_a-cabs.o): In function `cabs':
/pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/libm/complex/../../../../../src_clone/newlib/libm/complex/cabs.c:19: undefined reference to `__hypot'
/pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/libm/libm.a(lib_a-cabsf.o): In function `cabsf':
/pub/cygwin/cvs/clone_build/i686-pc-cygwin/newlib/libm/complex/../../../../../src_clone/newlib/libm/complex/cabsf.c:19: undefined reference to `__hypotf'
collect2: ld returned 1 exit status

make[3]: *** [cygwin0.dll] Error 1
make[3]: Leaving directory `/pub/cygwin/cvs/clone_build/i686-pc-cygwin/winsup/cygwin'


so I have a extra "_" that I was not expecting

lib_a-cabs.o:
00000000 b .bss
00000000 d .data
00000000 N .debug_abbrev
00000000 N .debug_aranges
00000000 N .debug_frame
00000000 N .debug_info
00000000 N .debug_line
00000000 N .debug_loc
00000000 N .debug_pubnames
00000000 t .text
         U __hypot
00000000 T _cabs

Any suggestion on what I should check ?

The patch versus a recent cygwin cvs is available here
http://matzeri.altervista.org/works/complex/

Thanks in advance
Marco







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