From f12f385e82fd1ba9cf969ce6908f67cac240105d Mon Sep 17 00:00:00 2001 From: kvigor Date: Wed, 27 Sep 2000 19:31:18 +0000 Subject: [PATCH] Make user-specified -I and -L options take precedence git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@410 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCmain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 32ea48ad..e68ce1a4 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -129,7 +129,7 @@ char *preOutName; static const char *_preCmd[] = { "sdcpp", "-Wall", "-lang-c++", "-DSDCC=1", - "-I" SDCC_INCLUDE_DIR, "$l", "$1", "$2", NULL + "$l", "-I" SDCC_INCLUDE_DIR, "$1", "$2", NULL }; #if !OPT_DISABLE_MCS51 @@ -1164,6 +1164,10 @@ static void linkEdit (char **envp) for (i=0; linkOptions[i] ; i++) fprintf(lnkfile,"%s\n",linkOptions[i]); + /* other library paths if specified */ + for (i = 0 ; i < nlibPaths ; i++ ) + fprintf (lnkfile,"-k %s\n",libPaths[i]); + /* standard library path */ if (strcmp(port->target,"ds390")==0) { c="ds390"; @@ -1187,10 +1191,6 @@ static void linkEdit (char **envp) } fprintf (lnkfile,"-k %s/%s\n",SDCC_LIB_DIR/*STD_LIB_PATH*/,c); - /* other library paths if specified */ - for (i = 0 ; i < nlibPaths ; i++ ) - fprintf (lnkfile,"-k %s\n",libPaths[i]); - /* standard library files */ if (strcmp(port->target, "ds390")==0) { fprintf (lnkfile,"-l %s\n",STD_DS390_LIB); -- 2.47.2