This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Fix for building i386-mingw32 toolchain without thread support


Hi Richard,

  There is currently a problem building an i386-mingw32 toolchain when
  it is configured with --disable-threads.  The problem is that it
  still trys to use gthr-win32.c as part of the gcc sources, and this
  happens because the t-mingw32 file adds it to the libgcc files via
  LIB2FUNCS_EXTRA.

  So, I am hoping that you will approve the small patch below which
  separates out the definition of LIB2FUNCS_EXTRA from t-mingw32 into
  its own makefile fragment, and which then only includes this new
  fragment into 'tmake_file' if threads have been enabled.

  Tested by building an i386-mingw32 toolchain configured with
  --disable-threads and another one with --enable-threads configured.

  OK to apply ?
  
Cheers
  Nick

gcc/ChangeLog
  2006-08-15  Nick Clifton  <nickc@redhat.com>

          * config.gcc (x86-mingw32): Add a gthr-win32.h including makefile
          fragment to tmake_file only if threads are enabled.
          * config/i386/t-mingw32 (LIB2FUNCS_EXTRA): Move to...
          * config/i386/t-gthr-win32: New file. ... here.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 116150)
+++ gcc/config.gcc	(working copy)
@@ -1275,7 +1275,10 @@ i[34567]86-*-mingw32*)
 	extra_objs="winnt.o winnt-stubs.o"
 	cxx_target_objs=winnt-cxx.o
 	case ${enable_threads} in
-	  "" | yes | win32) thread_file='win32' ;;
+	  "" | yes | win32)
+	  thread_file='win32'
+	  tmake_file="${tmake_file} i386/t-gthr-win32"
+	  ;;
 	esac
 	case ${target} in
 		*mingw32crt*)

Index: gcc/config/i386/t-mingw32
===================================================================
--- gcc/config/i386/t-mingw32	(revision 116150)
+++ gcc/config/i386/t-mingw32	(working copy)
@@ -1,5 +1,2 @@
-# We hide calls to w32api needed for w32 thread support here:
-LIB2FUNCS_EXTRA = $(srcdir)/config/i386/gthr-win32.c
-
 # Match SYSTEM_INCLUDE_DIR
 NATIVE_SYSTEM_HEADER_DIR = /mingw/include

*** /dev/null	2006-08-14 08:22:37.082619232 +0100
--- gcc/config/i386/t-gthr-win32	2006-08-15 17:32:17.000000000 +0100
***************
*** 0 ****
--- 1,3 ----
+ # We hide calls to w32api needed for w32 thread support here:
+ LIB2FUNCS_EXTRA = $(srcdir)/config/i386/gthr-win32.c
+ 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]