This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: How to get printf() output?


Toralf Lund wrote:
Can someone repeat for me what I should do to get printf() to work when linking with newlib, but not libgloss? I was under the impression that write() would be called eventually, but it looks like it isn't. I've tried step-tracing the printf execution via the ROM monitor to find out what is going on, but it's a bit hard to follow...

Just to make it clear: I have provided custom version all routines necessary to link the application correctly, including read(), write(), open() and close(). I'm linking with libc, libm and crt0.o, but not libgloss or similar.

If isatty() claims that stdout isn't a tty, then printf will buffer the output. The quick way to test this theory is to do fflush(0) to push all the putput out.


- ken


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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