diff options
author | julian <julian@FreeBSD.org> | 1999-11-30 20:21:56 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-11-30 20:21:56 +0000 |
commit | cf804b10d272d9d6a1320ded697429ed14a876e6 (patch) | |
tree | 1b6200c9b557b982886aa0f206a3b5732a6a42cd /devel | |
parent | f4fb51fb68cd74e5ddc7246146bdf8ede9962023 (diff) | |
download | FreeBSD-ports-cf804b10d272d9d6a1320ded697429ed14a876e6.zip FreeBSD-ports-cf804b10d272d9d6a1320ded697429ed14a876e6.tar.gz |
Update some of the Documentation files.
Submitted by: "Richard Seaman, Jr." <dick@tar.com>, rcarter@pinyon.org
Diffstat (limited to 'devel')
-rw-r--r-- | devel/linuxthreads/files/README.FreeBSD | 78 |
1 files changed, 35 insertions, 43 deletions
diff --git a/devel/linuxthreads/files/README.FreeBSD b/devel/linuxthreads/files/README.FreeBSD index 705e254..f0132e3 100644 --- a/devel/linuxthreads/files/README.FreeBSD +++ b/devel/linuxthreads/files/README.FreeBSD @@ -1,23 +1,37 @@ Some brief notes: -1) Consider updating your FreeBSD source to 3.X after January 27, -1999 or to 4.0-current after January 25, 1999. If you insist on -using older source, be sure it is at least 3.0-current after -January 12, 1999. +1) This package is intended to run on FreeBSD 4.0-current or +FreeBSD 3.X, with sources more recent than March 1, 1999, i386 +processors only. -If you are using older source: +Compile your applications that use Linux Threads with the following +command line options: -You must have compiled your kernel/world with the option -COMPAT_LINUX_THREADS. Optionally, you can also have compiled -with the option VM_STACK. This package will not run properly -without COMPAT_LINUX_THREADS. If you have not done so, add --DCOMPAT_LINUX_THREADS to the CFLAGS, and also to COPTFLAGS in -your /etc/make.conf file (optionally add -DVM_STACK also), and -do a "make world" and remake and reinstall the kernel. + -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -llthread -If you are using new source: +Note that the include (-I..) directive shown here should appear before any other include +directive that would cause the compiler to find the FreeBSD file /usr/include/pthread.h. +Using the FreeBSD pthread.h instead of the linuxthreads pthread.h will result in an app +fails in many odd and maybe spectacular ways. -Everything is included by default for i386 systems. +In order to facilitate porting applications witch expect a libpthread, you can create +the following symlinks if you want: + + ln -s /usr/local/lib/liblthread.a /usr/lib/libpthread.a + ln -s /usr/local/lib/liblthread_p.a /usr/lib/libpthread_p.a + ln -s /usr/local/lib/liblthread.so.0 /usr/lib/libpthread.so.0 + ln -s /usr/local/lib/liblthread.so.0 /usr/lib/libpthread.so + /sbin/ldconfig -m /usr/lib + +If you do this, you can instead use: + + -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -lpthread +or + -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -kthread + +DO NOT use libc_r with Linux Threads, and do not compile/link with +the -pthread option (which pulls in libc_r). DO link with libc +(which you will get by default). 2) You should consider enabling the posix priority extensions in your kernel. Adding the following to your kernel config @@ -35,25 +49,11 @@ of kern.maxproc. Each kernel thread counts against maxproc. You can increase maxproc by changing the MAXUSERS value in your kernel config file. maxproc is set at 20 + 16 * MAXUSERS. -4) This package does not currently work on a normal SMP machine, -since the flags needed for the rfork function are not enabled. -More work needs to be done on the kernel. However, if wish -to try it, take a look at http://www.freebsd.org/~luoqi/pmap.diff . - -5) DO NOT link with the libc_r library (by default you won't). -Don't use the option -pthread when compiling/linking. It pulls -in libc_r. +4) This package should work on a normal SMP machine, however, +there appear to be some problems introduced with the recent changes +to the kernel signal handling, which have yet to be resolved. -6) Compile your applications that use Linux Threads with either of -the following (equivalent) command line options: - - -D_THREAD_SAFE -DLINUXTHREADS -lpthread -or: - -D_THREAD_SAFE -DLINUXTHREADS -kthread - - -7) You should link with the normal FreeBSD libc directory (by -default you will). Be aware of the following issues: +5) Be aware of the following libc issues: a) Not all libc calls are thread safe. Many are. In particular gmtime, localtime, etc are not thread @@ -73,7 +73,7 @@ default you will). Be aware of the following issues: deferred cancellation will not really do anything, since the co-operation needed from libc is not there. -8) There is a call implemented for FreeBSD (see stack.c): +6) There is a call implemented for FreeBSD (see stack.c): int _pthread_setstackspacing(size_t spacing, size_t guardsize) @@ -89,13 +89,5 @@ ie. maximum stack size = spacing - TLSpagesize - guardsize. The spacing must be a power of 2 times the pagesize (and if its not, it will be rounded up to the next highest value that is). -9) If you want to link your ports or other programs that use -GNU configure with pthreads, check the documentation of the -program. If the configure file hasn't been customized too -much for FreeBSD libc_r, and if it explicitly supports posix -threads, then something like the following works in a -number of cases (exact details may vary case to case): - -CFLAGS="-DLINUXTHREADS -D_THREAD_SAFE" ./configure --with-threads=posix - -10) Read file README. +7) Note that this is an older version of linuxthreads. More current +versions are at http://www.kernel.org/pub/linux/libs/glibc. |