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
|
@ -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…
Reference in New Issue