* genscripts.sh: Source the emulparams script before each output
authorAlan Modra <amodra@gmail.com>
Wed, 8 Aug 2001 13:14:38 +0000 (13:14 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 8 Aug 2001 13:14:38 +0000 (13:14 +0000)
script is generated so that variables like `RELOCATING' may affect
variables defined in the emulparams script.

ld/ChangeLog
ld/genscripts.sh

index 7f0e2cf665baa0dfb2c1561c40d41b89f48a3c4d..27e96573da595315ee2e0a65dc414852df0309b8 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-08  Alan Modra  <amodra@bigpond.net.au>
+
+       * genscripts.sh: Source the emulparams script before each output
+       script is generated so that variables like `RELOCATING' may affect
+       variables defined in the emulparams script.
+
 2001-08-04  Alan Modra  <amodra@bigpond.net.au>
 
        * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
index f6a29703d4b9163f534a4455f384ca5f16f89989..d3ab768ae8f6d2bbe5a64ae30dfa0e46a4bc2a92 100755 (executable)
@@ -99,39 +99,45 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
 LD_FLAG=r
 DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
 DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
-  ldscripts/${EMULATION_NAME}.xr
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xr
 
 LD_FLAG=u
 DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
 CONSTRUCTING=" "
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
-  ldscripts/${EMULATION_NAME}.xu
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xu
 
 LD_FLAG=
 DATA_ALIGNMENT=${DATA_ALIGNMENT_}
 RELOCATING=" "
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
-  ldscripts/${EMULATION_NAME}.x
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.x
 
 LD_FLAG=n
 DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
 TEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
-  ldscripts/${EMULATION_NAME}.xn
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xn
 
 LD_FLAG=N
 DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
-  ldscripts/${EMULATION_NAME}.xbn
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xbn
 
 if test -n "$GENERATE_SHLIB_SCRIPT"; then
   LD_FLAG=shared
   DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
   CREATE_SHLIB=" "
   # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
-  (. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
-    ldscripts/${EMULATION_NAME}.xs
+  ( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  ) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xs
 fi
 
 for i in $EMULATION_LIBPATH ; do