[PATCH] Use generic NetBSD LINK_SPEC for m68k NetBSD targets

Jason R Thorpe thorpej@wasabisystems.com
Sat Jun 8 00:29:00 GMT 2002


Committed to trunk.

        * config/m68k/netbsd-elf.h (EXTRA_SPECS): Add netbsd_entry_point.
        (LINK_SPEC): Define as NETBSD_LINK_SPEC_ELF.
        (NETBSD_ENTRY_POINT): Define.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: config/m68k/netbsd-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/netbsd-elf.h,v
retrieving revision 1.5
diff -c -r1.5 netbsd-elf.h
*** config/m68k/netbsd-elf.h	30 May 2002 17:14:24 -0000	1.5
--- config/m68k/netbsd-elf.h	8 Jun 2002 07:26:50 -0000
***************
*** 58,64 ****
    { "cpp_cpu_spec",         CPP_CPU_SPEC }, \
    { "cpp_fpu_spec",         CPP_FPU_SPEC }, \
    { "asm_default_spec",     ASM_DEFAULT_SPEC }, \
!   { "netbsd_cpp_spec",      NETBSD_CPP_SPEC },
  
  
  #define CPP_CPU_SPEC \
--- 58,65 ----
    { "cpp_cpu_spec",         CPP_CPU_SPEC }, \
    { "cpp_fpu_spec",         CPP_FPU_SPEC }, \
    { "asm_default_spec",     ASM_DEFAULT_SPEC }, \
!   { "netbsd_cpp_spec",      NETBSD_CPP_SPEC }, \
!   { "netbsd_entry_point",   NETBSD_ENTRY_POINT },
  
  
  #define CPP_CPU_SPEC \
***************
*** 106,129 ****
      %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
      %{fpic:-k} %{fPIC:-k -K}"
  
! /* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target.
!    This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
!    the m68k target.  */
  
  #undef LINK_SPEC
! #define LINK_SPEC							\
!   "%{assert*} %{R*}							\
!    %{shared:-shared}							\
!    %{!shared:								\
!      -dc -dp								\
!      %{!nostdlib:							\
!        %{!r*:								\
! 	 %{!e*:-e _start}}}						\
!      %{!static:								\
!        %{rdynamic:-export-dynamic}					\
!        %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}	\
!      %{static:-static}}"
  
  
  /* Output assembler code to FILE to increment profiler label # LABELNO
     for profiling a function only.  */
--- 107,118 ----
      %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
      %{fpic:-k} %{fPIC:-k -K}"
  
! /* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target.  */
  
  #undef LINK_SPEC
! #define LINK_SPEC NETBSD_LINK_SPEC_ELF
  
+ #define NETBSD_ENTRY_POINT "_start"
  
  /* Output assembler code to FILE to increment profiler label # LABELNO
     for profiling a function only.  */


More information about the Gcc-patches mailing list