File: gcc_platform.sh

package info (click to toggle)
gccxml 0.7.0%2Bcvs20060311-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 45,240 kB
  • ctags: 59,007
  • sloc: ansic: 589,435; asm: 19,610; cpp: 12,681; sh: 4,326; yacc: 3,727; makefile: 3,074; perl: 318; lex: 307; awk: 117; pascal: 78; sed: 20
file content (41 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
GCC_SOURCE_DIR=`cd "\`echo \"$0\" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`";cd ..;pwd`
srcdir="${GCC_SOURCE_DIR}/gcc"

outfile="$1"
cmake_command="$2"

# Determine the host platforms.
config_sub="${GCC_SOURCE_DIR}/config.sub"
host_alias=`"${GCC_SOURCE_DIR}/config.guess"`
host=`"${GCC_SOURCE_DIR}/config.sub" $host_alias`
machine="${host}"

# Collect target-machine-specific information.
# This script needs to be included twice!
. "${GCC_SOURCE_DIR}/gcc/config.gcc"
. "${GCC_SOURCE_DIR}/gcc/config.gcc"

extra_objs="${host_extra_objs} ${extra_objs}"

# Report the information back to the CMake process.
cat > "${outfile}.in" <<EOF
SET(target ${host})
SET(cpu_type ${cpu_type})
SET(tm_defines ${tm_defines})
SET(tm_file ${tm_file})
SET(xm_defines ${xm_defines})
SET(xm_file ${xm_file})
SET(host_xm_defines ${host_xm_defines})
SET(host_xm_file ${host_xm_file})
SET(build_xm_defines ${build_xm_defines})
SET(build_xm_file ${build_xm_file})
SET(tm_p_file ${tm_p_file})
SET(extra_modes ${extra_modes})
SET(extra_objs ${extra_objs})
SET(c_target_objs ${c_target_objs})
SET(cxx_target_objs ${cxx_target_objs})
SET(target_cpu_default "${target_cpu_default}")
EOF

"${cmake_command}" -E copy_if_different "${outfile}.in" "${outfile}"
rm -f "${outfile}.in"