2 # genscripts.sh - generate the ld-emulation-target specific files
3 # Copyright (C) 2004-2024 Free Software Foundation, Inc.
5 # This file is part of the Gnu Linker.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GLD; see the file COPYING. If not, write to the Free
19 # Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22 # Usage: genscripts_extra.sh \
33 # enable_initfini_array \
40 # genscripts_extra.sh \
45 # sparc-sun-sunos4.1.3 \
46 # sparc-sun-sunos4.1.3 \
47 # sparc-sun-sunos4.1.3 \
52 # sparc-sun-sunos4.1.3 \
55 # produces the linker scripts:
57 # sun3.x [default linker script]
58 # sun3.xbn [used when the linker is invoked with "-N"]
59 # sun3.xn [used when the linker is invoked with "-n"]
60 # sun3.xr [used when the linker is invoked with "-r"]
61 # sun3.xu [used when the linker is invoked with "-Ur"]
63 # depending on platform specific settings linker scripts with the
64 # following suffixes might be generated as well:
66 # xdwe: -pie -z combreloc -z separate-code -z relro -z now
67 # xdw: -pie -z combreloc -z relro -z now
68 # xdceo: -pie -z combreloc -z separate-code -z relro
69 # xdce: -pie -z combreloc -z separate-code
70 # xdco: -pie -z combreloc -z relro
71 # xdc: -pie -z combreloc
72 # xdeo: -pie -z separate-code -z relro
73 # xde: -pie -z separate-code
77 # xswe: -shared -z combreloc -z separate-code -z relro -z now
78 # xsw: -shared -z combreloc -z relro -z now
79 # xsceo: -shared -z combreloc -z separate-code -z relro
80 # xsce: -shared -z combreloc -z separate-code
81 # xsco: -shared -z combreloc -z relro
82 # xsc: -shared -z combreloc
83 # xseo: -shared -z separate-code -z relro
84 # xse: -shared -z separate-code
85 # xso: -shared -z relro
88 # xwe: -z combreloc -z separate-code -z relro -z now
89 # xw: -z combreloc -z relro -z now
90 # xceo: -z combreloc -z separate-code -z relro
91 # xce: -z combreloc -z separate-code
92 # xco: -z combreloc -z relro
94 # xeo: -z separate-code -z relro
95 # xe: -z separate-code
99 # It also produced the C source file:
103 # which is then compiled into the linker.
105 # The linker scripts are created by running the shell script
106 # /sources/ld/emulparams/sparc.sh to set the value of ${SCRIPT_NAME}
107 # (and any other variables it wants to). ${SCRIPT_NAME} is then
108 # invoked with a variable called ${LD_FLAG} to tell it which version
109 # of the linker script to create.
125 ENABLE_INITFINI_ARRAY
=$5
132 if test -n "${DEPDIR}"; then
133 echo $1 >> ${DEPDIR}/e
${EMULATION_NAME}.Tc
138 if test -n "${DEPDIR}"; then
139 rm -f ${DEPDIR}/e
${EMULATION_NAME}.Tc
142 # Include the emulation-specific parameters:
143 CUSTOMIZER_SCRIPT
="${srcdir}/emulparams/${EMULATION_NAME}.sh"
144 source_sh
${CUSTOMIZER_SCRIPT}
146 # Set some flags for the emultempl scripts. USE_LIBPATH will
147 # be set for any libpath-using emulation; NATIVE will be set for a
148 # libpath-using emulation where ${host} = ${target}. NATIVE
149 # may already have been set by the emulparams file, but that's OK
150 # (it'll just get set to "yes" twice).
152 case " $EMULATION_LIBPATH " in
153 *" ${EMULATION_NAME} "*)
154 if [ "x${host}" = "x${target}" ] ; then
157 elif [ "x${use_sysroot}" = "xyes" ] ; then
163 # If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
164 if test "x$NATIVE" = "xyes" ; then
168 # Set the library search path, for libraries named by -lfoo.
169 # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
170 # Otherwise, the default is set here.
172 # The format is the usual list of colon-separated directories.
173 # To force a logically empty LIB_PATH, do LIBPATH=":".
175 # If we are using a sysroot, prefix library paths with "=" to indicate this.
177 # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
178 # the library path with the suffix applied.
180 # Paths with LIBPATH_SUFFIX
182 # Paths without LIBPATH_SUFFIX
184 if [ "${LIB_PATH}" != ":" ] ; then
185 lib_path2
=${LIB_PATH}
188 # Add args to lib_path1 and lib_path2, discarding any duplicates
193 # The "=" is harmless if we aren't using a sysroot, but also needless.
194 if [ "x${use_sysroot}" = "xyes" ] ; then
198 for libpath_suffix
in ${LIBPATH_SUFFIX}; do
201 case :${lib_path1}: in
203 ::) lib_path1
=${lib} ;;
204 *) lib_path1
=${lib_path1}:${lib} ;;
207 if test -n "${LIBPATH_SUFFIX_SKIP}"; then
209 *${LIBPATH_SUFFIX_SKIP}) skip_lib
=yes ;;
212 if test "${skip_lib}" = "no"; then
213 case :${lib_path1}: in
214 *:${lib}${libpath_suffix}:*) ;;
215 ::) lib_path1
=${lib}${libpath_suffix} ;;
216 *) lib_path1
=${lib_path1}:${lib}${libpath_suffix} ;;
221 if test "${skip_lib}" = "no"; then
222 case :${lib_path1}:${lib_path2}: in
224 *::) lib_path2
=${lib} ;;
225 *) lib_path2
=${lib_path2}:${lib} ;;
232 # Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
233 # except when LIBPATH=":".
234 if [ "${LIB_PATH}" != ":" ] ; then
236 if [ "x${TOOL_LIB}" = "x" ] ; then
237 if [ "x${NATIVE}" = "xyes" ] ; then
238 libs
="${exec_prefix}/${target_alias}/lib"
241 # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
242 # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
243 # because 64bit libraries may be in both places, depending on
244 # cross-development setup method (e.g.: /usr/s390x-linux/lib64
245 # vs. /usr/s390-linux/lib64)
246 for libpath_suffix
in ${LIBPATH_SUFFIX}; do
247 case "${NATIVE}:${libpath_suffix}:${TOOL_LIB}" in
248 :* |
*::* |
*:*:*${libpath_suffix}) ;;
249 *) libs
="${exec_prefix}/${target_alias}/lib${libpath_suffix}" ;;
252 libs
="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
254 append_to_lib_path
${libs}
257 if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes
] ; then
258 libs
=${NATIVE_LIB_DIRS}
259 if [ "x${NATIVE}" = "xyes" ] ; then
262 *) libs
="${libdir} ${libs}" ;;
265 append_to_lib_path
${libs}
268 case :${lib_path1}:${lib_path2}: in
269 *:: |
::*) LIB_PATH
=${lib_path1}${lib_path2} ;;
270 *) LIB_PATH
=${lib_path1}:${lib_path2} ;;
273 LIB_SEARCH_DIRS
=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
275 # We need it for testsuite.
276 set $EMULATION_LIBPATH
277 if [ "x$1" = "x$EMULATION_NAME" ]; then
278 test -d tmpdir || mkdir tmpdir
279 rm -f tmpdir
/libpath.exp
280 echo "set libpath \"${LIB_PATH}\"" |
sed -e 's/:/ /g' > tmpdir
/libpath.exp
283 if [ "x$SCRIPT_NAME" = "xelf" ]; then
284 GENERATE_COMBRELOC_SCRIPT
=yes
287 SEGMENT_SIZE
=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
289 # Determine DATA_ALIGNMENT for the 5 variants, using
290 # values specified in the emulparams/<script_to_run>.sh file or default.
292 DATA_ALIGNMENT_
="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
293 DATA_ALIGNMENT_n
="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
294 DATA_ALIGNMENT_N
="${DATA_ALIGNMENT_N-${DATA_ALIGNMENT-.}}"
295 DATA_ALIGNMENT_r
="${DATA_ALIGNMENT_r-${DATA_ALIGNMENT-}}"
296 DATA_ALIGNMENT_u
="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
299 DATA_ALIGNMENT
=${DATA_ALIGNMENT_r}
300 DEFAULT_DATA_ALIGNMENT
="ALIGN(${SEGMENT_SIZE})"
301 ( echo "/* Script for -r */"
302 source_sh
${CUSTOMIZER_SCRIPT}
303 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
304 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xr
307 DATA_ALIGNMENT
=${DATA_ALIGNMENT_u}
309 ( echo "/* Script for -Ur */"
310 source_sh
${CUSTOMIZER_SCRIPT}
311 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
312 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xu
314 DATA_ALIGNMENT
=${DATA_ALIGNMENT_}
317 ( echo "/* Default linker script, for normal executables */"
318 source_sh
${CUSTOMIZER_SCRIPT}
319 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
320 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.x
323 ( echo "/* Script for -z separate-code */"
324 source_sh
${CUSTOMIZER_SCRIPT}
325 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
326 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xe
328 if test -n "$GENERATE_RELRO_SCRIPT"; then
331 ( echo "/* Script for -z relro */"
332 source_sh
${CUSTOMIZER_SCRIPT}
333 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
334 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xo
336 ( echo "/* Script for -z separate-code -z relro */"
337 source_sh
${CUSTOMIZER_SCRIPT}
338 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
339 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xeo
343 DATA_ALIGNMENT
=${DATA_ALIGNMENT_n}
344 ( echo "/* Script for -n */"
345 source_sh
${CUSTOMIZER_SCRIPT}
346 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
347 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xn
350 DATA_ALIGNMENT
=${DATA_ALIGNMENT_N}
351 ( echo "/* Script for -N */"
352 source_sh
${CUSTOMIZER_SCRIPT}
353 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
354 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xbn
356 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
357 DATA_ALIGNMENT
=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
359 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xc.tmp
360 ( echo "/* Script for -z combreloc */"
361 source_sh
${CUSTOMIZER_SCRIPT}
362 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
363 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xc
366 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xce.tmp
367 ( echo "/* Script for -z combreloc -z separate-code */"
368 source_sh
${CUSTOMIZER_SCRIPT}
369 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
370 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xce
374 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xw.tmp
375 ( echo "/* Script for -z combreloc -z relro -z now */"
376 source_sh
${CUSTOMIZER_SCRIPT}
377 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
378 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xw
381 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xwe.tmp
382 ( echo "/* Script for -z combreloc -z separate-code -z relro -z now */"
383 source_sh
${CUSTOMIZER_SCRIPT}
384 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
385 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xwe
389 if test -n "$GENERATE_RELRO_SCRIPT"; then
392 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xco.tmp
393 ( echo "/* Script for -z combreloc -z relro */"
394 source_sh
${CUSTOMIZER_SCRIPT}
395 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
396 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xco
399 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xceo.tmp
400 ( echo "/* Script for -z combreloc -z separate-code -z relro */"
401 source_sh
${CUSTOMIZER_SCRIPT}
402 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
403 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xceo
410 if test -n "$GENERATE_SHLIB_SCRIPT"; then
411 DATA_ALIGNMENT
=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
414 ( echo "/* Script for -shared */"
415 source_sh
${CUSTOMIZER_SCRIPT}
416 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
417 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xs
418 LD_FLAG
=sharedtextonly
419 ( echo "/* Script for -shared -z separate-code */"
420 source_sh
${CUSTOMIZER_SCRIPT}
421 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
422 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xse
424 if test -n "$GENERATE_RELRO_SCRIPT"; then
427 ( echo "/* Script for -shared -z relro */"
428 source_sh
${CUSTOMIZER_SCRIPT}
429 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
430 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xso
431 LD_FLAG
=sharedtextonly
432 ( echo "/* Script for -shared -z separate-code -z relro */"
433 source_sh
${CUSTOMIZER_SCRIPT}
434 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
435 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xseo
438 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
439 DATA_ALIGNMENT
=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
441 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsc.tmp
442 ( echo "/* Script for -shared -z combreloc */"
443 source_sh
${CUSTOMIZER_SCRIPT}
444 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
445 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsc
447 LD_FLAG
=csharedtextonly
448 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsce.tmp
449 ( echo "/* Script for -shared -z combreloc -z separate-code */"
450 source_sh
${CUSTOMIZER_SCRIPT}
451 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
452 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsce
456 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsw.tmp
457 ( echo "/* Script for -shared -z combreloc -z relro -z now */"
458 source_sh
${CUSTOMIZER_SCRIPT}
459 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
460 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsw
462 LD_FLAG
=wsharedtextonly
463 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xswe.tmp
464 ( echo "/* Script for -shared -z combreloc -z separate-code -z relro -z now */"
465 source_sh
${CUSTOMIZER_SCRIPT}
466 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
467 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xswe
471 if test -n "$GENERATE_RELRO_SCRIPT"; then
474 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsco.tmp
475 ( echo "/* Script for -shared -z combreloc -z relro */"
476 source_sh
${CUSTOMIZER_SCRIPT}
477 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
478 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsco
480 LD_FLAG
=wsharedtextonly
481 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsceo.tmp
482 ( echo "/* Script for -shared -z combreloc -z separate-code -z relro */"
483 source_sh
${CUSTOMIZER_SCRIPT}
484 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
485 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsceo
494 if test -n "$GENERATE_PIE_SCRIPT"; then
495 DATA_ALIGNMENT
=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
498 ( echo "/* Script for -pie */"
499 source_sh
${CUSTOMIZER_SCRIPT}
500 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
501 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xd
503 ( echo "/* Script for -pie -z separate-code */"
504 source_sh
${CUSTOMIZER_SCRIPT}
505 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
506 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xde
507 if test -n "$GENERATE_RELRO_SCRIPT"; then
510 ( echo "/* Script for -pie -z relro */"
511 source_sh
${CUSTOMIZER_SCRIPT}
512 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
513 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdo
515 ( echo "/* Script for -pie -z separate-code -z relro */"
516 source_sh
${CUSTOMIZER_SCRIPT}
517 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
518 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdeo
521 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
522 DATA_ALIGNMENT
=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
523 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdc.tmp
525 ( echo "/* Script for -pie -z combreloc */"
526 source_sh
${CUSTOMIZER_SCRIPT}
527 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
528 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdc
531 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdce.tmp
532 ( echo "/* Script for -pie -z combreloc -z separate-code */"
533 source_sh
${CUSTOMIZER_SCRIPT}
534 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
535 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdce
539 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdw.tmp
540 ( echo "/* Script for -pie -z combreloc -z relro -z now */"
541 source_sh
${CUSTOMIZER_SCRIPT}
542 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
543 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdw
546 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdwe.tmp
547 ( echo "/* Script for -pie -z combreloc -z separate-code -z relro -z now */"
548 source_sh
${CUSTOMIZER_SCRIPT}
549 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
550 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdwe
554 if test -n "$GENERATE_RELRO_SCRIPT"; then
557 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdco.tmp
558 ( echo "/* Script for -pie -z combreloc -z relro */"
559 source_sh
${CUSTOMIZER_SCRIPT}
560 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
561 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdco
564 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdceo.tmp
565 ( echo "/* Script for -pie -z combreloc -z separate-code -z relro */"
566 source_sh
${CUSTOMIZER_SCRIPT}
567 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
568 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdceo
578 if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
580 DATA_ALIGNMENT
=${DATA_ALIGNMENT_}
581 ( echo "/* Script for --enable-auto-import */"
582 source_sh
${CUSTOMIZER_SCRIPT}
583 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
584 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xa
587 case "$COMPILE_IN: $EMULATION_LIBPATH " in
588 :*" ${EMULATION_NAME} "*) COMPILE_IN
=yes;;
592 # Determine if the shell has support for the variable BASH_LINENO.
593 # When it is the case, it is only available inside functions.
596 test "x$BASH_LINENO" != "x"
599 # Enable accruate error source in the compiler error messages, if possible.
601 .
${srcdir}/genscrba.sh
609 cat >> e
${EMULATION_NAME}.c
613 # Generate e${EMULATION_NAME}.c.
614 # Start with an empty file, then the sourced .em script
615 # can use the "fragment" function to append.
616 > e
${EMULATION_NAME}.c
617 source_em
${srcdir}/emultempl
/${TEMPLATE_NAME-generic}.em
619 if test -n "${DEPDIR}"; then
621 for dep
in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
624 *) ecdeps
="$ecdeps $dep" ;;
627 rm -f ${DEPDIR}/e
${EMULATION_NAME}.Tc
628 echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc