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]

DJGPP bootstrap fix revised


Hi again,

I revised the DJGPP bootstrap fix to account for -std as suggested Joseph 
Myers. And I revised to patch to keep -mbnu210 and issue a warning that it is
ignore and obsolete. It turns out that there is at least one package that uses
-mbnu210, so it must stick around a while as a no-op.

2001-02-11  Mark Elbrecht  <snowball3@bigfoot.com>

	* config/i386/djgpp.h (SUBTARGET_SWITCHES): Document the option is
	  ignored and obsolete.
	  (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY): Delete.
	  (SUBTARGET_OVERRIDE_OPTIONS): New.
	  (CPP_SPEC): Define MSDOS except when -ansi or similiar -std flags
	  are used.
	* config/i386/djgpp.h: Revise comment describing MASK_BNU210.

Index: djgpp.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/djgpp.h,v
retrieving revision 1.22
diff -c -p -r1.22 djgpp.h
*** djgpp.h	2001/02/07 00:33:20	1.22
--- djgpp.h	2001/02/10 18:55:31
*************** Boston, MA 02111-1307, USA.  */
*** 117,123 ****
  /* Include <sys/version.h> so __DJGPP__ and __DJGPP_MINOR__ are defined.  */
  #undef CPP_SPEC
  #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
!   -imacros %s../include/sys/version.h"
  
  /* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl.
     This cannot be done in LINK_SPECS as that LINK_SPECS is processed
--- 117,123 ----
  /* Include <sys/version.h> so __DJGPP__ and __DJGPP_MINOR__ are defined.  */
  #undef CPP_SPEC
  #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
!   %{!ansi:%{!std=c*:%{!std=i*:-DMSDOS}}} -imacros %s../include/sys/version.h"
  
  /* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl.
     This cannot be done in LINK_SPECS as that LINK_SPECS is processed
*************** dtor_section ()							\
*** 260,281 ****
  /* Used to be defined in xm-djgpp.h, but moved here for cross-compilers.  */
  #define LIBSTDCXX "-lstdcxx"
  
! /* Add command line option -mbnu210 to indicate we can use binutil 2.10's features.  */
  #undef MASK_BNU210
  #define MASK_BNU210 (0x40000000)
  
  #undef SUBTARGET_SWITCHES
! #define SUBTARGET_SWITCHES 		\
!   { "bnu210", -MASK_BNU210, "Enable weak symbol and enhanced C++ template support. Binutils 2.10 or higher required." 
}, \
!   { "no-bnu210", MASK_BNU210, "Disable weak symbol and enhanced C++ template support." },
! 
! /* Weak symbols and .gnu.linkonce are only in Binutils-2.10 and later. 
!    Default to using Binutils 2.10 features.  */
! #undef SUPPORTS_WEAK
! #define SUPPORTS_WEAK ((target_flags & MASK_BNU210) == 0)
! 
! #undef SUPPORTS_ONE_ONLY
! #define SUPPORTS_ONE_ONLY ((target_flags & MASK_BNU210) == 0)
  
  /* Support for C++ templates.  */
  #undef MAKE_DECL_ONE_ONLY
--- 260,286 ----
  /* Used to be defined in xm-djgpp.h, but moved here for cross-compilers.  */
  #define LIBSTDCXX "-lstdcxx"
  
! /* -mbnu210 is now ignored and obsolete. It was used to enable support for
!    weak symbols, and .gnu.linkonce support.  */
  #undef MASK_BNU210
  #define MASK_BNU210 (0x40000000)
  
  #undef SUBTARGET_SWITCHES
! #define SUBTARGET_SWITCHES \
!   { "no-bnu210", -MASK_BNU210, "Ignored (obsolete)." }, \
!   { "bnu210", MASK_BNU210, "Ignored (obsolete)." },
! 
! /* Warn that -mbnu210 is now obsolete.  */
! #undef  SUBTARGET_OVERRIDE_OPTIONS
! #define SUBTARGET_OVERRIDE_OPTIONS \
! do \
!   { \
!     if (target_flags & MASK_BNU210) \
!       {	\
!         warning ("-mbnu210 is ignored (option is obsolete)."); \
!       }	\
!   } \
! while (0)
  
  /* Support for C++ templates.  */
  #undef MAKE_DECL_ONE_ONLY


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