fix 2014-05-28 ld Makefile.am changes
authorAlan Modra <amodra@gmail.com>
Mon, 2 Jun 2014 04:24:54 +0000 (13:54 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 2 Jun 2014 05:22:52 +0000 (14:52 +0930)
bfin, msp, and score all used an extra parameter to genscripts.sh
to select a "customizer_script" different from the standard one
named from the emulation.  This patch renames the scripts to avoid
the need, tidying them in the process.

* emulparams/elf32bfin.sh: Rename from bfin.sh.
* emulparams/elf32bfinfd.sh: Update to suit.
* emulparams/: Delete.
* emulparams/msp430.sh: Rename from msp430all.sh.  Remove
MSP430_NAME and msp430X vars.
* emulparams/msp430X.sh: New.
* emulparams/: Delete.
* emulparams/score3_elf.sh: Rename from scoreelf.sh.  Remove
SCORE_NAME and score7_elf ARCH setting.
* emulparams/score7_elf.sh: New.
* Makefile.am (eelf32bfin.c, eelf32bfinfd.c): Update dependencies.
(emsp430.c, emsp430X.c, escore3_elf.c, escore7_elf.c): Likewise.
* Makefile.in: Regenerate.
* genscripts.sh: Delete customizer_script param.

13 files changed:
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/emulparams/bfin.sh [deleted file]
ld/emulparams/elf32bfin.sh [new file with mode: 0644]
ld/emulparams/elf32bfinfd.sh
ld/emulparams/msp430.sh [new file with mode: 0644]
ld/emulparams/msp430X.sh [new file with mode: 0644]
ld/emulparams/msp430all.sh [deleted file]
ld/emulparams/score3_elf.sh [new file with mode: 0644]
ld/emulparams/score7_elf.sh [new file with mode: 0644]
ld/emulparams/scoreelf.sh [deleted file]
ld/genscripts.sh

index 68096103dbb65aa70646960d3d5cec92784aaa91..2ebf3aa7592ed15ead96bbf9f40c312a19185120 100644 (file)
@@ -1,3 +1,20 @@
+2014-06-02  Alan Modra  <amodra@gmail.com>
+
+       * emulparams/elf32bfin.sh: Rename from bfin.sh.
+       * emulparams/elf32bfinfd.sh: Update to suit.
+       * emulparams/: Delete.
+       * emulparams/msp430.sh: Rename from msp430all.sh.  Remove
+       MSP430_NAME and msp430X vars.
+       * emulparams/msp430X.sh: New.
+       * emulparams/: Delete.
+       * emulparams/score3_elf.sh: Rename from scoreelf.sh.  Remove
+       SCORE_NAME and score7_elf ARCH setting.
+       * emulparams/score7_elf.sh: New.
+       * Makefile.am (eelf32bfin.c, eelf32bfinfd.c): Update dependencies.
+       (emsp430.c, emsp430X.c, escore3_elf.c, escore7_elf.c): Likewise.
+       * Makefile.in: Regenerate.
+       * genscripts.sh: Delete customizer_script param.
+
 2014-05-28  Hans-Peter Nilsson  <hp@axis.com>
 
        * Makefile.am: Change all rules with ${GENSCRIPTS}
index d66801b2af60ef7416d6226f1ad3ff452b8586c7..24ba3e15cbcc6b6ec87c505fb29b32c54d39dfd0 100644 (file)
@@ -942,12 +942,12 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
-eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
+eelf32bfin.c: $(srcdir)/emulparams/elf32bfin.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
 eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh \
-  $(srcdir)/emulparams/bfin.sh \
+  $(srcdir)/emulparams/elf32bfin.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
@@ -1480,13 +1480,11 @@ emn10300.c: $(srcdir)/emulparams/mn10300.sh \
   $(srcdir)/emulparams/mn10200.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
-emsp430.c: $(srcdir)/emulparams/msp430all.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
-  ${GEN_DEPENDS}
+emsp430.c: $(srcdir)/emulparams/msp430.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
 
-emsp430X.c: $(srcdir)/emulparams/msp430all.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
-  ${GEN_DEPENDS}
+emsp430X.c: $(srcdir)/emulparams/msp430.sh $(srcdir)/emulparams/msp430X.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
 
 ends32elf.c: $(srcdir)/emulparams/nds32elf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
@@ -1586,11 +1584,12 @@ eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
 eriscix.c: $(srcdir)/emulparams/riscix.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
 
-escore3_elf.c: $(srcdir)/emulparams/scoreelf.sh \
+escore3_elf.c: $(srcdir)/emulparams/score3_elf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
-escore7_elf.c: $(srcdir)/emulparams/scoreelf.sh \
+escore7_elf.c: $(srcdir)/emulparams/score3_elf.sh \
+  $(srcdir)/emulparams/score7_elf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
index 42a2cc4f481394d7a693e9a87742568b0f51fe13..9dd4399975ffdee8ae8d65ed86d7e97a326c4000 100644 (file)
@@ -2377,12 +2377,12 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
-eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
+eelf32bfin.c: $(srcdir)/emulparams/elf32bfin.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
 eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh \
-  $(srcdir)/emulparams/bfin.sh \
+  $(srcdir)/emulparams/elf32bfin.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
@@ -2915,13 +2915,11 @@ emn10300.c: $(srcdir)/emulparams/mn10300.sh \
   $(srcdir)/emulparams/mn10200.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
-emsp430.c: $(srcdir)/emulparams/msp430all.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
-  ${GEN_DEPENDS}
+emsp430.c: $(srcdir)/emulparams/msp430.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
 
-emsp430X.c: $(srcdir)/emulparams/msp430all.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
-  ${GEN_DEPENDS}
+emsp430X.c: $(srcdir)/emulparams/msp430.sh $(srcdir)/emulparams/msp430X.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
 
 ends32elf.c: $(srcdir)/emulparams/nds32elf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
@@ -3021,11 +3019,12 @@ eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
 eriscix.c: $(srcdir)/emulparams/riscix.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
 
-escore3_elf.c: $(srcdir)/emulparams/scoreelf.sh \
+escore3_elf.c: $(srcdir)/emulparams/score3_elf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
-escore7_elf.c: $(srcdir)/emulparams/scoreelf.sh \
+escore7_elf.c: $(srcdir)/emulparams/score3_elf.sh \
+  $(srcdir)/emulparams/score7_elf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
diff --git a/ld/emulparams/bfin.sh b/ld/emulparams/bfin.sh
deleted file mode 100644 (file)
index 6c0bb40..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bfin"
-TEXT_START_ADDR=0x0
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-TARGET_PAGE_SIZE=0x1000
-ARCH=bfin
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-EMBEDDED=yes
-USER_LABEL_PREFIX=_
-EXTRA_EM_FILE=bfin
diff --git a/ld/emulparams/elf32bfin.sh b/ld/emulparams/elf32bfin.sh
new file mode 100644 (file)
index 0000000..6c0bb40
--- /dev/null
@@ -0,0 +1,12 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-bfin"
+TEXT_START_ADDR=0x0
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+TARGET_PAGE_SIZE=0x1000
+ARCH=bfin
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+EMBEDDED=yes
+USER_LABEL_PREFIX=_
+EXTRA_EM_FILE=bfin
index 26f8f4701da25ee679f01f2d5cc4d2938fe57397..4c96bc95a430f1a58254fc6a63b0b1a1cc291be0 100644 (file)
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/bfin.sh
+. ${srcdir}/emulparams/elf32bfin.sh
 unset STACK_ADDR
 OUTPUT_FORMAT="elf32-bfinfdpic"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/msp430.sh b/ld/emulparams/msp430.sh
new file mode 100644 (file)
index 0000000..b459698
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# This called by genscripts_extra.sh
+
+SCRIPT_NAME=elf32msp430
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=genelf
+OUTPUT_FORMAT="elf32-msp430"
+MACHINE=
+MAXPAGESIZE=1
+EMBEDDED=yes
+
+ARCH=msp:14
+ROM_START=0x8000
+ROM_SIZE=0x7fe0
+RAM_START=0x0200
+RAM_SIZE=1K
+STACK=0x600
diff --git a/ld/emulparams/msp430X.sh b/ld/emulparams/msp430X.sh
new file mode 100644 (file)
index 0000000..fea669b
--- /dev/null
@@ -0,0 +1,8 @@
+. ${srcdir}/emulparams/msp430.sh
+
+ARCH=MSP430x43
+ROM_START=0x02000
+ROM_SIZE=0x0dfe0
+RAM_START=0x10000
+RAM_SIZE=0x30000
+STACK=0x600
diff --git a/ld/emulparams/msp430all.sh b/ld/emulparams/msp430all.sh
deleted file mode 100644 (file)
index 1f1eef8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# This called by genscripts_extra.sh
-
-MSP430_NAME=${EMULATION_NAME}
-
-SCRIPT_NAME=elf32msp430
-TEMPLATE_NAME=generic
-EXTRA_EM_FILE=genelf
-OUTPUT_FORMAT="elf32-msp430"
-MACHINE=
-MAXPAGESIZE=1
-EMBEDDED=yes
-
-if [ "${MSP430_NAME}" = "msp430" ] ; then
-ARCH=msp:14
-ROM_START=0x8000
-ROM_SIZE=0x7fe0
-RAM_START=0x0200
-RAM_SIZE=1K
-STACK=0x600
-fi
-
-if [ "${MSP430_NAME}" = "msp430X" ] ; then
-ARCH=MSP430x43
-ROM_START=0x02000
-ROM_SIZE=0x0dfe0
-RAM_START=0x10000
-RAM_SIZE=0x30000
-STACK=0x600
-fi
diff --git a/ld/emulparams/score3_elf.sh b/ld/emulparams/score3_elf.sh
new file mode 100644 (file)
index 0000000..4636cd3
--- /dev/null
@@ -0,0 +1,33 @@
+MACHINE=
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=scoreelf
+OUTPUT_FORMAT="elf32-bigscore"
+BIG_OUTPUT_FORMAT="elf32-bigscore"
+LITTLE_OUTPUT_FORMAT="elf32-littlescore"
+NO_RELA_RELOCS=yes
+GROUP="-lm -lc -lglsim -lgcc -lstdc++"
+
+TEXT_START_ADDR=0x00000000
+MAXPAGESIZE=256
+NONPAGED_TEXT_START_ADDR=0x0400000
+SHLIB_TEXT_START_ADDR=0x5ffe0000
+OTHER_GOT_SYMBOLS='
+  _gp = ALIGN(16) + 0x3ff0;
+'
+
+OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+SDATA_START_SYMBOLS='_sdata_begin = . ;'
+OTHER_BSS_SYMBOLS='
+  _bss_start = ALIGN(4) ;
+'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x8000000
+
+ARCH=score3
+MACHINE=
+ENTRY=_start
+EMBEDDED=yes
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/score7_elf.sh b/ld/emulparams/score7_elf.sh
new file mode 100644 (file)
index 0000000..9b7ce9b
--- /dev/null
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/score3_elf.sh
+ARCH=score7
diff --git a/ld/emulparams/scoreelf.sh b/ld/emulparams/scoreelf.sh
deleted file mode 100644 (file)
index 3a7ed31..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-MACHINE=
-SCRIPT_NAME=elf
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=scoreelf
-OUTPUT_FORMAT="elf32-bigscore"
-BIG_OUTPUT_FORMAT="elf32-bigscore"
-LITTLE_OUTPUT_FORMAT="elf32-littlescore"
-NO_RELA_RELOCS=yes
-GROUP="-lm -lc -lglsim -lgcc -lstdc++"
-
-TEXT_START_ADDR=0x00000000
-MAXPAGESIZE=256
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_GOT_SYMBOLS='
-  _gp = ALIGN(16) + 0x3ff0;
-'
-
-OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-SDATA_START_SYMBOLS='_sdata_begin = . ;'
-OTHER_BSS_SYMBOLS='
-  _bss_start = ALIGN(4) ;
-'
-# This sets the stack to the top of the simulator memory (2^19 bytes).
-STACK_ADDR=0x8000000
-
-SCORE_NAME=${EMULATION_NAME}
-if [ "${SCORE_NAME}" = "score3_elf" ] ; then
-ARCH=score3
-fi
-
-if [ "${SCORE_NAME}" = "score7_elf" ] ; then
-ARCH=score7
-fi
-
-MACHINE=
-ENTRY=_start
-EMBEDDED=yes
-GENERATE_SHLIB_SCRIPT=yes
index 443607025647de2ca75fb6882396f39f13f484a5..499607abe9891d8517c2b9bc4ae583bad95542e7 100755 (executable)
@@ -33,8 +33,7 @@
 #          enable_initfini_array \
 #          this_emulation \
 # optional:
-#          tool_dir \
-#          customizer_script
+#          tool_dir
 #
 # Sample usage:
 #
@@ -93,14 +92,9 @@ use_sysroot=$1
 ENABLE_INITFINI_ARRAY=$2
 EMULATION_NAME=$3
 TOOL_LIB=$4
-CUSTOMIZER_SCRIPT=$5
-
-if [ "x${CUSTOMIZER_SCRIPT}" = "x" ] ; then
-  CUSTOMIZER_SCRIPT=${EMULATION_NAME}
-fi
-CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh"
 
 # Include the emulation-specific parameters:
+CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"
 . ${CUSTOMIZER_SCRIPT}
 
 if test -d ldscripts; then