[537] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

compiling notes on BSD/OS 2.1 for pthreads 1.60beta6

daemon@ATHENA.MIT.EDU (Vivek Khera)
Mon Dec 2 18:26:02 1996

To: pthreads@MIT.EDU
Cc: BSDI Users <bsdi-users@bsdi.com>
Date: Mon, 02 Dec 1996 18:00:19 -0500
From: Vivek Khera <khera@kci.kciLink.com>

Hi.  I just finished compiling and installing pthreads 1.60beta6 on BSD/OS 2.1
and needed to make the following changes.

1) update the syscall-i386-bsdi-2.0.S file with the following patch.  This has
to do with symbol pasting in the C pre-processor inserting spaces as per ANSI
standard.  Using the "##" paste operator fixes it as below.  I used "gcc" to
compile, not "cc".  On BSD/OS 2.1, cc is really "gcc version 1.42" and "gcc"
is "gcc version 2.7.2".

*** syscall-i386-bsdi-2.0.S	Tue Oct  1 14:59:11 1996
--- syscall-i386-bsdi-2.1.S	Mon Dec  2 17:42:52 1996
***************
*** 179,195 ****
   */
  
  #ifdef PROF
! #define	ENTRY(x)	.globl _/**/x; .align 2; _/**/x:  \
  			.data; 1:; .long 0; .text; \
  			pushl %ebp; movl %esp,%ebp; \
  			leal 1b,%eax; call mcount; leave
! #define	ASENTRY(x)	.globl x; .align 2; x: \
  			.data; 1:; .long 0; .text; \
  			pushl %ebp; movl %esp,%ebp; \
  			leal 1b,%eax; call mcount; leave
  #else
! #define	ENTRY(x)	.globl _/**/x; .align 2; _/**/x: 
! #define	ASENTRY(x)	.globl x; .align 2; x: 
  #endif
  
  /*-
--- 179,195 ----
   */
  
  #ifdef PROF
! #define	ENTRY(x)	.globl _##x; .align 2; _##x##:  \
  			.data; 1:; .long 0; .text; \
  			pushl %ebp; movl %esp,%ebp; \
  			leal 1b,%eax; call mcount; leave
! #define	ASENTRY(x)	.globl x; .align 2; x##: \
  			.data; 1:; .long 0; .text; \
  			pushl %ebp; movl %esp,%ebp; \
  			leal 1b,%eax; call mcount; leave
  #else
! #define	ENTRY(x)	.globl _##x; .align 2; _##x##: 
! #define	ASENTRY(x)	.globl x; .align 2; x##: 
  #endif
  
  /*-



2) the config.flags file calls tar with "chf" flags.  On BSD/OS the "h" flag
is "L" to follow sym links.  Why, I don't know, but that's how it is.  I just
edited the file to change the options and it did the trick for installing.

3) I had to set permissions on the installed files to allow all read access;
when tar makes a copy of the include tree, it is set to the owner-read-only
permissions from the source tree.

  cd /usr/local/pthreads
  find . -print | xargs chmod a+r
  find . -type d -print | xargs chmod a+x

Other than that, it compiled and installed just fine.  Now to test it out...

Thanks.

								v.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                        GovCon, Inc.
Internet: vivek@govcon.com                Rockville, MD       +1-301-258-8292
Government Contractor Resource Center     http://www.govcon.com/

home help back first fref pref prev next nref lref last post