Use -fno-builtin for SYMTABOBJ

The code generated by tools/mksymtab.sh uses
```
extern void *var;
```
for ~everything.

After the recent removal of -fno-builtin, [1]
it ends up with warnings:
* -Wbuiltin-requires-header for clang
* -Wbuiltin-declaration-mismatch for gcc

It also generates errors like the following for clang:
```
symtab_apps.c:125:14: error: redefinition of 'strdup' as different kind of symbol
extern void *strdup;
```
I couldn't find a way to disable it.
(it's err_redefinition_different_kind in clang source)

This commit works it around by restoring -fno-builtin
when building SYMTABOBJ.

[1] https://github.com/apache/incubator-nuttx/pull/5476
This commit is contained in:
YAMAMOTO Takashi 2022-04-06 12:24:16 +09:00 committed by Xiang Xiao
parent 725fe76b91
commit 5ee2e6348f

View File

@ -98,7 +98,7 @@ $(SYMTABSRC): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
$(Q) $(call TESTANDREPLACEFILE, $@.tmp, $@)
$(SYMTABOBJ): %$(OBJEXT): %.c
$(call COMPILE, -fno-lto $<, $@)
$(call COMPILE, -fno-lto -fno-builtin $<, $@)
$(BIN): $(SYMTABOBJ)
$(call ARCHIVE_ADD, $(call CONVERT_PATH,$(BIN)), $^)