delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/29/14:24:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Ralf Habacker" <Ralf DOT Habacker AT freenet DOT de>
To: <cygwin AT cygwin DOT com>
Subject: RE: duplicate regexec/regcomp functions detected
Date: Sat, 29 Dec 2001 20:21:43 +0100
Message-ID: <003201c1909e$0cef0cb0$0e6307d5@BRAMSCHE>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
In-Reply-To: <20011228174956.GA30625@redhat.com>

------=_NextPart_000_0033_01C190A6.6EB374B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Ralf Habacker wrote
>The patch for creating libpthread.a is appended. It contains a script names "speclib" and an
additional rule >in the src/winsup/cygwin/Makefile.in.

I have recognized yet a little problem with the speclib script. I have checked this from the
cygwin build dir without any errors. If someone was in the winsup dir and does a make cygwin
or make, than some command in speclib does not found the input files. The problem is that ar
does not have an -o option for an output dir, so the hack to emulate that does not work.
Perhaps it is better to use the absolute path of the input library, but currently I have no
idea, how to solve this. :-(
Perhaps anyone else have an idea ?

speclib

...
cd $tmpdir
$ar x $PWD/$inlib $FILES
cd ..
...

Regards
Ralf

------=_NextPart_000_0033_01C190A6.6EB374B0
Content-Type: application/octet-stream;
	name="Makefile.in.dif"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Makefile.in.dif"

Index: Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/src/src/winsup/cygwin/Makefile.in,v
retrieving revision 1.75
diff -u -b -B -p -r1.75 Makefile.in
--- Makefile.in 2001/12/26 05:02:07     1.75
+++ Makefile.in 2001/12/29 18:54:24
@@ -100,6 +100,9 @@ DLL_ENTRY:=3D AT DLL_ENTRY@
 LIBGMON_A:=3Dlibgmon.a
 GMON_START:=3Dgcrt0.o

+LIBPTHREAD_A:=3Dlibpthread.a
+
+
 # Some things want these from libc, but they have their own static
 # data which apps can get to, which is a pain in the dll, so we
 # include them directly into the library.
@@ -152,7 +155,7 @@ install_host=3D AT install_host@

 all: all_target $(all_host)

-all_target: $(LIB_NAME) automode.o binmode.o textmode.o $(LIBGMON_A)
+all_target: $(LIB_NAME) automode.o binmode.o textmode.o $(LIBGMON_A) =
$(LIBPTHREAD_A)

 all_host: new-$(LIB_NAME) cygrun.exe

@@ -160,9 +163,9 @@ force:

 install: install-libs install-headers install-man $(install_host) =
$(install_target)

-install-libs: $(LIB_NAME)
+install-libs: $(LIB_NAME) $(LIBPTHREAD_A)
        $(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \
-       for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) automode.o =
binmode.o textmode.o ; do \
+       for i in $(LIB_NAME) $(LIBPTHREAD_A) $(GMON_START) $(LIBGMON_A) =
automode.o binmode.o textmode.o; do \
            $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
        done

@@ -202,7 +205,8 @@ maintainer-clean realclean: clean


 # Rule to build cygwin.dll
-new-$(DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) =
$(LIBC) $(LIBM) Makefile winver_stamp
+new-$(DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) =
$(LIBC) $(LIBM) winver_stamp
+#new-$(DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) =
$(LIBC) $(LIBM) Makefile winver_stamp
        $(CXX) $(CXXFLAGS) -nostdlib -Wl,-T$(firstword $^) =
-Wl,--out-implib,cygdll.a -shared -o $@ \
        -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
        $(DLL_IMPORTS) $(MALLOC_OBJ) $(LIBM) $(LIBC) \
@@ -213,6 +217,11 @@ $(LIB_NAME): rmsym newsym new-$(DLL_NAME
        /bin/sh ${word 1,$^} ./cygdll.a "$(NM)" "$(AR)" "$(RANLIB)" =
$(OBSOLETE_FUNCTIONS) || exit 0
        /bin/sh ${word 2,$^} ./cygdll.a "$(AS)" "$(AR)" "$(RANLIB)" =
$(NEW_FUNCTIONS) || exit 0
        (echo create $(LIB_NAME); echo addmod $(LIBCOS); echo addlib =
cygdll.a; echo save) | $(AR) -M
+
+# Rule to build lib_pthread.a
+$(LIBPTHREAD_A): speclib new-$(DLL_NAME)
+       /bin/sh ${word 1,$^} cygdll.a pthread.o $@ "$(NM)" "$(AR)" =
"$(RANLIB)" || exit 0
+       @echo create $(LIBPTHREAD_A)

 # Rule to make stub library used by testsuite
 # dependency set to $(LIB_NAME) to accommodate make -j2.

------=_NextPart_000_0033_01C190A6.6EB374B0
Content-Type: application/octet-stream;
	name="speclib"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="speclib"

#!/bin/sh
#
# create specific link library for libpthread using symbols from libcygwin.a
# 
inlib=$1; shift
reflib=$1; shift
outlib=$1; shift
nm=$1; shift
ar=$1; shift
ranlib=$1; shift

tmpdir=slibtmp.dir

# awk script for extracing related object files 
SYMBOLS=`nm $reflib | grep "[TD] _" | gawk '{ print $3 }'`

SCRIPT='$1 ~ /^d00/ { file = $1; gsub(":","",file); }'

for i in $SYMBOLS; do 
	SCRIPT="$SCRIPT \$3 ~ /^$i/ { print file; }"
done

# remove previous link library 
rm -f $outlib

# extract related object files 
FILES=`$nm $PWD/$inlib | gawk "$SCRIPT"`
mkdir $tmpdir
cd $tmpdir
$ar x $PWD/$inlib $FILES
cd ..

# create new link library for pthread
$ar cru $PWD/$outlib $tmpdir/*.o
$ranlib $PWD/$outlib 

# remove temporay files 
rm -fr $tmpdir




------=_NextPart_000_0033_01C190A6.6EB374B0
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
------=_NextPart_000_0033_01C190A6.6EB374B0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019