mirror of
https://github.com/cc65/cc65.git
synced 2025-01-31 18:32:38 +00:00
New --config directive passed to the linker
git-svn-id: svn://svn.cc65.org/cc65/trunk@2291 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
f78fce218c
commit
9d6c683ab6
@ -629,6 +629,7 @@ static void Usage (void)
|
|||||||
" --code-label name\tDefine and export a CODE segment label\n"
|
" --code-label name\tDefine and export a CODE segment label\n"
|
||||||
" --code-name seg\tSet the name of the CODE segment\n"
|
" --code-name seg\tSet the name of the CODE segment\n"
|
||||||
" --codesize x\t\tAccept larger code by factor x\n"
|
" --codesize x\t\tAccept larger code by factor x\n"
|
||||||
|
" --config name\t\tUse linker config file\n"
|
||||||
" --cpu type\t\tSet cpu type\n"
|
" --cpu type\t\tSet cpu type\n"
|
||||||
" --create-dep\t\tCreate a make dependency file\n"
|
" --create-dep\t\tCreate a make dependency file\n"
|
||||||
" --data-label name\tDefine and export a DATA segment label\n"
|
" --data-label name\tDefine and export a DATA segment label\n"
|
||||||
@ -757,6 +758,17 @@ static void OptCodeSize (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptConfig (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
|
/* Config file (linker) */
|
||||||
|
{
|
||||||
|
if (LinkerConfig) {
|
||||||
|
Error ("Cannot specify -C/--config twice");
|
||||||
|
}
|
||||||
|
LinkerConfig = Arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
|
static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
/* Handle the --cpu option */
|
/* Handle the --cpu option */
|
||||||
{
|
{
|
||||||
@ -1044,6 +1056,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--code-label", 1, OptCodeLabel },
|
{ "--code-label", 1, OptCodeLabel },
|
||||||
{ "--code-name", 1, OptCodeName },
|
{ "--code-name", 1, OptCodeName },
|
||||||
{ "--codesize", 1, OptCodeSize },
|
{ "--codesize", 1, OptCodeSize },
|
||||||
|
{ "--config", 1, OptConfig },
|
||||||
{ "--cpu", 1, OptCPU },
|
{ "--cpu", 1, OptCPU },
|
||||||
{ "--create-dep", 0, OptCreateDep },
|
{ "--create-dep", 0, OptCreateDep },
|
||||||
{ "--data-label", 1, OptDataLabel },
|
{ "--data-label", 1, OptDataLabel },
|
||||||
@ -1118,7 +1131,7 @@ int main (int argc, char* argv [])
|
|||||||
OptStaticLocals (Arg, 0);
|
OptStaticLocals (Arg, 0);
|
||||||
} else {
|
} else {
|
||||||
/* Specify linker config file */
|
/* Specify linker config file */
|
||||||
LinkerConfig = GetArg (&I, 2);
|
OptConfig (Arg, GetArg (&I, 2));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user