This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

SPU missing some stdio functions


Since we switched SPU over to not build anything under newlib/libc/stdio,
we are now missing several functions that were previously built.

I have not done a complete audit yet [kind of a pita, some functions under
newlib/libc/stdio won't compile because SPU has its own __FILE, and so I
can't easily compare libc.a content with and without newlib/libc/stdio
built; we also have the special SPU integer printf setup].

But so far, compared to before the change, I have found we no longer build
or have these functions (under newlib/libc/stdio) available on SPU:

	fseeko
	ftello
	getdelim
	getline
	getc_unlocked
	mktemp
	mkstemp
	putc_unlocked

Sa was trying to run some compiler tests, and had failures because of the
missing mkstemp.

Of course newlib usage of missing functions will also lead to link time
failures (of the above list, only mkstemp is referenced in newlib via
hash_page code).

Should we move back to an override setup for newlib/libc/stdio files? 

Or???

More analysis needed, but note:

ftello() can just call ftell() but SPU needs a ftell_r(), similar for
fseeko().

mktemp() and mkstemp() are good canidates for assisted calls.

getline() just calls getdelim(). getdelim() looks like it might work OK as an
assisted call, not sure what getc_unlocked usage implies, 

I don't know about getc/putc_unlocked(), especially given the SPU context
model (a linux thread holds the SPU context).

We should get libspe (any of the above) updated with any new assisted
calls before putting them in newlib.

-- Patrick Mansfield


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