2 # genscripts.sh - generate the ld-emulation-target specific files
3 # Copyright (C) 2004-2022 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 if test -d ldscripts
; then
152 # Set some flags for the emultempl scripts. USE_LIBPATH will
153 # be set for any libpath-using emulation; NATIVE will be set for a
154 # libpath-using emulation where ${host} = ${target}. NATIVE
155 # may already have been set by the emulparams file, but that's OK
156 # (it'll just get set to "yes" twice).
158 case " $EMULATION_LIBPATH " in
159 *" ${EMULATION_NAME} "*)
160 if [ "x${host}" = "x${target}" ] ; then
163 elif [ "x${use_sysroot}" = "xyes" ] ; then
169 # If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
170 if test "x$NATIVE" = "xyes" ; then
174 # Set the library search path, for libraries named by -lfoo.
175 # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
176 # Otherwise, the default is set here.
178 # The format is the usual list of colon-separated directories.
179 # To force a logically empty LIB_PATH, do LIBPATH=":".
181 # If we are using a sysroot, prefix library paths with "=" to indicate this.
183 # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
184 # the library path with the suffix applied.
186 # Paths with LIBPATH_SUFFIX
188 # Paths without LIBPATH_SUFFIX
190 if [ "${LIB_PATH}" != ":" ] ; then
191 lib_path2
=${LIB_PATH}
194 # Add args to lib_path1 and lib_path2, discarding any duplicates
199 # The "=" is harmless if we aren't using a sysroot, but also needless.
200 if [ "x${use_sysroot}" = "xyes" ] ; then
204 for libpath_suffix
in ${LIBPATH_SUFFIX}; do
207 case :${lib_path1}: in
209 ::) lib_path1
=${lib} ;;
210 *) lib_path1
=${lib_path1}:${lib} ;;
213 if test -n "${LIBPATH_SUFFIX_SKIP}"; then
215 *${LIBPATH_SUFFIX_SKIP}) skip_lib
=yes ;;
218 if test "${skip_lib}" = "no"; then
219 case :${lib_path1}: in
220 *:${lib}${libpath_suffix}:*) ;;
221 ::) lib_path1
=${lib}${libpath_suffix} ;;
222 *) lib_path1
=${lib_path1}:${lib}${libpath_suffix} ;;
227 if test "${skip_lib}" = "no"; then
228 case :${lib_path1}:${lib_path2}: in
230 *::) lib_path2
=${lib} ;;
231 *) lib_path2
=${lib_path2}:${lib} ;;
238 # Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
239 # except when LIBPATH=":".
240 if [ "${LIB_PATH}" != ":" ] ; then
242 if [ "x${TOOL_LIB}" = "x" ] ; then
243 if [ "x${NATIVE}" = "xyes" ] ; then
244 libs
="${exec_prefix}/${target_alias}/lib"
247 # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
248 # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
249 # because 64bit libraries may be in both places, depending on
250 # cross-development setup method (e.g.: /usr/s390x-linux/lib64
251 # vs. /usr/s390-linux/lib64)
252 for libpath_suffix
in ${LIBPATH_SUFFIX}; do
253 case "${NATIVE}:${libpath_suffix}:${TOOL_LIB}" in
254 :* |
*::* |
*:*:*${libpath_suffix}) ;;
255 *) libs
="${exec_prefix}/${target_alias}/lib${libpath_suffix}" ;;
258 libs
="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
260 append_to_lib_path
${libs}
263 if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes
] ; then
264 libs
=${NATIVE_LIB_DIRS}
265 if [ "x${NATIVE}" = "xyes" ] ; then
268 *) libs
="${libdir} ${libs}" ;;
271 append_to_lib_path
${libs}
274 case :${lib_path1}:${lib_path2}: in
275 *:: |
::*) LIB_PATH
=${lib_path1}${lib_path2} ;;
276 *) LIB_PATH
=${lib_path1}:${lib_path2} ;;
279 LIB_SEARCH_DIRS
=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
281 # We need it for testsuite.
282 set $EMULATION_LIBPATH
283 if [ "x$1" = "x$EMULATION_NAME" ]; then
284 test -d tmpdir || mkdir tmpdir
285 rm -f tmpdir
/libpath.exp
286 echo "set libpath \"${LIB_PATH}\"" |
sed -e 's/:/ /g' > tmpdir
/libpath.exp
289 if [ "x$SCRIPT_NAME" = "xelf" ]; then
290 GENERATE_COMBRELOC_SCRIPT
=yes
293 SEGMENT_SIZE
=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
295 # Determine DATA_ALIGNMENT for the 5 variants, using
296 # values specified in the emulparams/<script_to_run>.sh file or default.
298 DATA_ALIGNMENT_
="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
299 DATA_ALIGNMENT_n
="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
300 DATA_ALIGNMENT_N
="${DATA_ALIGNMENT_N-${DATA_ALIGNMENT-.}}"
301 DATA_ALIGNMENT_r
="${DATA_ALIGNMENT_r-${DATA_ALIGNMENT-}}"
302 DATA_ALIGNMENT_u
="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
305 DATA_ALIGNMENT
=${DATA_ALIGNMENT_r}
306 DEFAULT_DATA_ALIGNMENT
="ALIGN(${SEGMENT_SIZE})"
307 ( echo "/* Script for -r */"
308 source_sh
${CUSTOMIZER_SCRIPT}
309 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
310 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xr
313 DATA_ALIGNMENT
=${DATA_ALIGNMENT_u}
315 ( echo "/* Script for -Ur */"
316 source_sh
${CUSTOMIZER_SCRIPT}
317 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
318 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xu
320 DATA_ALIGNMENT
=${DATA_ALIGNMENT_}
323 ( echo "/* Default linker script, for normal executables */"
324 source_sh
${CUSTOMIZER_SCRIPT}
325 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
326 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.x
329 ( echo "/* Script for -z separate-code */"
330 source_sh
${CUSTOMIZER_SCRIPT}
331 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
332 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xe
334 if test -n "$GENERATE_RELRO_SCRIPT"; then
337 ( echo "/* Script for -z relro */"
338 source_sh
${CUSTOMIZER_SCRIPT}
339 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
340 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xo
342 ( echo "/* Script for -z separate-code -z relro */"
343 source_sh
${CUSTOMIZER_SCRIPT}
344 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
345 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xeo
349 DATA_ALIGNMENT
=${DATA_ALIGNMENT_n}
350 ( echo "/* Script for -n */"
351 source_sh
${CUSTOMIZER_SCRIPT}
352 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
353 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xn
356 DATA_ALIGNMENT
=${DATA_ALIGNMENT_N}
357 ( echo "/* Script for -N */"
358 source_sh
${CUSTOMIZER_SCRIPT}
359 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
360 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xbn
362 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
363 DATA_ALIGNMENT
=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
365 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xc.tmp
366 ( echo "/* Script for -z combreloc */"
367 source_sh
${CUSTOMIZER_SCRIPT}
368 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
369 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xc
372 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xce.tmp
373 ( echo "/* Script for -z combreloc -z separate-code */"
374 source_sh
${CUSTOMIZER_SCRIPT}
375 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
376 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xce
380 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xw.tmp
381 ( echo "/* Script for -z combreloc -z relro -z now */"
382 source_sh
${CUSTOMIZER_SCRIPT}
383 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
384 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xw
387 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xwe.tmp
388 ( echo "/* Script for -z combreloc -z separate-code -z relro -z now */"
389 source_sh
${CUSTOMIZER_SCRIPT}
390 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
391 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xwe
395 if test -n "$GENERATE_RELRO_SCRIPT"; then
398 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xco.tmp
399 ( echo "/* Script for -z combreloc -z relro */"
400 source_sh
${CUSTOMIZER_SCRIPT}
401 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
402 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xco
405 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xceo.tmp
406 ( echo "/* Script for -z combreloc -z separate-code -z relro */"
407 source_sh
${CUSTOMIZER_SCRIPT}
408 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
409 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xceo
416 if test -n "$GENERATE_SHLIB_SCRIPT"; then
417 DATA_ALIGNMENT
=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
420 ( echo "/* Script for -shared */"
421 source_sh
${CUSTOMIZER_SCRIPT}
422 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
423 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xs
424 LD_FLAG
=sharedtextonly
425 ( echo "/* Script for -shared -z separate-code */"
426 source_sh
${CUSTOMIZER_SCRIPT}
427 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
428 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xse
430 if test -n "$GENERATE_RELRO_SCRIPT"; then
433 ( echo "/* Script for -shared -z relro */"
434 source_sh
${CUSTOMIZER_SCRIPT}
435 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
436 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xso
437 LD_FLAG
=sharedtextonly
438 ( echo "/* Script for -shared -z separate-code -z relro */"
439 source_sh
${CUSTOMIZER_SCRIPT}
440 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
441 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xseo
444 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
445 DATA_ALIGNMENT
=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
447 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsc.tmp
448 ( echo "/* Script for -shared -z combreloc */"
449 source_sh
${CUSTOMIZER_SCRIPT}
450 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
451 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsc
453 LD_FLAG
=csharedtextonly
454 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsce.tmp
455 ( echo "/* Script for -shared -z combreloc -z separate-code */"
456 source_sh
${CUSTOMIZER_SCRIPT}
457 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
458 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsce
462 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsw.tmp
463 ( echo "/* Script for -shared -z combreloc -z relro -z now */"
464 source_sh
${CUSTOMIZER_SCRIPT}
465 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
466 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsw
468 LD_FLAG
=wsharedtextonly
469 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xswe.tmp
470 ( echo "/* Script for -shared -z combreloc -z separate-code -z relro -z now */"
471 source_sh
${CUSTOMIZER_SCRIPT}
472 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
473 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xswe
477 if test -n "$GENERATE_RELRO_SCRIPT"; then
480 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsco.tmp
481 ( echo "/* Script for -shared -z combreloc -z relro */"
482 source_sh
${CUSTOMIZER_SCRIPT}
483 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
484 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsco
486 LD_FLAG
=wsharedtextonly
487 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xsceo.tmp
488 ( echo "/* Script for -shared -z combreloc -z separate-code -z relro */"
489 source_sh
${CUSTOMIZER_SCRIPT}
490 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
491 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xsceo
500 if test -n "$GENERATE_PIE_SCRIPT"; then
501 DATA_ALIGNMENT
=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
504 ( echo "/* Script for -pie */"
505 source_sh
${CUSTOMIZER_SCRIPT}
506 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
507 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xd
509 ( echo "/* Script for -pie -z separate-code */"
510 source_sh
${CUSTOMIZER_SCRIPT}
511 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
512 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xde
513 if test -n "$GENERATE_RELRO_SCRIPT"; then
516 ( echo "/* Script for -pie -z relro */"
517 source_sh
${CUSTOMIZER_SCRIPT}
518 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
519 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdo
521 ( echo "/* Script for -pie -z separate-code -z relro */"
522 source_sh
${CUSTOMIZER_SCRIPT}
523 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
524 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdeo
527 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
528 DATA_ALIGNMENT
=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
529 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdc.tmp
531 ( echo "/* Script for -pie -z combreloc */"
532 source_sh
${CUSTOMIZER_SCRIPT}
533 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
534 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdc
537 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdce.tmp
538 ( echo "/* Script for -pie -z combreloc -z separate-code */"
539 source_sh
${CUSTOMIZER_SCRIPT}
540 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
541 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdce
545 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdw.tmp
546 ( echo "/* Script for -pie -z combreloc -z relro -z now */"
547 source_sh
${CUSTOMIZER_SCRIPT}
548 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
549 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdw
552 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdwe.tmp
553 ( echo "/* Script for -pie -z combreloc -z separate-code -z relro -z now */"
554 source_sh
${CUSTOMIZER_SCRIPT}
555 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
556 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdwe
560 if test -n "$GENERATE_RELRO_SCRIPT"; then
563 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdco.tmp
564 ( echo "/* Script for -pie -z combreloc -z relro */"
565 source_sh
${CUSTOMIZER_SCRIPT}
566 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
567 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdco
570 COMBRELOC
=ldscripts
/${EMULATION_NAME}.xdceo.tmp
571 ( echo "/* Script for -pie -z combreloc -z separate-code -z relro */"
572 source_sh
${CUSTOMIZER_SCRIPT}
573 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
574 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xdceo
584 if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
586 DATA_ALIGNMENT
=${DATA_ALIGNMENT_}
587 ( echo "/* Script for --enable-auto-import */"
588 source_sh
${CUSTOMIZER_SCRIPT}
589 source_sh
${srcdir}/scripttempl
/${SCRIPT_NAME}.sc
590 ) |
sed -e '/^ *$/d;s/[ ]*$//' > ldscripts
/${EMULATION_NAME}.xa
593 case "$COMPILE_IN: $EMULATION_LIBPATH " in
594 :*" ${EMULATION_NAME} "*) COMPILE_IN
=yes;;
598 # Determine if the shell has support for the variable BASH_LINENO.
599 # When it is the case, it is only available inside functions.
602 test "x$BASH_LINENO" != "x"
605 # Enable accruate error source in the compiler error messages, if possible.
607 .
${srcdir}/genscrba.sh
615 cat >> e
${EMULATION_NAME}.c
619 # Generate e${EMULATION_NAME}.c.
620 # Start with an empty file, then the sourced .em script
621 # can use the "fragment" function to append.
622 > e
${EMULATION_NAME}.c
623 source_em
${srcdir}/emultempl
/${TEMPLATE_NAME-generic}.em
625 if test -n "${DEPDIR}"; then
627 for dep
in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
630 *) ecdeps
="$ecdeps $dep" ;;
633 rm -f ${DEPDIR}/e
${EMULATION_NAME}.Tc
634 echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc