Skip to content

Commit

Permalink
Revert "sim/Make.defs: add -fvisibility=hidden to CFLAGS"
Browse files Browse the repository at this point in the history
This reverts commit 21cff9f.

It broke sim on macOS.
In the following backtrace, the host socket() should be used
instead of nuttx's.

(lldb) bt
* thread apache#1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00000001000f5391 nuttx`socket(domain=1, type=1, protocol=0) at socket.c:192:12
    frame apache#1: 0x000000010012b682 nuttx`vpnkit_connect at up_vpnkit.c:75:8
    frame apache#2: 0x000000010012b60b nuttx`vpnkit_init at up_vpnkit.c:136:3
    frame apache#3: 0x0000000100034b56 nuttx`netdriver_init at up_netdriver.c:334:3
    frame apache#4: 0x0000000100033294 nuttx`up_initialize at up_initialize.c:260:3
    frame apache#5: 0x00000001000031e3 nuttx`nx_start at nx_start.c:701:3
    frame apache#6: 0x0000000100000b12 nuttx`main(argc=1, argv=0x00007ffeefbfd6c8, envp=0x00007ffeefbfd6d8) at up_head.c:96:7
    frame apache#7: 0x00007fff7831b3d5 libdyld.dylib`start + 1
    frame apache#8: 0x00007fff7831b3d5 libdyld.dylib`start + 1
(lldb)
  • Loading branch information
yamt committed Sep 17, 2020
1 parent f451bf1 commit 654af21
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions boards/sim/sim/sim/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ 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
Expand Down

0 comments on commit 654af21

Please sign in to comment.