pfalcon / esp-open-sdk

Free and open (as much as possible) integrated SDK for ESP8266/ESP8285 chips
1.97k stars 623 forks source link

Fix #347 by removing libc.a from dependencies #348

Closed jcmvbkbc closed 5 years ago

jcmvbkbc commented 5 years ago

Hi Paul,

please merge the fix for issue #347. With that change it is possible to run make -j successfully.

Thanks. -- Max

pfalcon commented 5 years ago

@jcmvbkbc, Thanks for the patch, and glad to see you're still around these things! :+1:

But - what's the logic behind this patch? libcirom.a is created form libc.a, it can't be created without it being available. And this fact is encoded in the dependency on it.

jcmvbkbc commented 5 years ago

what's the logic behind this patch? libcirom.a is created form libc.a, it can't be created without it being available. And this fact is encoded in the dependency on it.

The logic is: there's no rule in this Makefile that tells how to build libc.a, so libc.a may not be built by this Makefile in a way known to make. So with the current Makefile there is a state of the build tree that is guaranteed to not be buildable, and #347 just showed what it is. OTOH libc.a is produced by the ct-ng build, the deepest direct dependency of all that runs ct-ng build is $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc, and $(TOOLCHAIN)/xtensa-lx106-elf/sysroot/lib/libcirom.a already depends on the $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc, so the dependency on libc.a is redundant. That's why I've dropped it.

pfalcon commented 5 years ago

The logic is: there's no rule in this Makefile that tells how to build libc.a

So that appears to be the real problem here, which needs fixing ;-).