Still removing pthread patches

This commit is contained in:
2018-01-02 13:12:24 +01:00
parent dc28ad6910
commit 798554fd92
15 changed files with 11 additions and 62 deletions

View File

@@ -138,7 +138,6 @@ _MCOUNT_DECL(u_long frompc, u_long selfpc)
int s;
#endif
#if !defined(__minix)
#if defined(_REENTRANT) && !defined(_KERNEL)
if (__isthreaded) {
p = thr_getspecific(_gmonkey);
@@ -149,7 +148,6 @@ _MCOUNT_DECL(u_long frompc, u_long selfpc)
}
} else
#endif
#endif /* !defined(__minix) */
p = &_gmonparam;
/*
* check that we are profiling

View File

@@ -20,21 +20,13 @@ DSTOBJDIR!=cd ${.PARSEDIR}/lib/dst && ${PRINTOBJDIR}
.if (${USE_INET6} != "no")
CPPFLAGS+= -DDHCPv6
.endif
.if !defined(__MINIX)
CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H
.else # defined(__MINIX)
CPPFLAGS+= -DHAVE_CONFIG_H
.endif # defined(__MINIX)
CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
.for dir in isc dns irs
CPPFLAGS+= -I${BIND}/lib/${dir}/include
CPPFLAGS+= -I${BIND}/lib/${dir}/unix/include
.if !defined(__MINIX)
CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
.else # defined(__MINIX)
CPPFLAGS+= -I${BIND}/lib/${dir}/nothreads/include
.endif # defined(__MINIX)
.endfor
CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
LDADD+= ${COBJDIR}/libdhcp.a
@@ -43,9 +35,7 @@ LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
LDADD+=-Wl,-Bstatic
.endif
LDADD+= -lirs -lisccfg -ldns -lisc
.if !defined(__MINIX)
LDADD+=-lpthread
.endif # !defined(__MINIX)
.if (${MKCRYPTO} != "no")
.if (${MKKERBEROS} != "no")
LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
@@ -71,6 +61,4 @@ LDADD+=-Wl,-Bdynamic
DPADD+= ${COBJDIR}/libdhcp.a
DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
DPADD+= ${LIBDNS} ${LIBISC}
.if !defined(__MINIX)
DPADD+= ${LIBPTHREAD}
.endif # !defined(__MINIX)

View File

@@ -21,12 +21,8 @@
/* Define if libevent should not allow replacing the mm functions */
/* #undef _EVENT_DISABLE_MM_REPLACEMENT */
#if !defined(__minix)
/* Define if libevent should not be compiled with thread support */
/* #undef _EVENT_DISABLE_THREAD_SUPPORT */
#else
#define _EVENT_DISABLE_THREAD_SUPPORT 1
#endif /* !defined(__minix) */
/* Define to 1 if you have the `arc4random' function. */
#define _EVENT_HAVE_ARC4RANDOM 1
@@ -178,10 +174,8 @@
/* Define if you have POSIX threads libraries and header files. */
/* #undef _EVENT_HAVE_PTHREAD */
#if !defined(__minix)
/* Define if we have pthreads on this system */
#define _EVENT_HAVE_PTHREADS 1
#endif /* !defined(__minix) */
/* Define to 1 if you have the `putenv' function. */
#define _EVENT_HAVE_PUTENV 1
@@ -425,14 +419,13 @@
/* The size of `off_t', as computed by sizeof. */
#define _EVENT_SIZEOF_OFF_T 8
#if !defined(__minix)
/* The size of `pthread_t', as computed by sizeof. */
#ifdef _LP64
#define _EVENT_SIZEOF_PTHREAD_T 8
#else
#define _EVENT_SIZEOF_PTHREAD_T 4
#endif
#endif /* !defined(__minix) */
/* The size of `short', as computed by sizeof. */
#define _EVENT_SIZEOF_SHORT 2

View File

@@ -5,7 +5,6 @@ SUBDIR= libevent .WAIT
.if ${MKCRYPTO} != "no"
SUBDIR+= libevent_openssl
.endif
# MINIX3: insufficient pthreads support in the base system for now
#SUBDIR+= libevent_pthreads
SUBDIR+= libevent_pthreads
.include <bsd.subdir.mk>

View File

