*/*/bsp_specs: Increase similarity to ease future analysis

Done:
  arm
  bfin
  epiphany
  i386
  lm32
  m32c
  mips
  moxie
  nios2
  or1k
  powerpc
  riscv
  sh
  sparc
  sparc64
  v850

To do:
  m68k

Differences noted:
  + endfile was sometimes before startfile
  + endfile sometimes was hard-coded and did not have -qrtems version
  + Should -e XXX (e.g. entry point) be in linkcmds?
  + Should -u XXX (e.g. undefined symbols) be in linkcmds?
  + Typos: Odd spacing, "old_endfiles" typo, and *(old_endfiles) (not %)
  + nios2: Referenced crtnn.o not crtn.o (error)

Need to revisit:
  + m32c, moxie, sparc64 includes !nostdlib which is not used elsewhere
  + sh has -EL/-EB mapping. Why needed?
  + sparc64 didn't include crti.o/crtn.o but it is part of toolset
  + v850 uses something like this for link and end_file:
      "%{qrtems: %(old_link)}"
    This means that these are unnecessary. Try this on all.
  + mips uses old_link all the time also.
  + arm/tms750 adds -EB.
  + powerpc: Why do we have rtems_crt* and not use something from GCC?

Updates #3520.
This commit is contained in:
Joel Sherrill
2017-11-27 09:51:47 -06:00
parent 7d905dffad
commit d9769c96cf
27 changed files with 64 additions and 72 deletions
+1 -1
View File
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+1 -1
View File
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+1 -1
View File
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -3
View File
@@ -2,12 +2,12 @@
%rename startfile old_startfile
%rename link old_link
*endfile:
crtend.o%s crtn.o%s
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -5
View File
@@ -6,10 +6,8 @@
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
*endfile:
%{!qrtems: %(old_endfile)} \
%{!nostdlib: %{qrtems: crtend.o%s}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s}}
+3 -3
View File
@@ -3,11 +3,11 @@
%rename link old_link
*startfile:
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: \
start.o%s crti.o%s crtbegin.o%s -e start}}
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
*link:
%(old_link) %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -1
View File
@@ -7,5 +7,7 @@
%{!nostdlib: %{qrtems: start.o%s -e _start crtbegin.o%s}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: crtend.o%s -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s}}
+1 -1
View File
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtnn.o%s}
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+1 -1
View File
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -3
View File
@@ -6,8 +6,8 @@
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s -e __rtems_entry_point -u __vectors motld_start.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+2 -2
View File
@@ -4,11 +4,11 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors}
+2 -2
View File
@@ -3,11 +3,11 @@
%rename link old_link
*startfile:
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -u download_entry -N }
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors -u download_entry}
@@ -7,8 +7,8 @@
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s \
vectors_entry%O%s start.o%s -e __rtems_entry_point -u __vectors}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+3 -3
View File
@@ -6,8 +6,8 @@
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s -e __rtems_entry_point -u __vectors motld_start.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+3 -3
View File
@@ -6,8 +6,8 @@
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s -e __rtems_entry_point -u __vectors mvme5500start.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+3 -3
View File
@@ -7,8 +7,8 @@
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s \
start.o%s -e _start -u __vectors}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+3 -3
View File
@@ -7,8 +7,8 @@
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s \
start.o%s -e _start -u __vectors}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+2 -3
View File
@@ -4,11 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s rtems_crtn.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N %(link_os)}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors %(link_os)}
+1 -2
View File
@@ -10,5 +10,4 @@
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors}
@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -3
View File
@@ -2,12 +2,12 @@
%rename startfile old_startfile
%rename link old_link
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -3
View File
@@ -2,12 +2,12 @@
%rename startfile old_startfile
%rename link old_link
*endfile:
crtend.o%s crtn.o%s
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+3 -3
View File
@@ -2,12 +2,12 @@
%rename startfile old_startfile
%rename link old_link
*endfile:
crtend.o%s crtn.o%s
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+4 -6
View File
@@ -4,12 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
*endfile:
%{!qrtems: %(old_endfile)} \
%{!nostdlib: %{qrtems: crtend.o%s}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s crtn.o%s}}
+4 -6
View File
@@ -4,12 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
*endfile:
%{!qrtems: %(old_endfile)} \
%{!nostdlib: %{qrtems: crtend.o%s}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s crtn.o%s}}
+3 -5
View File
@@ -6,10 +6,8 @@
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s -e _start}}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: %(old_endfile)} \
%{!nostdlib: %{qrtems:}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: %(old_link)}
%{!qrtems: %(old_link)} %{qrtems: %(old_link)}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: %(old_link)}