I upgraded to SDCC on Windows (mcs51) to 3.0.0 #6037 from an earlier version and found the library search had changed. In the previous version the model was appended to what was specified in the the SDCC_LIB environment variable as per the online documentation here: http://sdcc.sourceforge.net/doc/sdccman.html/node13.html. This appears not to be the case in the current version (see sdccmain.c: setLibPath()). Feature or Bug? (I did a forum search on SDCC_LIB and didn't turn up anything so forgive me if this is well known behavior).
If Feature I would suggest reverting back or adding a new environment variable that is model sensitive. I maintain two sets of libraries for small and small-stack-auto models and want to be able to change the models without messing with the tool chain (I use the SiLabs IDE). I was able to change the code in sdccmain.c pretty easily to revert but would rather not use a customized version.
You are right, this is sdcc 3.0 incompatibility with sdcc 2.9 and older versions and the documentation was not updated. My personal opinion is that the current behavior is correct: SDCC_LIB should point directly to the directory containing the library files, same as -L command line option, but for the compatibility sake I propose the following (actually you already proposed it):
- revert the SDCC_LIB behavior, so that it points to the directory containing model subdirectories
- introduce SDCC_MODEL_LIB environment variable, which should point to the model directory (same as current implementation of SDCC_LIB)
The new priority for library search paths would be:
1. -L dir
Does it make sense?
Works for me. Thanks!
The SDCC_LIB search was totally broken, so the the libraries was never searched in $SDCC_LIB directory.
I fixed it in svn revision #6253: I used only SDCC_LIB environment variable and the priority for library search paths is:
1. -L dir
thornd, can you please verify if it works for you?
Sure. Should be able to get to it today.
Built and tried out 6253 and it appears to work properly now. Thanks.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.