Moved -qnolinkcmds option so arguments passed on the command line are

interpreted at the right point per Eric Norum's discovery:

    The problem with the my previous `fix' for adding linker commands
    was with the ordering of the options to the linker.

    For example, to make a larger heap size, the application Makefile would
    CFLAGS_LD = -Wl,--defsym -Wl,HeapSize=0x40000

    The command passed to the linker would be :
    m68k-rtems-ld .... -T xxx/linkcmds .... --defsym HeapSize=0x40000 .....

    This doesn't work because the script in linkcmds inserts a default
    value for HeapSize if HeapSize is not defined by the time the linker
    looks at the linkcmds script.

    The solution seems to be to move the -T linkcmds%s in the bsp_specs
    file out of the link specfication and into the lib specification -- a
    little unorthodox, perhaps, but it seems to work!
This commit is contained in:
Joel Sherrill
1997-12-20 16:59:11 +00:00
parent 1587af614b
commit 8fe6d358bf
19 changed files with 38 additions and 38 deletions

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start332.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start68k.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start302.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start360.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: start302.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: idt_csu.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: idt_csu.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: ecrti%O%s --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: ecrti%O%s --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: }
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -u download_entry -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -u download_entry -N -e start}

View File

@@ -8,11 +8,11 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: startsis.o%s}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start %{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}