mirror of
https://github.com/cc65/cc65.git
synced 2025-04-04 21:33:30 +00:00
There's no longer a need to link in the startup file, it's done my magic
instead. git-svn-id: svn://svn.cc65.org/cc65/trunk@3991 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
4a6a0357e3
commit
3d95c9453f
@ -118,8 +118,7 @@ static int Module = 0;
|
||||
/* Extension used for a module */
|
||||
#define MODULE_EXT ".o65"
|
||||
|
||||
/* Name of the crt0 object file and the runtime library */
|
||||
static char* TargetCRT0 = 0;
|
||||
/* Name of the target specific runtime library */
|
||||
static char* TargetLib = 0;
|
||||
|
||||
|
||||
@ -328,18 +327,13 @@ static void CmdPrint (CmdDesc* Cmd, FILE* F)
|
||||
static void SetTargetFiles (void)
|
||||
/* Set the target system files */
|
||||
{
|
||||
/* Determine the names of the default startup and library file */
|
||||
/* Determine the names of the target specific library file */
|
||||
if (Target != TGT_NONE) {
|
||||
|
||||
/* Get a pointer to the system name and its length */
|
||||
const char* TargetName = TargetNames [Target];
|
||||
unsigned TargetNameLen = strlen (TargetName);
|
||||
|
||||
/* Set the startup file */
|
||||
TargetCRT0 = xmalloc (TargetNameLen + 2 + 1);
|
||||
memcpy (TargetCRT0, TargetName, TargetNameLen);
|
||||
strcpy (TargetCRT0 + TargetNameLen, ".o");
|
||||
|
||||
/* Set the library file */
|
||||
TargetLib = xmalloc (TargetNameLen + 4 + 1);
|
||||
memcpy (TargetLib, TargetName, TargetNameLen);
|
||||
@ -422,13 +416,6 @@ static void Link (void)
|
||||
|
||||
}
|
||||
|
||||
/* If we have a startup file and if we are not linking a module, add its
|
||||
* name as a parameter
|
||||
*/
|
||||
if (TargetCRT0 && !Module) {
|
||||
CmdAddArg (&LD65, TargetCRT0);
|
||||
}
|
||||
|
||||
/* Add all object files as parameters */
|
||||
for (I = 0; I < LD65.FileCount; ++I) {
|
||||
CmdAddArg (&LD65, LD65.Files [I]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user