mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
Add the default libraries if both, a target and a config file are given.
Previously no startup file and system library were passed to the linker if a configuration file was specified on the command line. git-svn-id: svn://svn.cc65.org/cc65/trunk@385 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
979700f2fe
commit
71aba577c8
@ -336,17 +336,19 @@ static void Link (void)
|
|||||||
{
|
{
|
||||||
unsigned I;
|
unsigned I;
|
||||||
|
|
||||||
/* If we have a linker config file given, set the linker config file.
|
/* If we have a linker config file given, add it to the command line.
|
||||||
* Otherwise set the target system.
|
* Otherwise pass the target to the linker if we have one.
|
||||||
*/
|
*/
|
||||||
if (LinkerConfig) {
|
if (LinkerConfig) {
|
||||||
CmdAddArg (&LD65, "-C");
|
CmdAddArg (&LD65, "-C");
|
||||||
CmdAddArg (&LD65, LinkerConfig);
|
CmdAddArg (&LD65, LinkerConfig);
|
||||||
} else {
|
} else if (Target != TGT_NONE) {
|
||||||
CmdSetTarget (&LD65, Target);
|
CmdSetTarget (&LD65, Target);
|
||||||
SetTargetFiles ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Determine which target libraries are needed */
|
||||||
|
SetTargetFiles ();
|
||||||
|
|
||||||
/* Since linking is always the final step, if we have an output file name
|
/* Since linking is always the final step, if we have an output file name
|
||||||
* given, set it here. If we don't have an explicit output name given,
|
* given, set it here. If we don't have an explicit output name given,
|
||||||
* try to build one from the name of the first input file.
|
* try to build one from the name of the first input file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user