Article View: gnu.gcc.help
Article #51481collect2 patch for cross compilers
From: Richard Stallman
Date: Sat, 22 May 1993 06:03
Date: Sat, 22 May 1993 06:03
109 lines
4677 bytes
4677 bytes
If you are using a cross compiler that needs collect2,
please try this patch. It ought to make collect2 find
the binutils properly.
If you try this patch before Monday, please send me mail
saying what results you got. Please do this if it works,
and if it does not work. I'd like to know that someone
has actually tried it.
===================================================================
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/22 00:00:13
***************
*** 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);
! strcpy (full_ld_suffix, target_machine);
strcat (full_ld_suffix, "-");
! strcat (full_ld_suffix, ld_suffix);
full_real_ld_suffix
= xcalloc (strlen (real_ld_suffix) + strlen (target_machine) + 2, 1);
! strcpy (full_real_ld_suffix, target_machine);
strcat (full_real_ld_suffix, "-");
! strcat (full_real_ld_suffix, real_ld_suffix);
full_gld_suffix
= xcalloc (strlen (gld_suffix) + strlen (target_machine) + 2, 1);
! strcpy (full_gld_suffix, target_machine);
strcat (full_gld_suffix, "-");
! strcat (full_gld_suffix, gld_suffix);
full_nm_suffix
= xcalloc (strlen (nm_suffix) + strlen (target_machine) + 2, 1);
! strcpy (full_nm_suffix, target_machine);
strcat (full_nm_suffix, "-");
! strcat (full_nm_suffix, nm_suffix);
full_gnm_suffix
= xcalloc (strlen (gnm_suffix) + strlen (target_machine) + 2, 1);
! strcpy (full_gnm_suffix, target_machine);
strcat (full_gnm_suffix, "-");
! strcat (full_gnm_suffix, gnm_suffix);
full_strip_suffix
= xcalloc (strlen (strip_suffix) + strlen (target_machine) + 2, 1);
! strcpy (full_strip_suffix, target_machine);
strcat (full_strip_suffix, "-");
! strcat (full_strip_suffix, strip_suffix);
full_gstrip_suffix
= xcalloc (strlen (gstrip_suffix) + strlen (target_machine) + 2, 1);
! strcpy (full_gstrip_suffix, target_machine);
strcat (full_gstrip_suffix, "-");
! strcat (full_gstrip_suffix, gstrip_suffix);
#endif /* CROSS_COMPILE */
/* Try to discover a valid linker/nm/strip to use. */
Technical Details
Message-ID:
<9305220517.AA10982@mole.gnu.ai.mit.edu>Path:
arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!zaphod.mps.ohio-state.edu!math.ohio-state.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,94e94311f5f0652d,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-05-21 23:14:59 PST Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!zaphod.mps.ohio-state.edu!math.ohio-state.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: collect2 patch for cross compilers Date: 22 May 1993 02:03:11 -0400 Organization: GNUs Not Usenet Lines: 111 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9305220517.AA10982@mole.gnu.ai.mit.edu>