This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH for recent problems with tmpfiles.
- To: egcs-patches at cygnus dot com
- Subject: PATCH for recent problems with tmpfiles.
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Tue, 30 Jun 1998 10:32:21 +0200 (MET DST)
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
On all systems which do not have separate sections for global
CTOR/DTORs, collect2 generates a small C source, which needs to be
compiled by gcc itself. Due to the removal of the .c suffix, gcc needs
to be instructed `hey, this is a C file'; but it's currently using the
wrong option for this: `-lang-c' is used internally (e.g. by cpp), but
gcc itself is using `-x <lang>' for deciding which compiler to use.
This small patch fixes it.
manfred
1998-06-30 Manfred Hollstein <manfred@s-direktnet.de>
* collect2.c (main): Use "-x c" to force the resulting ctor/dtor
file to be compiled with the C compiler.
--- gcc/collect2.c.orig Mon Jun 29 11:32:59 1998
+++ gcc/collect2.c Tue Jun 30 10:22:20 1998
@@ -1137,7 +1137,8 @@ main (argc, argv)
#endif
ldout = make_temp_file ();
*c_ptr++ = c_file_name;
- *c_ptr++ = "-lang-c";
+ *c_ptr++ = "-x";
+ *c_ptr++ = "c";
*c_ptr++ = "-c";
*c_ptr++ = "-o";
*c_ptr++ = o_file;