Skip to content
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

Unset COMPONENT_ADD_INCLUDEDIRS in cxx component #1956

Conversation

paulreimer
Copy link
Contributor

@paulreimer paulreimer commented May 14, 2018

to fix C++ warning from -Wmissing-include-dirs

Example warning, with -Wmissing-include-dirs but before this patch:

CXX /private/tmp/tmp_build/firmware/build/cxx/cxx_exception_stubs.o
cc1plus: warning: /private/tmp/tmp_build/firmware/esp-idf/components/cxx/include: No such file or directory [-Wmissing-include-dirs]

@paulreimer
Copy link
Contributor Author

paulreimer commented May 14, 2018

Also added declarations for __cxa_guard_ functions to fix a -Wmissing-declarations warning in de9cfac.

Example warning:

/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp: In function 'int __cxa_guard_acquire(__cxxabiv1::__guard*)':
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp:116:16: warning: no previous declaration for 'int __cxa_guard_acquire(__cxxabiv1::__guard*)' [-Wmissing-declarations]
 extern "C" int __cxa_guard_acquire(__guard* pg)
                ^
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp: In function 'void __cxa_guard_release(__cxxabiv1::__guard*)':
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp:171:17: warning: no previous declaration for 'void __cxa_guard_release(__cxxabiv1::__guard*)' [-Wmissing-declarations]
 extern "C" void __cxa_guard_release(__guard* pg)
                 ^
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp: In function 'void __cxa_guard_abort(__cxxabiv1::__guard*)':
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp:191:17: warning: no previous declaration for 'void __cxa_guard_abort(__cxxabiv1::__guard*)' [-Wmissing-declarations]
 extern "C" void __cxa_guard_abort(__guard* pg)
                 ^
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp: In function 'void __cxa_guard_dummy()':
/private/tmp/tmp_build/firmware/esp-idf/components/cxx/cxx_guards.cpp:214:17: warning: no previous declaration for 'void __cxa_guard_dummy()' [-Wmissing-declarations]
 extern "C" void __cxa_guard_dummy()

@paulreimer
Copy link
Contributor Author

paulreimer commented May 14, 2018

FYI with this PR, I am now able to compile all C++ within esp-idf (and my app code) with

-Wall \
-Wextra \
-Wno-format-nonliteral \
-Wmissing-declarations \
-Wmissing-include-dirs \
-Wformat=2 \
-Wmissing-format-attribute

which is pretty nice!

@projectgus
Copy link
Contributor

Very nice, Paul! We should add some of these to our CI builds as well.

…ent to fix C++ -Wmissing-declarations warning
@projectgus projectgus added the Status: Pending blocked by some other factor label Jun 4, 2018
igrr pushed a commit that referenced this pull request Jun 5, 2018
igrr pushed a commit that referenced this pull request Jun 5, 2018
…x component to fix C++ -Wmissing-declarations warning

Merges #1956
igrr pushed a commit that referenced this pull request Jun 5, 2018
…ent to fix C++ -Wmissing-declarations warning

Merges #1956
@projectgus
Copy link
Contributor

These commits have been cherry-picked, thanks @paulreimer!

@projectgus projectgus closed this Jun 6, 2018
@igrr igrr removed the Status: Pending blocked by some other factor label Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants