sim: detect clang native compiler on MacOS.
This commit is contained in:
parent
98833affd0
commit
271518a5ff
@ -285,11 +285,14 @@ nuttx-names.dat: nuttx-names.in
|
||||
nuttx$(EXEEXT): libarch$(LIBEXT) board/libboard$(LIBEXT) $(HEADOBJ) $(LINKOBJS) $(HOSTOBJS) nuttx-names.dat
|
||||
$(Q) echo "LD: nuttx$(EXEEXT)"
|
||||
$(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o nuttx.rel $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
ifeq ("$(shell $(CC) --version | grep clang)","")
|
||||
# none clang based native compilers need opjcopy to build simulation
|
||||
$(Q) $(OBJCOPY) --redefine-syms=nuttx-names.dat nuttx.rel
|
||||
$(Q) $(CC) $(CCLINKFLAGS) -Wl,-verbose 2>&1 | \
|
||||
sed -e '/====/,/====/!d;//d' -e 's/__executable_start/_stext/g' -e 's/__init_array_start/_sinit/g' \
|
||||
-e 's/__init_array_end/_einit/g' -e 's/__fini_array_start/_sfini/g' -e 's/__fini_array_end/_efini/g' >nuttx.ld
|
||||
$(Q) echo "__init_array_start = .; __init_array_end = .; __fini_array_start = .; __fini_array_end = .;" >>nuttx.ld
|
||||
endif
|
||||
$(if $(CONFIG_HAVE_CXX),\
|
||||
$(Q) "$(CXX)" $(CCLINKFLAGS) $(LIBPATHS) $(ARCHSCRIPT) -o $(TOPDIR)/$@ $(HEADOBJ) nuttx.rel $(HOSTOBJS) $(STDLIBS),\
|
||||
$(Q) "$(CC)" $(CCLINKFLAGS) $(LIBPATHS) $(ARCHSCRIPT) -o $(TOPDIR)/$@ $(HEADOBJ) nuttx.rel $(HOSTOBJS) $(STDLIBS))
|
||||
|
@ -64,6 +64,7 @@ static char g_logbuffer[4096];
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
__attribute__ ((visibility("default")))
|
||||
int main(int argc, char **argv, char **envp)
|
||||
{
|
||||
g_argc = argc;
|
||||
|
@ -51,6 +51,7 @@ bool up_interrupt_context(void)
|
||||
* Name: up_doirq
|
||||
****************************************************************************/
|
||||
|
||||
__attribute__ ((visibility("default")))
|
||||
void *up_doirq(int irq, void *context)
|
||||
{
|
||||
/* Allocate temporary context on the stack */
|
||||
|
@ -399,6 +399,7 @@ int netdriver_init(void)
|
||||
return netdev_register(dev, NET_LL_ETHERNET);
|
||||
}
|
||||
|
||||
__attribute__ ((visibility("default")))
|
||||
void netdriver_setmacaddr(unsigned char *macaddr)
|
||||
{
|
||||
memcpy(g_sim_dev.d_mac.ether.ether_addr_octet, macaddr, IFHWADDRLEN);
|
||||
|
@ -217,6 +217,7 @@ int up_cpu_paused(int cpu)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
__attribute__ ((visibility("default")))
|
||||
void up_cpu_started(void)
|
||||
{
|
||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
||||
@ -285,6 +286,7 @@ int up_cpu_start(int cpu)
|
||||
* On success returns OK (0), otherwise a negative value.
|
||||
****************************************************************************/
|
||||
|
||||
__attribute__ ((visibility("default")))
|
||||
int up_init_ipi(int irq)
|
||||
{
|
||||
up_enable_irq(irq);
|
||||
|
Loading…
Reference in New Issue
Block a user