Blame env-builder-data/build/script/toolchain/win-common.sh

f17b54
#!/bin/bash
f17b54
f17b54
# TC_HOST should be set before inclusion of this file
f17b54
#
f17b54
# Optional c/c++ flags from Fedora MinGW:
f17b54
#   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
d03b26
#
d03b26
#   -Wall -g            - don't need
d03b26
#   -02 -fexceptions    - should be defined in packet if need
d03b26
#   -pipe               - not compatible with windres (used in lzma packet)
d03b26
#
d03b26
#   -Wp,-D_FORTIFY_SOURCE=2 --param=ssp-buffer-size=4
d03b26
#                       - may be better, but work fine without it, will added when any problem raised
d03b26
#
d03b26
# So no extra options for now
d03b26
TC_EXTRA_CPP_OPTIONS=
f17b54
b727d1
TC_PREFIX="/usr/local/$TC_HOST/sys-root"
b727d1
TC_BINPREFIX="$TC_PREFIX/bin/$TC_HOST"
f17b54
b727d1
export TC_PATH="$TC_PREFIX/bin:$INITIAL_PATH"
b727d1
export TC_LD_LIBRARY_PATH="$TC_PREFIX/lib:/usr/local/lib:/usr/local/lib64:$INITIAL_LD_LIBRARY_PATH"
f17b54
b727d1
export TC_ADDR2LINE=$TC_BINPREFIX-addr2line
b727d1
export TC_AS=$TC_BINPREFIX-as
b727d1
export TC_AR=$TC_BINPREFIX-ar
b727d1
export TC_CC=$TC_BINPREFIX-gcc
b727d1
export TC_CXXFILT=$TC_BINPREFIX-c++filt
b727d1
export TC_CXX=$TC_BINPREFIX-c++
b727d1
export TC_CPP=$TC_BINPREFIX-cpp
b727d1
export TC_DLLTOOL=$TC_BINPREFIX-dlltool
b727d1
export TC_DLLWRAP=$TC_BINPREFIX-dllwrap
b727d1
export TC_ELFEDIT=$TC_BINPREFIX-elfedit
b727d1
export TC_FORTRAN=$TC_BINPREFIX-gfortran
b727d1
export TC_GXX=$TC_BINPREFIX-g++
b727d1
export TC_GCC=$TC_BINPREFIX-gcc
b727d1
export TC_GCOV=$TC_BINPREFIX-gcov
b727d1
export TC_GCOV_TOOL=$TC_BINPREFIX-gcov-tool
b727d1
export TC_GFORTRAN=$TC_BINPREFIX-gfortran
b727d1
export TC_GPROF=$TC_BINPREFIX-gprof
b727d1
export TC_LD=$TC_BINPREFIX-ld
b727d1
export TC_LD_BFD=$TC_BINPREFIX-ld.bfd
b727d1
export TC_NM=$TC_BINPREFIX-nm
b727d1
export TC_OBJCOPY=$TC_BINPREFIX-objcopy
b727d1
export TC_OBJDUMP=$TC_BINPREFIX-objdump
b727d1
export TC_RANLIB=$TC_BINPREFIX-ranlib
b727d1
export TC_READELF=$TC_BINPREFIX-readelf
b727d1
export TC_SIZE=$TC_BINPREFIX-size
b727d1
export TC_STRINGS=$TC_BINPREFIX-strings
b727d1
export TC_STRIP=$TC_BINPREFIX-strip
b727d1
export TC_WINDMC=$TC_BINPREFIX-windmc
b727d1
export TC_RC=$TC_BINPREFIX-windres
b727d1
export TC_WINDRES=$TC_BINPREFIX-windres
b727d1
b727d1
export TC_LDFLAGS=" -L$TC_PREFIX/lib $INITIAL_LDFLAGS"
cd1b9d
export TC_CFLAGS=" $TC_EXTRA_CPP_OPTIONS $INITIAL_CFLAGS"
cd1b9d
export TC_CPPFLAGS=" $TC_EXTRA_CPP_OPTIONS $INITIAL_CPPFLAGS"
cd1b9d
export TC_CXXFLAGS=" $TC_EXTRA_CPP_OPTIONS $INITIAL_CXXFLAGS"
b727d1
export TC_PKG_CONFIG_PATH="$TC_PREFIX/lib/pkgconfig"
b727d1
export TC_PKG_CONFIG_LIBDIR="$TC_PREFIX/lib"
f17b54
export TC_XDG_DATA_DIRS="$INITIAL_XDG_DATA_DIRS"
b727d1
export TC_CMAKE_INCLUDE_PATH="$TC_PREFIX/include:$INITIAL_CMAKE_INCLUDE_PATH"
b727d1
export TC_CMAKE_LIBRARY_PATH="$TC_PREFIX/lib:$INITIAL_CMAKE_LIBRARY_PATH"
f17b54
b727d1
unset TC_BINPREFIX
b727d1
unset TC_PREFIX
f17b54
unset TC_EXTRA_CPP_OPTIONS