This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: sh-elf - only call __setup_argv_and_call_main if host OS exists
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: sh-elf - only call __setup_argv_and_call_main if host OS exists
- From: Toshi Morita <tm2 at best dot com>
- Date: Thu, 24 May 2001 18:28:50 -0700 (PDT)
For the target sh-elf, GCC builds crt1.asm with a call to __setup_argv_and_call_main
which does not exist in newlib. This causes the build to fail.
Therefore, we need to avoid calling this function for the target sh-elf.
Also, if someone could review/approve my previous patches it would be appreciated:
4/14/01: http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00798.html (emit_move_insn_1 bugfix)
4/11/01: http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00665.html (remove redundant test)
3/28/01: http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01957.html (H8/300 release info fix)
3/10/01: http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00624.html (v850 GC bugfix)
3/07/01: http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00374.html (combiner bugfix)
Toshi
Thu May 24 16:57:23 PDT 2001 Toshiyasu Morita (toshiyasu.morita@hsa.hitachi.com)
* config/sh/crt1.asm (start): Only call __setup_argv_and_call_main
if there is a host OS.
*** crt1.asm.bak Thu May 24 16:56:51 2001
--- crt1.asm Thu May 24 16:59:04 2001
***************
*** 83,89 ****
--- 83,93 ----
end_k:
.long _end
main_k:
+ #if defined(LINUX) || defined(__NetBSD__) || || defined (__QNX__) || defined(__rtems__)
.long __setup_argv_and_call_main
+ #else
+ .long _main
+ #endif
exit_k:
.long _exit
atexit_k: