🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1667

patch for gnu ld

#1667
From: Andy Fyfe
Date: Sun, 11 Jun 1989 23:49
46 lines
1712 bytes
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;
  }
Technical Details
Message-ID: <8906112349.AA07998@csvax.caltech.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andy

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andy
From: andy@CSVAX.CALTECH.EDU (Andy Fyfe)
Newsgroups: gnu.utils.bug
Subject: patch for gnu ld
Message-ID: <8906112349.AA07998@csvax.caltech.edu>
Date: 11 Jun 89 23:49:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 46