@@ -7879,9 +7879,7 @@ void minix::Link::ConstructJob(Compilation &C, const JobAction &JA,
if (D.CCCIsCXX()) {
getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
CmdArgs.push_back("-lm");
/* LSC: Hack as lc++ is linked against mthread. */
CmdArgs.push_back("-lmthread");
CmdArgs.push_back("-lpthread");
}
if (Args.hasArg(options::OPT_pthread))
CmdArgs.push_back("-lpthread");

View File

@@ -50,5 +50,5 @@ DPADD+= ${LIBTERMINFO}
.if defined(__MINIX) && defined(HOSTPROG) && ${HOST_OSTYPE:C/\-.*//} != "Minix"
LDADD+= -lpthread
.else
LDADD+= -lc++ -lmthread
LDADD+= -lc++ -lpthread
.endif # defined(__MINIX)

View File

@@ -23,7 +23,6 @@ CPPFLAGS+= \
.if defined(__MINIX)
CPPFLAGS+= \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_OMIT_WAL
.endif # defined(__MINIX)

View File

@@ -45,9 +45,7 @@ FILESNAME_${XZSRCDIR}/po/${lang}.gmo= xz.mo
.endfor
.endif
.if !defined(__MINIX)
LDADD+= -lpthread
DPADD+= ${LIBPTHREAD}
.endif # !defined(__MINIX)
.include <bsd.prog.mk>

View File

@@ -33,18 +33,16 @@ SRCS+= tuklib_physmem.c tuklib_cpucores.c
SRCS+= check.c crc32_table.c crc64_table.c
SRCS+= crc32_fast.c crc64_fast.c
#__MINIX: No pthreads:
# hardware_cputhreads.c outqueue.c stream_encoder_mt.c
.PATH: ${XZSRCDIR}/src/liblzma/common
SRCS+= common.c block_util.c easy_preset.c filter_common.c \
hardware_physmem.c index.c \
hardware_physmem.c hardware_cputhreads.c index.c \
stream_flags_common.c vli_size.c \
alone_encoder.c block_buffer_encoder.c block_encoder.c \
block_header_encoder.c easy_buffer_encoder.c easy_encoder.c \
easy_encoder_memusage.c filter_buffer_encoder.c \
filter_encoder.c filter_flags_encoder.c index_encoder.c \
stream_buffer_encoder.c stream_encoder.c \
stream_flags_encoder.c vli_encoder.c \
stream_buffer_encoder.c stream_encoder.c stream_encoder_mt.c \
stream_flags_encoder.c vli_encoder.c outqueue.c \
alone_decoder.c auto_decoder.c block_buffer_decoder.c \
block_decoder.c block_header_decoder.c easy_decoder_memusage.c \
filter_buffer_decoder.c filter_decoder.c filter_flags_decoder.c \
@@ -87,9 +85,7 @@ liblzma.pc: ${XZSRCDIR}/src/liblzma/liblzma.pc.in
CLEANFILES+= liblzma.pc
.if !defined(__MINIX)
LDADD+= -lpthread
DPADD+= ${LIBPTHREAD}
.endif # defined(__MINIX)
.include <bsd.lib.mk>

View File

@@ -10,12 +10,7 @@ SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
.endif
.if defined(__MINIX)
#LSC MINIX libc depends on
# - libmthread because of sys/lib/libunwind
SUBDIR+= .WAIT
SUBDIR+= ../minix/lib/libsys
SUBDIR+= ../minix/lib/libmthread
SUBDIR+= .WAIT
.endif # defined(__MINIX)
SUBDIR+= libc
@@ -35,6 +30,7 @@ SUBDIR+= ../minix/lib/libasyn \
../minix/lib/liblwip \
../minix/lib/libminc \
../minix/lib/libminixfs \
../minix/lib/libmthread \
../minix/lib/libnetdriver \
../minix/lib/libsffs \
../minix/lib/libsockdriver \

View File

@@ -46,7 +46,7 @@ CPPFLAGS+= -D_LIBC -D_REENTRANT
.if defined(MLIBDIR)
CPPFLAGS+= -DMLIBDIR=\"${MLIBDIR}\"
.endif
.endif # !defined(__minix)
.endif # !defined(__MINIX)
.if (${USE_HESIOD} != "no")
CPPFLAGS+= -DHESIOD

View File

@@ -8,6 +8,7 @@ Copyright 1995 Philip Homburg
#include <stdio.h>
#include <string.h>
#include <minix/sysutil.h>
typedef unsigned int reg_t;

View File

@@ -22,14 +22,7 @@
#include <dlfcn.h>
#include <elf.h>
#include <link.h>
#if !defined(__minix)
#include <pthread.h>
#else
#define pthread_rwlock_init(l, d) /* nothing */
#define pthread_rwlock_rdlock(l) /* nothing */
#define pthread_rwlock_wrlock(l) /* nothing */
#define pthread_rwlock_unlock(l) /* nothing */
#endif /* !defined(__minix) */
#include "dwarf2.h"
@@ -351,9 +344,7 @@ public:
private:
findPCRange_t findPCRange;
bool needsReload;
#if !defined(__minix)
pthread_rwlock_t fdeTreeLock;
#endif /* !defined(__minix) */
rb_tree_t segmentTree;
rb_tree_t dsoTree;

View File

@@ -14,9 +14,7 @@
#include <stdint.h>
#include <stdlib.h>
#if !defined(__minix)
#include <pthread.h>
#endif /* !defined(__minix) */
#include "AddressSpace.hpp"
#include "DwarfInstructions.hpp"

View File

@@ -13,10 +13,9 @@ BINDIR= ${TESTSDIR}
PROG= h_event
MAN= # defined
#__MINIX: Not Supported: regress_thread.c
SRCS= regress.c regress.gen.c regress_dns.c regress_http.c \
regress_rpc.c regress_main.c tinytest.c regress_testutils.c \
regress_minheap.c regress_util.c \
regress_minheap.c regress_util.c regress_thread.c \
regress_buffer.c regress_bufferevent.c regress_listener.c \
regress_zlib.c regress_et.c
@@ -26,12 +25,7 @@ DPADD+= ${LIBEVENT_OPENSSL} ${LIBSSL} ${LIBCRYPTO}
LDADD+= -levent_openssl -lssl -lcrypto
CPPFLAGS+= -DLIBEVENT_CRYPTO
.endif
.if !defined(__MINIX)
DPADD+= ${LIBEVENT} ${LIBEVENT_PTHREADS} ${LIBZ} ${LIBPTHREAD}
LDADD+= -levent_pthreads -levent -lz -lpthread
.else
DPADD+= ${LIBEVENT} ${LIBZ}
LDADD+= -levent -lz
.endif # !defined(__MINIX)
.include <bsd.test.mk>