# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/libstdc++-v3-32/libstdc++-v3-32.conf # Copyright (C) 2010 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- setup_xgcc_wrapper() { mkdir -p gcc; pushd gcc cat <<-EOF > xgcc-wrapper #!/bin/bash # place the xgcc in the path export PATH="$PWD:\$PATH" [ "\$GCC_WRAPPER_DEBUG" = 1 ] && export CMD_WRAPPER_DEBUG=1 mycmd=\$1 if [ "\${mycmd%gcj}" != "\$mycmd" ]; then export CMD_WRAPPER_OTHERS="\$GCJ_WRAPPER_OTHERS" export CMD_WRAPPER_INSERT="\$GCJ_WRAPPER_INSERT" export CMD_WRAPPER_REMOVE="\$GCJ_WRAPPER_REMOVE" export CMD_WRAPPER_APPEND="\$GCJ_WRAPPER_APPEND" export CMD_WRAPPER_FILTER="\$GCJ_WRAPPER_FILTER" elif [ "\${mycmd%gfortran}" != "\$mycmd" ]; then export CMD_WRAPPER_OTHERS="\$F95_WRAPPER_OTHERS" export CMD_WRAPPER_INSERT="\$F95_WRAPPER_INSERT" export CMD_WRAPPER_REMOVE="\$F95_WRAPPER_REMOVE" export CMD_WRAPPER_APPEND="\$F95_WRAPPER_APPEND" export CMD_WRAPPER_FILTER="\$F95_WRAPPER_FILTER" else export CMD_WRAPPER_OTHERS="\$CC_WRAPPER_OTHERS:\$GCC_WRAPPER_OTHERS" export CMD_WRAPPER_INSERT="\$CC_WRAPPER_INSERT \$GCC_WRAPPER_INSERT" export CMD_WRAPPER_REMOVE="\$CC_WRAPPER_REMOVE \$GCC_WRAPPER_REMOVE" export CMD_WRAPPER_APPEND="\$CC_WRAPPER_APPEND \$GCC_WRAPPER_APPEND" export CMD_WRAPPER_FILTER="\$CC_WRAPPER_FILTER|\$GCC_WRAPPER_FILTER" fi exec cmd_wrapper "\$@" EOF chmod 0755 xgcc-wrapper export STAGE_CC_WRAPPER=$PWD/xgcc-wrapper popd } # we need -m32 ... - still needed? var_insert GCC_WRAPPER_INSERT " " "-m32 -Wa,--32" arch_target="`echo $arch_target | arch2arch32`" arch_build="`echo $arch_build | arch2arch32`" arch_machine="`echo $arch_machine | arch2arch32`" echo_status "Set arch_target to $arch_target" set_confopt # do what libstdc++-v3 does . $base/package/*/libstdc++-v3/libstdc++-v3.conf hook_add premake 5 setup_xgcc_wrapper