-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'-fcallgraph-info=su' breaking builds on some platforms #963
Comments
Hi @rtrussell, yes, We just use it to get the necessary callgraph info for stack analysis ( A quick solution is to override CFLAGS with the exact set of flags you need: $ CFLAGS='-g3 -I. -std=c99 -Wall -Wextra -pedantic -Os' make We could add some extra Makefile flags to opt-out of |
It would be great if you could make the default not to use this option, then littlefs can be included as a submodule (as it is for example in PicoBB) without breaking the build on older compilers. |
The primary purpose of littlefs's Makefile is littlefs development, integration with external build systems is coincidental/secondary (and a can of worms). In that sense, providing stack measurements by default is more valuable. Otherwise what should we do if we want to adopt more -Wwarnings that may not be available throughout the entire history of GCC? |
So what is the preferred way for another project (in this case PicoBB) to incorporate littlefs? I would be very happy to recommend to the owner of PicoBB that he changes the way it has been integrated. |
Hmmm, I'm probably missing something, it doesn't look like PicoBB is using littlefs's Makefile? This looks pretty reasonable integration-wise to me. Do you know where the littlefs Makefile is getting invoked? The other option, if you want an intermediary liblfs.a, would be to copy littlefs's Makefile into the application's repo and modify as needed. It can be a template but I think the key point is that the build rules for your application should be owned by the application. But this is uncommon in this space. Most projects here are statically linked and often rely on LTO, so compiling/linking everything together in one pass is usually the way to go. |
Oh, it looks like littlefs's Makefile is being pulled in to build the mklfsimage tool? https://github.com/Memotech-Bill/PicoBB/blob/master/src/lfsutil/Makefile It's interesting to note they are already defining their own CFLAGS. Maybe it just needs |
Thanks, I'll pass that on. |
Does littleFS even need a makefile of its own in an application? |
Not really. The benefit of C99 being a standard is that you shouldn't usually need other context in order to compile the code. But sometimes things can get complicated. If you're mixing multiple languages for example. It's interesting to note ChaN's FAT impl doesn't even include a makefile at all: |
The introduction of the
-fcallgraph-info=su
compiler option (line 62 here) is breaking builds on some platforms, notably the Raspberry Pi with an older version of gcc. Is this option essential?The text was updated successfully, but these errors were encountered: