1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/libstdc++-v3-32/libstdc++-v3-32.conf
3 # Copyright (C) 2010 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License. A copy of the
11 # GNU General Public License can be found in the file COPYING.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 function setup_xgcc_wrapper() {
15 mkdir -p gcc; pushd gcc
17 cat <<-EOF > xgcc-wrapper
19 # place the xgcc in the path
20 export PATH="$PWD:\$PATH"
21 [ "\$GCC_WRAPPER_DEBUG" = 1 ] && export CMD_WRAPPER_DEBUG=1
23 if [ "\${mycmd%gcj}" != "\$mycmd" ]; then
24 export CMD_WRAPPER_OTHERS="\$GCJ_WRAPPER_OTHERS"
25 export CMD_WRAPPER_INSERT="\$GCJ_WRAPPER_INSERT"
26 export CMD_WRAPPER_REMOVE="\$GCJ_WRAPPER_REMOVE"
27 export CMD_WRAPPER_APPEND="\$GCJ_WRAPPER_APPEND"
28 export CMD_WRAPPER_FILTER="\$GCJ_WRAPPER_FILTER"
29 elif [ "\${mycmd%gfortran}" != "\$mycmd" ]; then
30 export CMD_WRAPPER_OTHERS="\$F95_WRAPPER_OTHERS"
31 export CMD_WRAPPER_INSERT="\$F95_WRAPPER_INSERT"
32 export CMD_WRAPPER_REMOVE="\$F95_WRAPPER_REMOVE"
33 export CMD_WRAPPER_APPEND="\$F95_WRAPPER_APPEND"
34 export CMD_WRAPPER_FILTER="\$F95_WRAPPER_FILTER"
36 export CMD_WRAPPER_OTHERS="\$CC_WRAPPER_OTHERS:\$GCC_WRAPPER_OTHERS"
37 export CMD_WRAPPER_INSERT="\$CC_WRAPPER_INSERT \$GCC_WRAPPER_INSERT"
38 export CMD_WRAPPER_REMOVE="\$CC_WRAPPER_REMOVE \$GCC_WRAPPER_REMOVE"
39 export CMD_WRAPPER_APPEND="\$CC_WRAPPER_APPEND \$GCC_WRAPPER_APPEND"
40 export CMD_WRAPPER_FILTER="\$CC_WRAPPER_FILTER|\$GCC_WRAPPER_FILTER"
42 exec cmd_wrapper "\$@"
45 chmod 0755 xgcc-wrapper
46 export STAGE_CC_WRAPPER=$PWD/xgcc-wrapper
51 # we need -m32 ... - still needed?
52 var_insert GCC_WRAPPER_INSERT " " "-m32 -Wa,--32"
54 arch_target="`echo $arch_target | arch2arch32`"
55 arch_build="`echo $arch_build | arch2arch32`"
56 arch_machine="`echo $arch_machine | arch2arch32`"
58 echo_status "Set arch_target to $arch_target"
61 # do what libstdc++-v3 does
62 . $base/package/*/libstdc++-v3/libstdc++-v3.conf
64 hook_add premake 5 setup_xgcc_wrapper