mirror of
https://github.com/apache/nuttx.git
synced 2026-08-16 01:43:15 +00:00
sim/Make.defs: add -fvisibility=hidden to CFLAGS
This can hidden all nuttx's symbols, and DO NOT export nuttx's symbols to share libraries. e.g. wrong: NUTTX PC NUTTX ffmpeg -> asound -> sysconf right: NUTTX PC PC ffmpeg -> asound -> sysconf Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
42a1d45a8a
commit
21cff9fc4f
1 changed files with 10 additions and 0 deletions
|
|
@ -41,6 +41,16 @@ ARCHPICFLAGS = -fpic
|
|||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
|
||||
# Add -fvisibility=hidden
|
||||
# Because we don't want export nuttx's symbols to share libraries
|
||||
|
||||
ARCHCPUFLAGS += -fvisibility=hidden
|
||||
ARCHCPUFLAGSXX += -fvisibility=hidden
|
||||
|
||||
ifeq ($(CONFIG_HOST_MACOS),y)
|
||||
LDLINKFLAGS += -keep_private_externs
|
||||
endif
|
||||
|
||||
# Add -fno-common because macOS "ld -r" doesn't seem to pick objects
|
||||
# for common symbols.
|
||||
ARCHCPUFLAGS += -fno-common
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue