mirror of
https://github.com/cc65/cc65.git
synced 2024-09-30 08:57:49 +00:00
Added new cl65 options -Wc and --cc-args.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5538 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
a0d3f0c180
commit
083265ed73
@ -72,6 +72,7 @@ Long options:
|
|||||||
--bin-include-dir dir Set an assembker binary include directory
|
--bin-include-dir dir Set an assembker binary include directory
|
||||||
--bss-label name Define and export a BSS segment label
|
--bss-label name Define and export a BSS segment label
|
||||||
--bss-name seg Set the name of the BSS segment
|
--bss-name seg Set the name of the BSS segment
|
||||||
|
--cc-args options Pass options to the compiler
|
||||||
--cfg-path path Specify a config file search path
|
--cfg-path path Specify a config file search path
|
||||||
--check-stack Generate stack overflow checks
|
--check-stack Generate stack overflow checks
|
||||||
--code-label name Define and export a CODE segment label
|
--code-label name Define and export a CODE segment label
|
||||||
@ -172,6 +173,16 @@ There are a few remaining options that control the behaviour of cl65:
|
|||||||
if cl65 supports an option by itself, do not pass this option to the
|
if cl65 supports an option by itself, do not pass this option to the
|
||||||
assembler by means of the <tt/-Wa/ switch.
|
assembler by means of the <tt/-Wa/ switch.
|
||||||
|
|
||||||
|
<tag><tt>-Wc options, --cc-args options</tt></tag>
|
||||||
|
|
||||||
|
Pass options directly to the compiler. This may be used to pass options
|
||||||
|
that aren't directly supported by cl65. Several options may be separated by
|
||||||
|
commas, the commas are replaced by spaces when passing them to the
|
||||||
|
compiler. Beware: Passing arguments directly to the compiler may interfere
|
||||||
|
with some of the defaults, because cl65 doesn't parse the options passed. So
|
||||||
|
if cl65 supports an option by itself, do not pass this option to the
|
||||||
|
compiler by means of the <tt/-Wc/ switch.
|
||||||
|
|
||||||
<tag><tt>-Wl options, --ld-args options</tt></tag>
|
<tag><tt>-Wl options, --ld-args options</tt></tag>
|
||||||
|
|
||||||
Pass options directly to the linker. This may be used to pass options that
|
Pass options directly to the linker. This may be used to pass options that
|
||||||
|
@ -697,6 +697,7 @@ static void Usage (void)
|
|||||||
" -V\t\t\t\tPrint the version number\n"
|
" -V\t\t\t\tPrint the version number\n"
|
||||||
" -W name[,...]\t\t\tSuppress compiler warnings\n"
|
" -W name[,...]\t\t\tSuppress compiler warnings\n"
|
||||||
" -Wa options\t\t\tPass options to the assembler\n"
|
" -Wa options\t\t\tPass options to the assembler\n"
|
||||||
|
" -Wc options\t\t\tPass options to the compiler\n"
|
||||||
" -Wl options\t\t\tPass options to the linker\n"
|
" -Wl options\t\t\tPass options to the linker\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Long options:\n"
|
"Long options:\n"
|
||||||
@ -707,6 +708,7 @@ static void Usage (void)
|
|||||||
" --bin-include-dir dir\t\tSet an assembler binary include directory\n"
|
" --bin-include-dir dir\t\tSet an assembler binary include directory\n"
|
||||||
" --bss-label name\t\tDefine and export a BSS segment label\n"
|
" --bss-label name\t\tDefine and export a BSS segment label\n"
|
||||||
" --bss-name seg\t\tSet the name of the BSS segment\n"
|
" --bss-name seg\t\tSet the name of the BSS segment\n"
|
||||||
|
" --cc-args options\t\tPass options to the compiler\n"
|
||||||
" --cfg-path path\t\tSpecify a config file search path\n"
|
" --cfg-path path\t\tSpecify a config file search path\n"
|
||||||
" --check-stack\t\t\tGenerate stack overflow checks\n"
|
" --check-stack\t\t\tGenerate stack overflow checks\n"
|
||||||
" --code-label name\t\tDefine and export a CODE segment label\n"
|
" --code-label name\t\tDefine and export a CODE segment label\n"
|
||||||
@ -813,6 +815,14 @@ static void OptBssName (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptCCArgs (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
|
/* Pass arguments to the compiler */
|
||||||
|
{
|
||||||
|
CmdAddArgList (&CC65, Arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptCfgPath (const char* Opt attribute ((unused)), const char* Arg)
|
static void OptCfgPath (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
/* Config file search path (linker) */
|
/* Config file search path (linker) */
|
||||||
{
|
{
|
||||||
@ -1229,6 +1239,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--bin-include-dir", 1, OptBinIncludeDir },
|
{ "--bin-include-dir", 1, OptBinIncludeDir },
|
||||||
{ "--bss-label", 1, OptBssLabel },
|
{ "--bss-label", 1, OptBssLabel },
|
||||||
{ "--bss-name", 1, OptBssName },
|
{ "--bss-name", 1, OptBssName },
|
||||||
|
{ "--cc-args", 1, OptCCArgs },
|
||||||
{ "--cfg-path", 1, OptCfgPath },
|
{ "--cfg-path", 1, OptCfgPath },
|
||||||
{ "--check-stack", 0, OptCheckStack },
|
{ "--check-stack", 0, OptCheckStack },
|
||||||
{ "--code-label", 1, OptCodeLabel },
|
{ "--code-label", 1, OptCodeLabel },
|
||||||
@ -1360,6 +1371,9 @@ int main (int argc, char* argv [])
|
|||||||
if (Arg[2] == 'a' && Arg[3] == '\0') {
|
if (Arg[2] == 'a' && Arg[3] == '\0') {
|
||||||
/* -Wa: Pass options to assembler */
|
/* -Wa: Pass options to assembler */
|
||||||
OptAsmArgs (Arg, GetArg (&I, 3));
|
OptAsmArgs (Arg, GetArg (&I, 3));
|
||||||
|
} else if (Arg[2] == 'c' && Arg[3] == '\0') {
|
||||||
|
/* -Wc: Pass options to compiler */
|
||||||
|
OptCCArgs (Arg, GetArg (&I, 3));
|
||||||
} else if (Arg[2] == 'l' && Arg[3] == '\0') {
|
} else if (Arg[2] == 'l' && Arg[3] == '\0') {
|
||||||
/* -Wl: Pass options to linker */
|
/* -Wl: Pass options to linker */
|
||||||
OptLdArgs (Arg, GetArg (&I, 3));
|
OptLdArgs (Arg, GetArg (&I, 3));
|
||||||
|
Loading…
Reference in New Issue
Block a user