public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* --enable-new-abi
@ 1998-05-09  4:22 Martin von Loewis
  0 siblings, 0 replies; 4+ messages in thread
From: Martin von Loewis @ 1998-05-09  4:22 UTC (permalink / raw)
  To: egcs

This is an experimental patch for egcs, enabling -fnew-abi by default.
It is useful for compiling libstdc++ with the new ABI. Currently, this
enables:
- a new lay-out for classes if padding is involved,
- a new mechanism to provide shorter mangled names (-fsquangle),
- a standard-conforming processing of namespace std (-fhonor-std).

Unfortunately, it is not possible to disable the default during
runtime (i.e. -fno-new-abi doesn't really work). Therefore, this patch
should not go into egcs. Suggestions for improvements are welcome.

Martin

Sat May  9 09:47:48 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>

	* configure.in (--enable-new-abi): New option.
	* acconfig.h: Likewise.

	* gcc.c (CPP_SPEC): Add -D_HONOR_STD if configured for new ABI.
	(CC1PLUS_SPEC): Add -fnew-abi if configured for new ABI.


Index: acconfig.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/acconfig.h,v
retrieving revision 1.14
diff -u -p -r1.14 acconfig.h
--- acconfig.h	1998/04/04 17:37:22	1.14
+++ acconfig.h	1998/05/09 07:44:14
@@ -45,4 +48,7 @@
 
 /* Whether abort must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_ABORT
+
+/* Use new g++ ABI */
+#undef ENABLE_NEW_ABI
 @TOP@
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.99
diff -u -p -r1.99 configure.in
--- configure.in	1998/05/08 01:18:39	1.99
+++ configure.in	1998/05/09 07:44:23
@@ -55,6 +55,12 @@ AC_ARG_WITH(elf,
 elf="$with_elf",
 elf=no)
 
+# Specify usage of new ABI
+AC_ARG_ENABLE(new-abi,
+[  --enable-new-abi        try experimental incompatible g++ features.],
+newabi="$enable_new_abi",
+newabi=no)
+
 # Specify the local prefix
 AC_ARG_WITH(local-prefix,
 [  --with-local-prefix=DIR specifies directory to put local include.],
@@ -180,6 +192,10 @@ AC_CACHE_VAL(gcc_cv_header_inttypes_h,
    gcc_cv_header_inttypes_h=yes],
   gcc_cv_header_inttypes_h=no)])
 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
+
+if test $newabi = yes; then
+  AC_DEFINE(ENABLE_NEW_ABI)
+fi
 
 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
 	index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
Index: gcc.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gcc.c,v
retrieving revision 1.32
diff -u -p -r1.32 gcc.c
--- gcc.c	1998/05/07 20:49:41	1.32
+++ gcc.c	1998/05/09 07:44:30
@@ -403,6 +403,11 @@ proper position among the other output f
 #ifndef CPP_SPEC
 #define CPP_SPEC ""
 #endif
+#ifdef ENABLE_NEW_ABI
+#define CPP_FULL_SPEC CPP_SPEC "-D__HONOR_STD"
+#else
+#define CPP_FULL_SPEC CPP_SPEC
+#endif
 
 /* config.h can define CC1_SPEC to provide extra args to cc1 and cc1plus
    or extra switch-translations.  */
@@ -415,6 +420,11 @@ proper position among the other output f
 #ifndef CC1PLUS_SPEC
 #define CC1PLUS_SPEC ""
 #endif
+#ifdef ENABLE_NEW_ABI
+#define CC1PLUS_FULL_SPEC CC1PLUS_SPEC "-fnew-abi"
+#else
+#define CC1PLUS_FULL_SPEC CC1PLUS_SPEC
+#endif
 
 /* config.h can define LINK_SPEC to provide extra args to the linker
    or extra switch-translations.  */
@@ -470,10 +480,10 @@ proper position among the other output f
 #define LINKER_NAME "collect2"
 #endif
 
-static char *cpp_spec = CPP_SPEC;
+static char *cpp_spec = CPP_FULL_SPEC;
 static char *cpp_predefines = CPP_PREDEFINES;
 static char *cc1_spec = CC1_SPEC;
-static char *cc1plus_spec = CC1PLUS_SPEC;
+static char *cc1plus_spec = CC1PLUS_FULL_SPEC;
 static char *signed_char_spec = SIGNED_CHAR_SPEC;
 static char *asm_spec = ASM_SPEC;
 static char *asm_final_spec = ASM_FINAL_SPEC;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: --enable-new-abi
  1998-05-09 12:59 ` --enable-new-abi Martin von Loewis
@ 1998-05-09 23:30   ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-05-09 23:30 UTC (permalink / raw)
  To: Martin von Loewis; +Cc: meissner, egcs

  In message < 199805091953.VAA04804@mira.isdn.cs.tu-berlin.de >you write:
  > > I think that if this goes in, the switch should be changed to something l
  > ike:
  > > 
  > > 	--enable-c++-new-abi
  > 
  > OK, I renamed it to --enable-new-gxx-abi. Can autoconf deal with '+'
  > in option names?
Dunno.  Worth testing since g++/c++ would be better than gxx/cxx :-)

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: --enable-new-abi
  1998-05-09 11:03 --enable-new-abi Michael Meissner
@ 1998-05-09 12:59 ` Martin von Loewis
  1998-05-09 23:30   ` --enable-new-abi Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Martin von Loewis @ 1998-05-09 12:59 UTC (permalink / raw)
  To: meissner; +Cc: egcs

> I think that if this goes in, the switch should be changed to something like:
> 
> 	--enable-c++-new-abi

OK, I renamed it to --enable-new-gxx-abi. Can autoconf deal with '+'
in option names?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: --enable-new-abi
@ 1998-05-09 11:03 Michael Meissner
  1998-05-09 12:59 ` --enable-new-abi Martin von Loewis
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Meissner @ 1998-05-09 11:03 UTC (permalink / raw)
  To: egcs, martin

I think that if this goes in, the switch should be changed to something like:

	--enable-c++-new-abi


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-05-09 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-09  4:22 --enable-new-abi Martin von Loewis
1998-05-09 11:03 --enable-new-abi Michael Meissner
1998-05-09 12:59 ` --enable-new-abi Martin von Loewis
1998-05-09 23:30   ` --enable-new-abi Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).