tech-toolchain archive

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

Re: build of 2021/03/07 -current fails because of pthread_types.h (without MKLLVM!)



So, the clue is in the last two "notes" from the compiler:

/build/woods/b2/current-amd64-destdir/usr/include/pthread_types.h:170:8: note: '__pthread_cond_st' is not literal because:
  170 | struct __pthread_cond_st {
      |        ^~~~~~~~~~~~~~~~~
/build/woods/b2/current-amd64-destdir/usr/include/pthread_types.h:175:17: note:   non-static data member '__pthread_cond_st::ptc_waiters' has volatile type
  175 |  void *volatile ptc_waiters;
      |                 ^~~~~~~~~~~


These lead me to pthread_types.h, and to the apparent change that may
have introduced the fault (revision 1.25 of pthread_types.h), which
after looking at the full set of changes in 1.25 lead me to find the
definition of __pthread_volatile, and that allowed me to read the
comment about this definition and that suggested the following fix,
which at least allows the compile to continue.  I hate C++ and I hate
debugging C++, but here at least I'm grateful someone had already
figured out how to solve the problem and I only had to apply it in one
more place.

If all goes well I should be able to test the build under Xen in the
next few hours.


Index: lib/libpthread/pthread_types.h
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/lib/libpthread/pthread_types.h,v
retrieving revision 1.25
diff -u -r1.25 pthread_types.h
--- lib/libpthread/pthread_types.h	10 Jun 2020 22:45:15 -0000	1.25
+++ lib/libpthread/pthread_types.h	9 Mar 2021 22:43:05 -0000
@@ -172,7 +172,7 @@

 	/* Protects the queue of waiters */
 	__pthread_spin_t ptc_lock;
-	void *volatile ptc_waiters;
+	void *__pthread_volatile ptc_waiters;
 	void *ptc_spare;

 	pthread_mutex_t	*ptc_mutex;	/* Current mutex */

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpZmN5WE48qQ.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index