diff options
author | Earnie Boyd <earnie@users.sf.net> | 2000-11-30 00:14:48 +0300 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2000-11-30 00:14:48 +0300 |
commit | b52aba3fc292bced2167b49831db4a5350dfa090 (patch) | |
tree | 461836c0aac06ed62066e695999f5e33af797c9e | |
parent | 1ad02eaa81469e2a37197663bdcf1cd1b83f7d37 (diff) |
* Makefile.in: eliminate the need for RUNTIME and CRT_ID.
Always build crt1.o, dllcrt1.o, crt2.o and dllcrt2.o.
Create a libcoldname.a for the oldname library for CRTDLL.
Restrict libmoldname.a for the oldname library for MSVCRT.
* configure.in: eliminate setting RUNTIME and CRT_ID variables.
Restructure the $target_os case logic.
Always name the MinGW thread dll helper mingwm.
Change Cygwin's HEADER_SUBDIR value from mingw32 to mingw.
* configure: regenerate.
-rw-r--r-- | winsup/mingw/ChangeLog | 12 | ||||
-rw-r--r-- | winsup/mingw/Makefile.in | 39 | ||||
-rwxr-xr-x | winsup/mingw/configure | 34 | ||||
-rw-r--r-- | winsup/mingw/configure.in | 30 |
4 files changed, 61 insertions, 54 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 6b802ade6..5cb3f55e9 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,15 @@ +2000-11-29 Earnie Boyd <earnie_boyd@yahoo.com> + + * Makefile.in: eliminate the need for RUNTIME and CRT_ID. + Always build crt1.o, dllcrt1.o, crt2.o and dllcrt2.o. + Create a libcoldname.a for the oldname library for CRTDLL. + Restrict libmoldname.a for the oldname library for MSVCRT. + * configure.in: eliminate setting RUNTIME and CRT_ID variables. + Restructure the $target_os case logic. + Always name the MinGW thread dll helper mingwm. + Change Cygwin's HEADER_SUBDIR value from mingw32 to mingw. + * configure: regenerate. + 2000-11-22 Earnie Boyd <earnie_boyd@yahoo.com> * Makefile.in: Fix bindist target to distribute the correct files. diff --git a/winsup/mingw/Makefile.in b/winsup/mingw/Makefile.in index 7b4070bb3..036c28217 100644 --- a/winsup/mingw/Makefile.in +++ b/winsup/mingw/Makefile.in @@ -116,13 +116,13 @@ FLAGS_TO_PASS:=\ prefix="$(prefix)" \ target_alias="$(target_alias)" -CRT0S = crt$(CRT_ID).o dllcrt$(CRT_ID).o CRT_noglob.o crtmt.o crtst.o +CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dirent.o dllmain.o gccmain.o \ main.o crtst.o mthr_stub.o MOLD_OBJS = ctype_old.o string_old.o LIBS = libcrtdll.a libmsvcrt.a libmsvcrt20.a libmsvcrt40.a libmingw32.a \ - libmoldname.a $(LIBM_A) libmingwthrd.a + libcoldname.a libmoldname.a $(LIBM_A) libmingwthrd.a DLLS = $(THREAD_DLL_NAME) @@ -189,23 +189,40 @@ libmingw32.a: $(MINGW_OBJS) $(AR) rc $@ $(MINGW_OBJS) $(RANLIB) $@ -$(srcdir)/moldname-$(RUNTIME).def: moldname.def.in - $(CC) -DRUNTIME=$(RUNTIME) \ - -D__FILENAME__=moldname-${RUNTIME}.def \ - -D__`echo $(RUNTIME) | tr '[a-z]' '[A-Z]'`__ -c -E -P \ +$(srcdir)/moldname-crtdll.def: moldname.def.in + $(CC) -DRUNTIME=crtdll \ + -D__FILENAME__=moldname-crtdll.def \ + -D__CRTDLL__ -c -E -P \ -xc-header $? > $@ -libmoldname.a: $(srcdir)/moldname-$(RUNTIME).def $(MOLD_OBJS) +$(srcdir)/moldname-msvcrt.def: moldname.def.in + $(CC) -DRUNTIME=msvcrt \ + -D__FILENAME__=moldname-msvcrt.def \ + -D__MSVCRT__ -c -E -P \ + -xc-header $? > $@ + +libcoldname.a: $(srcdir)/moldname-crtdll.def $(MOLD_OBJS) + $(DLLTOOL) --as $(AS) -k -U \ + --dllname crtdll.dll \ + --def $(srcdir)/moldname-crtdll.def \ + --output-lib $@ + $(AR) rc $@ $(MOLD_OBJS) + $(RANLIB) $@ + +libmoldname.a: $(srcdir)/moldname-msvcrt.def $(MOLD_OBJS) $(DLLTOOL) --as $(AS) -k -U \ - --dllname $(RUNTIME).dll \ - --def $(srcdir)/moldname-$(RUNTIME).def \ + --dllname msvcrt.dll \ + --def $(srcdir)/moldname-msvcrt.def \ --output-lib $@ $(AR) rc $@ $(MOLD_OBJS) $(RANLIB) $@ -# The special rule is necessary. +# The special rules are necessary. +crt1.o dllcrt1.o: + $(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@ + crt2.o dllcrt2.o: - $(CC) -c -D__MSVCRT__ $(ALL_CFLAGS) $< -o $@ + $(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@ clean: -rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp diff --git a/winsup/mingw/configure b/winsup/mingw/configure index f304b3519..15708528e 100755 --- a/winsup/mingw/configure +++ b/winsup/mingw/configure @@ -1665,35 +1665,20 @@ SUBDIRS="" HEADER_SUBDIR="" case "$target_os" in -*mingw32msvc*) - CRT_ID=2 - MNO_CYGWIN= - RUNTIME=msvcrt - THREAD_DLL=mingwm - LIBM_A=libm.a - LIBGMON_A=libgmon.a - SUBDIRS="profile" - configdirs="$configdirs profile" - ;; *cygwin*) - CRT_ID=1 MNO_CYGWIN=-mno-cygwin - RUNTIME=crtdll - THREAD_DLL=mingwc configdirs="$configdirs" + # FIXME MinGW versions of libm.a and libgmon.a needed for -mno-cygwin # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll # overwrite Cygwin's one. Likewise for libgmon.a. LIBM_A= LIBGMON_A= # Install mingw headers in mingw subdirectory. - HEADER_SUBDIR="mingw32" + HEADER_SUBDIR="mingw" ;; *) - # Build it for CRTDLL by default. - CRT_ID=1 + # Build it for MSVCRT by default. MNO_CYGWIN= - RUNTIME=crtdll - THREAD_DLL=mingwc LIBM_A=libm.a LIBGMON_A=libgmon.a SUBDIRS="profile" @@ -1701,6 +1686,13 @@ case "$target_os" in ;; esac +# THREAD_DLL used to be set within the above case and was mingwc for CRTDLL. +# I can find no reason to do this. +# +# FIXME: In the future I would like to change the dll name to mingwthrd to +# to match the libmingwthrd.a name. +THREAD_DLL=mingwm + if test -n "$configdirs"; then subdirs="$configdirs" @@ -1715,8 +1707,6 @@ MKINSTALLDIRS=$ac_aux_dir/mkinstalldirs - - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1729,7 +1719,7 @@ MKINSTALLDIRS=$ac_aux_dir/mkinstalldirs # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1733: checking for a BSD compatible install" >&5 +echo "configure:1723: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1955,8 +1945,6 @@ s%@target_vendor@%$target_vendor%g s%@target_os@%$target_os%g s%@subdirs@%$subdirs%g s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g -s%@CRT_ID@%$CRT_ID%g -s%@RUNTIME@%$RUNTIME%g s%@MNO_CYGWIN@%$MNO_CYGWIN%g s%@THREAD_DLL@%$THREAD_DLL%g s%@LIBM_A@%$LIBM_A%g diff --git a/winsup/mingw/configure.in b/winsup/mingw/configure.in index 5d78bf656..3e98517e7 100644 --- a/winsup/mingw/configure.in +++ b/winsup/mingw/configure.in @@ -94,35 +94,20 @@ SUBDIRS="" HEADER_SUBDIR="" case "$target_os" in -*mingw32msvc*) - CRT_ID=2 - MNO_CYGWIN= - RUNTIME=msvcrt - THREAD_DLL=mingwm - LIBM_A=libm.a - LIBGMON_A=libgmon.a - SUBDIRS="profile" - configdirs="$configdirs profile" - ;; *cygwin*) - CRT_ID=1 MNO_CYGWIN=-mno-cygwin - RUNTIME=crtdll - THREAD_DLL=mingwc configdirs="$configdirs" + # FIXME MinGW versions of libm.a and libgmon.a needed for -mno-cygwin # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll # overwrite Cygwin's one. Likewise for libgmon.a. LIBM_A= LIBGMON_A= # Install mingw headers in mingw subdirectory. - HEADER_SUBDIR="mingw32" + HEADER_SUBDIR="mingw" ;; *) - # Build it for CRTDLL by default. - CRT_ID=1 + # Build it for MSVCRT by default. MNO_CYGWIN= - RUNTIME=crtdll - THREAD_DLL=mingwc LIBM_A=libm.a LIBGMON_A=libgmon.a SUBDIRS="profile" @@ -130,14 +115,19 @@ case "$target_os" in ;; esac +# THREAD_DLL used to be set within the above case and was mingwc for CRTDLL. +# I can find no reason to do this. +# +# FIXME: In the future I would like to change the dll name to mingwthrd to +# to match the libmingwthrd.a name. +THREAD_DLL=mingwm + if test -n "$configdirs"; then AC_CONFIG_SUBDIRS($configdirs) fi MKINSTALLDIRS=$ac_aux_dir/mkinstalldirs AC_SUBST(MKINSTALLDIRS) -AC_SUBST(CRT_ID) -AC_SUBST(RUNTIME) AC_SUBST(MNO_CYGWIN) AC_SUBST(THREAD_DLL) AC_SUBST(LIBM_A) |