-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to `_exit' #48
Comments
I ran into a similar problem with my system on Linux. |
After upgrading my toolchain with the newest summon the linker started complaining about missing stubs. It seems that it stems from libgcc division routines being compiled with exceptions enabled. There's a patch in summon (patch-libgcc-divide-exceptions.diff) which - at least for me - does not take care of the problem. Editing the patch to also change "-fnon-call-exceptions" to "-fno-non-call-exceptions" seems to work. |
Hello! |
solved. :) in your main.c include syscalls.h #ifndef SYSCALLS_H /****************************************************************************
#include <stdlib.h> extern void __putchar (char ch); /***************************************************************************/ /*int _read_r (struct _reent *r, int file, char * ptr, int len)
}
} #if 0
/* for(index=0; index<len; index++)
#endif
} / int _close_r (struct _reent *r, int file) /***************************************************************************/ /***************************************************************************/ int _fstat_r (struct _reent *r, int file, struct stat * st)
} /***************************************************************************/ int _isatty_r (struct _reent *r, int fd)
} /***************************************************************************/ void _exit (int a)
} /***************************************************************************/ int _kill (int a, int b)
} /***************************************************************************/ int _getpid(int a)
} /*** EOF ***/ #endif /* SYSCALLS_H */ |
I'm use Mac OSX 10.8 , after I installed the summon-arm-toolchain, I tried to build project "https://github.com/nabilt/STM32F4-Discovery-Firmware" for test.
But It shows the following messages.
/Users/mac/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function
exit': /Users/mac/WORK/STM32/summon-arm-toolchain/build/arm-none-eabi/newlib/libc/stdlib/../../../../../gcc-linaro-4.7-2013.01/newlib/libc/stdlib/exit.c:65: undefined reference to
_exit'collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered: