Allow ld target customiser script to force on disk scripts.
authorAlan Modra <amodra@gmail.com>
Fri, 17 Jan 2014 00:09:50 +0000 (10:39 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 17 Jan 2014 00:11:49 +0000 (10:41 +1030)
Mucking with EMULATION_LIBPATH has unwanted side effects.  Allow nds32
emulparams scripts to disable compiled-in scripts naturally, by
setting COMPILE_IN=no.

* genscripts.sh (COMPILE_IN): Don't set if already set.
* emulparams/nds32elf.sh: Don't clear EMULATION_LIBPATH, set
COMPILE_IN=no.
* emulparams/nds32elf16m.sh: Likewise.
* emulparams/nds32elf_linux.sh: Likewise.
* emultempl/aix.em: Test COMPILE_IN value is "yes".
* emultempl/armcoff.em: Likewise.
* emultempl/elf32.em: Likewise.
* emultempl/generic.em: Likewise.
* emultempl/gld960.em: Likewise.
* emultempl/gld960c.em: Likewise.
* emultempl/linux.em: Likewise.
* emultempl/lnk960.em: Likewise.
* emultempl/m68kcoff.em: Likewise.
* emultempl/sunos.em: Likewise.
* emultempl/ticoff.em: Likewise.

16 files changed:
ld/ChangeLog
ld/emulparams/nds32elf.sh
ld/emulparams/nds32elf16m.sh
ld/emulparams/nds32elf_linux.sh
ld/emultempl/aix.em
ld/emultempl/armcoff.em
ld/emultempl/elf32.em
ld/emultempl/generic.em
ld/emultempl/gld960.em
ld/emultempl/gld960c.em
ld/emultempl/linux.em
ld/emultempl/lnk960.em
ld/emultempl/m68kcoff.em
ld/emultempl/sunos.em
ld/emultempl/ticoff.em
ld/genscripts.sh

index 08c9b384b5b15ebc83a5eef95dcd606d3d8d6ff0..ee26f6488906c3a372e027f688a28655bd3962ac 100644 (file)
@@ -1,3 +1,22 @@
+2014-01-17  Alan Modra  <amodra@gmail.com>
+
+       * genscripts.sh (COMPILE_IN): Don't set if already set.
+       * emulparams/nds32elf.sh: Don't clear EMULATION_LIBPATH, set
+       COMPILE_IN=no.
+       * emulparams/nds32elf16m.sh: Likewise.
+       * emulparams/nds32elf_linux.sh: Likewise.
+       * emultempl/aix.em: Test COMPILE_IN value is "yes".
+       * emultempl/armcoff.em: Likewise.
+       * emultempl/elf32.em: Likewise.
+       * emultempl/generic.em: Likewise.
+       * emultempl/gld960.em: Likewise.
+       * emultempl/gld960c.em: Likewise.
+       * emultempl/linux.em: Likewise.
+       * emultempl/lnk960.em: Likewise.
+       * emultempl/m68kcoff.em: Likewise.
+       * emultempl/sunos.em: Likewise.
+       * emultempl/ticoff.em: Likewise.
+
 2014-01-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/16456
index c12048d7a54a362ca6da7ba5983b35fa8aa9c4d5..f0a7c3132945b39cdf3c8aed3d0355913c692d53 100644 (file)
@@ -14,6 +14,5 @@ MAXPAGESIZE=0x20
 EMBEDDED=yes
 COMMONPAGESIZE=0x20
 
-# Instruct genscripts.sh not to compile scripts in by COMPILE_IN
-# in order to use external linker scripts files.
-EMULATION_LIBPATH=
+# Use external linker script files.
+COMPILE_IN=no
index 7d3b063abdb9fee5da5d2bce40590ab92202b445..deb8699004af99aeddc59a7e346eb2730690f641 100644 (file)
@@ -14,6 +14,5 @@ MAXPAGESIZE=0x20
 EMBEDDED=yes
 COMMONPAGESIZE=0x20
 
-# Instruct genscripts.sh not to compile scripts in by COMPILE_IN
-# in order to use external linker scripts files.
-EMULATION_LIBPATH=
+# Use external linker script files.
+COMPILE_IN=no
index 6d89f7924f9222d0194d410c7a26a585a2adcb96..1145c0eeea8635c39b0732a7dbff5e1eb37d074a 100644 (file)
@@ -31,6 +31,5 @@ fi
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
 
-# Instruct genscripts.sh not to compile scripts in by COMPILE_IN
-# in order to use external linker scripts files.
-EMULATION_LIBPATH=
+# Use external linker script files.
+COMPILE_IN=no
index aa72ce64c4f9fdff4ea5f88fe60ca06d6be2767b..084bb664450ef77754e2c47ab694824fca71966f 100644 (file)
@@ -1399,7 +1399,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index 20bff145c5e62a5648b4acbb24a4b38dfefc501c..7c903781262e8d0ce0a0212de40c6055c75140fb 100644 (file)
@@ -205,7 +205,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index 569c7f7a816394fb9e9779bfb8113c5c961e00a6..a4f04f15c1bcefe666af66d2285e5685d28fb331 100644 (file)
@@ -2017,7 +2017,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index dce2bffd1e8714678e0b795a014d9734915875cd..53754f0f3f8abdedb51e85c3010f043e41115486 100644 (file)
@@ -81,7 +81,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index 4ba3eeca3f68b2cde24efc54f553983b56cc9f67..7e8552f7953fe4fd30e9d5073a5e3c152394859a 100644 (file)
@@ -74,7 +74,7 @@ static char *
 gld960_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index 1999ea89a85c43c9e88bb4b34f90f8d40ef6a97e..39fe1f24c107bce5282fa8897ed31fc8ffd6e99d 100644 (file)
@@ -87,7 +87,7 @@ static char *
 gld960_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index 61c7df4e8bedd3ee6accb81a30400ebdcc0d72e2..5cf5bfa795325bf17c84655a78f0a5ec08c4fc63 100644 (file)
@@ -131,7 +131,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index e556d432352656382fac0f5578a9d5d2a68d9599..1951c36c4f99511776e2edcaf0a490036cd603d4 100644 (file)
@@ -268,7 +268,7 @@ static char *
 lnk960_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index f68866cf1340c6b26c12aca7ef8c10a7300dace1..f34490d3a0555183baa3ad15719ae251846b83e4 100644 (file)
@@ -165,7 +165,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index af11027a73a3796dd506e33679b88ea00336f257..14bf5afc72a13b2770a12cff9a531f00810a5d01 100644 (file)
@@ -960,7 +960,7 @@ static char *
 gld${EMULATION_NAME}_get_script (int *isfile)
 EOF
 
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index dff1d7014f560a5eb78f5ef9022c1940ae48fc4f..3b952a4a12b1e85baf16abb5c75e6d3a7c5418a5 100644 (file)
@@ -106,7 +106,7 @@ gld_${EMULATION_NAME}_before_parse(void)
 static char *
 gld_${EMULATION_NAME}_get_script (int *isfile)
 EOF
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
 then
 # Scripts compiled in.
 
index eeb6d73b31ebc24bf7d4b8183cccfb0f119ce088..d240f99de319663ee0d60a29391859b32e5556ef 100755 (executable)
@@ -413,8 +413,8 @@ if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
   ) | sed -e '/^ *$/d;s/[      ]*$//' > ldscripts/${EMULATION_NAME}.xa
 fi
 
-case " $EMULATION_LIBPATH " in
-    *" ${EMULATION_NAME} "*) COMPILE_IN=true;;
+case "$COMPILE_IN: $EMULATION_LIBPATH " in
+    :*" ${EMULATION_NAME} "*) COMPILE_IN=yes;;
 esac
 
 # PR ld/5652:
This page took 0.031134 seconds and 4 git commands to generate.