Article View: gnu.gcc.help
Article #51475cross compilers?
From: Richard Stallman
Date: Fri, 21 May 1993 20:36
Date: Fri, 21 May 1993 20:36
104 lines
4529 bytes
4529 bytes
If you are trying a cross compiler with C++ or Objective C, and you
need to use collect2, this patch to 2.4.0 should make things work better.
I hope people will try it asap and tell me if there is any problem.
===================================================================
RCS file: /home/fsf/rms/cc/RCS/collect2.c,v
retrieving revision 1.34
diff -c -r1.34 collect2.c
*** collect2.c 1993/05/21 19:55:25 1.34
--- collect2.c 1993/05/21 20:25:51
***************
*** 790,834 ****
full_ld_suffix
= xcalloc (strlen (ld_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_ld_suffix, ld_suffix);
- strcat (full_ld_suffix, "-");
strcat (full_ld_suffix, target_machine);
full_real_ld_suffix
= xcalloc (strlen (real_ld_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_real_ld_suffix, real_ld_suffix);
- strcat (full_real_ld_suffix, "-");
strcat (full_real_ld_suffix, target_machine);
full_gld_suffix
= xcalloc (strlen (gld_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_gld_suffix, gld_suffix);
- strcat (full_gld_suffix, "-");
strcat (full_gld_suffix, target_machine);
full_nm_suffix
= xcalloc (strlen (nm_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_nm_suffix, nm_suffix);
- strcat (full_nm_suffix, "-");
strcat (full_nm_suffix, target_machine);
full_gnm_suffix
= xcalloc (strlen (gnm_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_gnm_suffix, gnm_suffix);
- strcat (full_gnm_suffix, "-");
strcat (full_gnm_suffix, target_machine);
full_strip_suffix
= xcalloc (strlen (strip_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_strip_suffix, strip_suffix);
- strcat (full_strip_suffix, "-");
strcat (full_strip_suffix, target_machine);
full_gstrip_suffix
= xcalloc (strlen (gstrip_suffix) + strlen (target_machine) + 2, 1);
- strcpy (full_gstrip_suffix, gstrip_suffix);
- strcat (full_gstrip_suffix, "-");
strcat (full_gstrip_suffix, target_machine);
#endif /* CROSS_COMPILE */
/* Try to discover a valid linker/nm/strip to use. */
--- 790,834 ----
full_ld_suffix
= xcalloc (strlen (ld_suffix) + strlen (target_machine) + 2, 1);
strcat (full_ld_suffix, target_machine);
+ strcat (full_ld_suffix, "-");
+ strcpy (full_ld_suffix, ld_suffix);
full_real_ld_suffix
= xcalloc (strlen (real_ld_suffix) + strlen (target_machine) + 2, 1);
strcat (full_real_ld_suffix, target_machine);
+ strcat (full_real_ld_suffix, "-");
+ strcpy (full_real_ld_suffix, real_ld_suffix);
full_gld_suffix
= xcalloc (strlen (gld_suffix) + strlen (target_machine) + 2, 1);
strcat (full_gld_suffix, target_machine);
+ strcat (full_gld_suffix, "-");
+ strcpy (full_gld_suffix, gld_suffix);
full_nm_suffix
= xcalloc (strlen (nm_suffix) + strlen (target_machine) + 2, 1);
strcat (full_nm_suffix, target_machine);
+ strcat (full_nm_suffix, "-");
+ strcpy (full_nm_suffix, nm_suffix);
full_gnm_suffix
= xcalloc (strlen (gnm_suffix) + strlen (target_machine) + 2, 1);
strcat (full_gnm_suffix, target_machine);
+ strcat (full_gnm_suffix, "-");
+ strcpy (full_gnm_suffix, gnm_suffix);
full_strip_suffix
= xcalloc (strlen (strip_suffix) + strlen (target_machine) + 2, 1);
strcat (full_strip_suffix, target_machine);
+ strcat (full_strip_suffix, "-");
+ strcpy (full_strip_suffix, strip_suffix);
full_gstrip_suffix
= xcalloc (strlen (gstrip_suffix) + strlen (target_machine) + 2, 1);
strcat (full_gstrip_suffix, target_machine);
+ strcat (full_gstrip_suffix, "-");
+ strcpy (full_gstrip_suffix, gstrip_suffix);
#endif /* CROSS_COMPILE */
/* Try to discover a valid linker/nm/strip to use. */
Technical Details
Message-ID:
<9305212028.AA09031@mole.gnu.ai.mit.edu>Path:
arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uknet!doc.ic.ac.uk!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rmsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,dbb2ae1216e1cf7,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-05-21 14:14:21 PST Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uknet!doc.ic.ac.uk!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rms From: rms@gnu.ai.mit.edu (Richard Stallman) Newsgroups: gnu.gcc.help Subject: cross compilers? Date: 21 May 1993 16:36:59 -0400 Organization: GNUs Not Usenet Lines: 104 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9305212028.AA09031@mole.gnu.ai.mit.edu>