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]

[PATCH]: Pass -D__HAVE_SHORT_DOUBLE__ when -fshort-double (HC11/HC12)


Hi!

To compile newlib correctly (_DOUBLE_IS_32BITS), pass -D__HAVE_SHORT_DOUBLE__
when -fshort-double option is specified.

I've committed this on mainline and 3_0-branch. Tested on newlib 1.9.

	Stephane

2001-05-04  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* config/m68hc11/m68hc11.h (CPP_SPEC): Pass -D__HAVE_SHORT_DOUBLE__
	to the pre-processor when -fshort-double is specified.
	* config/m68hc11/m68hc11.2 (CPP_SPEC): Likewise.
Index: config/m68hc11/m68hc11.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68hc11/m68hc11.h,v
retrieving revision 1.9
diff -u -p -r1.9 m68hc11.h
--- m68hc11.h	2001/05/04 18:08:36	1.9
+++ m68hc11.h	2001/05/04 19:39:45
@@ -65,7 +65,8 @@ Note:
 "%{mshort:-D__HAVE_SHORT_INT__ -D__INT__=16 -D__INT_MAX__=32767}\
  %{!mshort:-D__INT__=32 -D__INT_MAX__=2147483647}\
  %{m68hc12:-Dmc6812 -DMC6812 -Dmc68hc12}\
- %{!m68hc12:-Dmc6811 -DMC6811 -Dmc68hc11}"
+ %{!m68hc12:-Dmc6811 -DMC6811 -Dmc68hc11}\
+ %{fshort-double:-D__HAVE_SHORT_DOUBLE__}"
 #endif
 
 #undef STARTFILE_SPEC
Index: config/m68hc11/m68hc12.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68hc11/m68hc12.h,v
retrieving revision 1.2
diff -u -p -r1.2 m68hc12.h
--- m68hc12.h	2001/03/27 20:09:27	1.2
+++ m68hc12.h	2001/05/04 19:39:55
@@ -32,7 +32,8 @@ Boston, MA 02111-1307, USA.  */
 "%{mshort:-D__HAVE_SHORT_INT__ -D__INT__=16 -D__INT_MAX__=32767}\
  %{!mshort:-D__INT__=32 -D__INT_MAX__=2147483647}\
  %{m68hc11:-Dmc6811 -DMC6811 -Dmc68hc11}\
- %{!m68hc11:-Dmc6812 -DMC6812 -Dmc68hc12}"
+ %{!m68hc11:-Dmc6812 -DMC6812 -Dmc68hc12}\
+ %{fshort-double:-D__HAVE_SHORT_DOUBLE__}"
 
 /* Default target_flags if no switches specified.  */
 #define TARGET_DEFAULT		(MASK_M6812)

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