andy@CSVAX.CALTECH.EDU (Andy Fyfe) (06/12/89)
to have ld make a 68010 binary unless there are any 68020 binaries
being linked in (in which case the result is also 68020) when
running on a sun2/sun3.
*** save/ld.c Sun Jun 11 16:04:32 1989
--- ld.c Sun Jun 11 16:27:50 1989
***************
*** 124,134 ****
#define INITIALIZE_HEADER \
{outheader.a_machtype = M_SPARC; outheader.a_toolversion = 1;}
#endif
- #if defined(mc68010) || defined(m68010)
- #define INITIALIZE_HEADER outheader.a_machtype = M_68010
- #endif
#ifndef INITIALIZE_HEADER
! #define INITIALIZE_HEADER outheader.a_machtype = M_68020
#endif
#endif
#ifdef is68k
--- 124,132 ----
#define INITIALIZE_HEADER \
{outheader.a_machtype = M_SPARC; outheader.a_toolversion = 1;}
#endif
#ifndef INITIALIZE_HEADER
! static int sun_machine_type = M_68010;
! #define INITIALIZE_HEADER outheader.a_machtype = sun_machine_type
#endif
#endif
#ifdef is68k
***************
*** 1415,1420 ****
--- 1413,1426 ----
fatal_with_file ("failure reading header of ", entry);
if (N_BADMAG (*loc))
fatal_with_file ("bad magic number in ", entry);
+
+ #if defined(sun) && !defined(sparc)
+ if (loc->a_machtype == M_68020)
+ {
+ sun_machine_type = M_68020;
+ INITIALIZE_HEADER;
+ }
+ #endif
entry->header_read_flag = 1;
}