Projet_SETI_RISC-V/riscv-gnu-toolchain/binutils/ld/genscrba.sh

17 lines
319 B
Bash
Raw Normal View History

2023-03-06 14:48:14 +01:00
#!/bin/bash
source_em()
{
local current_script="$em_script"
em_script=$1
source_sh $1
em_script=$current_script
}
fragment()
{
if [ ${BASH_VERSINFO[3]} -ge 3 ]; then
local lineno=$[${BASH_LINENO[0]} + 1]
echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
fi
cat >> e${EMULATION_NAME}.c
}