projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the --stack-auto crash fix wasn't so useless after all.
[fw/sdcc]
/
src
/
SDCCmain.c
diff --git
a/src/SDCCmain.c
b/src/SDCCmain.c
index 7f58094f4866837ee85e5cb22319028262443e49..6f7f2edc6797fb33f5eb1565865f70d241332e15 100644
(file)
--- a/
src/SDCCmain.c
+++ b/
src/SDCCmain.c
@@
-1078,11
+1078,13
@@
linkEdit (char **envp)
/* standard library path */
if (!options.nostdlib)
{
/* standard library path */
if (!options.nostdlib)
{
+/****
if (TARGET_IS_DS390)
{
c = "ds390";
}
else
if (TARGET_IS_DS390)
{
c = "ds390";
}
else
+*****/
{
switch (options.model)
{
{
switch (options.model)
{
@@
-1093,7
+1095,8
@@
linkEdit (char **envp)
c = "large";
break;
case MODEL_FLAT24:
c = "large";
break;
case MODEL_FLAT24:
- c = "flat24";
+ /* c = "flat24"; */
+ c = "ds390";
break;
default:
werror (W_UNKNOWN_MODEL, __FILE__, __LINE__);
break;
default:
werror (W_UNKNOWN_MODEL, __FILE__, __LINE__);
@@
-1104,7
+1107,8
@@
linkEdit (char **envp)
fprintf (lnkfile, "-k %s/%s\n", SDCC_LIB_DIR /*STD_LIB_PATH */ , c);
/* standard library files */
fprintf (lnkfile, "-k %s/%s\n", SDCC_LIB_DIR /*STD_LIB_PATH */ , c);
/* standard library files */
- if (strcmp (port->target, "ds390") == 0)
+ /* if (strcmp (port->target, "ds390") == 0) */
+ if (options.model == MODEL_FLAT24)
{
fprintf (lnkfile, "-l %s\n", STD_DS390_LIB);
}
{
fprintf (lnkfile, "-l %s\n", STD_DS390_LIB);
}
@@
-1319,6
+1323,11
@@
main (int argc, char **argv, char **envp)
setDefaultOptions ();
parseCmdLine (argc, argv);
setDefaultOptions ();
parseCmdLine (argc, argv);
+ if (getenv("SDCPP"))
+ {
+ _preCmd[0] = getenv("SDCPP");
+ }
+
/* if no input then printUsage & exit */
if ((!options.c1mode && !srcFileName && !nrelFiles) ||
(options.c1mode && !srcFileName && !options.out_name))
/* if no input then printUsage & exit */
if ((!options.c1mode && !srcFileName && !nrelFiles) ||
(options.c1mode && !srcFileName && !options.out_name))