#1708 Filenames with spaces fail on pic backend

closed-fixed
5
2013-05-25
2010-11-19
Kip
No

When passing the parameters to gplink, filenames with spaces are not quoted, thus failing to link.

How to reproduce:

Create a sample program having a name with spaces
$ echo "int main() { return 0; }" > "Foo Bar.c"

Try to compile:
$ sdcc -mpic14 -p16f88 "Foo Bar.c"
Bar: No such file or directory

Note: This error is actually provided by gplink, but the error lies in sdcc.
Prepending the command with ltrace -s1000 -esystem shows that sdcc is executing:
system("\"/usr/bin/gplink\" ... -w -r -o Foo Bar Foo Bar.o libsdcc.lib pic16f88.lib");

While include folders are quoted, the source file name is not, and -o option is taking just Foo as parameter (instead of Foo Bar).
Expected:
The command line should look like -o "Foo Bar" "Foo Bar.o"

$ sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.0 #5416 (Aug 12 2010) (UNIX)

Discussion

  • Borut Ražem

    Borut Ražem - 2010-12-11
    • labels: --> pic14 target
    • assigned_to: nobody --> borutr
     
  • Borut Ražem

    Borut Ražem - 2010-12-13
    • milestone: --> fixed
    • status: open --> closed-fixed
     
  • Borut Ražem

    Borut Ražem - 2010-12-13

    Fixed in svn revision #6081.

    Borut

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks