[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFC] dietlibc on hppa: thread local storage setup



Dear hppa porters,

I've recently started helping out with the dietlibc package. Regarding
hppa I've merged all porting patches in the bugtracker. However, an
upload to experimental based on a current CVS snapshot didn't
immediately build: the new package (and upstream) unconditionally
enable TLS support on all platforms and define the errno variable as
thread-local via __thread. This means that every platform needs to have
TLS setup code present (before main is run), otherwise any access to
errno (i.e. any system call) will fail.

I've looked at both the glibc and kernel sources plus read a lot of
documentation about PA-RISC and I think I've figured out what to do.
The latest upload to experimental now builds on hppa (and some tests
are run during build process, so at least simple programs work), so I'm
quite confident that this is correct.

My change can be found in this patch:
https://anonscm.debian.org/cgit/collab-maint/dietlibc.git/tree/debian/patches/0042-tls-register-fixes.diff?id=0b9fe40c474e570f7235d8bada5e600fc67b62e3
(It also addresses TLS startup for other archs, please ignore that.)

Since I don't have access to hppa hardware myself, qemu-user doesn't
seem to support it and there aren't any porterboxes - at least to the
best of my knowledge - I would be grateful if you could take a look and
see if what I've done is correct. I want to send all of the patches
w.r.t. porting currently in Debian to upstream, but I'd really like a
second opinion on this change.

(Also, if there are other issues with dietlibc on hppa that you haven't
reported, feel free to mention them. Please look at the most recent
version in experimental, 0.34~cvs20160402.1-1~exp2, though.)

Regards,
Christian

PS: Please CC me, I'm not subscribed to the list.

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: