Problem when compiling

Posted on
  • When I type 'make clean' all *.o-Files are deleted. That also deletes all *.o-Files in all Subdirectorys from the Espruino Code, including (in my Case) the Cross-Compiler which I downloaded in the root Directory of the source.

    Make clean does the following:

    $(Q)find . -name *.o | grep -v arm-bcm2708 | xargs rm -f

    I propose that we change that to:

    $(Q)find . -name *.o | grep -v arm-bcm2708 | grep -v gcc-arm-none-eabi-6-2017-q1-update | xargs rm -f

    If you don't do that alle *.o Files from the cross compiler are deleted, including (for example) crti.o which is leading to a linker error on compile, because the Linker needs that object file.

    Is my method to just download the cross compiler into the source root directory that odd that no one has ever had a problem with that?

    I can make an Issue and PR in the Repo If wanted.

    Greetings,

    Thomas

    PS: Problem with my simple fix is -of course- that we need to change the folder name 'gcc-arm-none-eabi-6-2017-q1-update' in the file 'scripts/provision.sh' and 'Makefile' everytime we change it. It's not nice to have that at two places to maintain I suppose.

  • Wow, thanks! Yes, I'd never encountered this because for ARM I tend to have set a compiler up globally - but I'm amazed nobody else hit it and reported it.

    I've just added a check for directories starting gcc-arm-none-eabi - which I think is probably a fair thing to skip out of the file deletion? Please can you check and see if it works ok for you?

  • Hello Gordon,

    works a treat! Thank you!

    Thomas

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Problem when compiling

Posted by Avatar for ThomasChr @ThomasChr

Actions