Blame docker-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
f17b54
export TC_PATH="/usr/$TC_HOST/bin:/usr/$TC_HOST/sys-root/mingw/bin:$INITIAL_PATH"
f17b54
export TC_LD_LIBRARY_PATH="/usr/$TC_HOST/sys-root/mingw/lib:$INITIAL_LD_LIBRARY_PATH"
f17b54
f17b54
export TC_ADDR2LINE=/usr/bin/$TC_HOST-addr2line
f17b54
export TC_AS=/usr/bin/$TC_HOST-as
f17b54
export TC_AR=/usr/bin/$TC_HOST-ar
f17b54
export TC_CC=/usr/bin/$TC_HOST-gcc
f17b54
export TC_CXXFILT=/usr/bin/$TC_HOST-c++filt
f17b54
export TC_CXX=/usr/bin/$TC_HOST-c++
f17b54
export TC_CPP=/usr/bin/$TC_HOST-cpp
f17b54
export TC_DLLTOOL=/usr/bin/$TC_HOST-dlltool
f17b54
export TC_DLLWRAP=/usr/bin/$TC_HOST-dllwrap
f17b54
export TC_ELFEDIT=/usr/bin/$TC_HOST-elfedit
f17b54
export TC_FORTRAN=/usr/bin/$TC_HOST-gfortran
f17b54
export TC_GXX=/usr/bin/$TC_HOST-g++
f17b54
export TC_GCC=/usr/bin/$TC_HOST-gcc
f17b54
export TC_GCOV=/usr/bin/$TC_HOST-gcov
f17b54
export TC_GCOV_TOOL=/usr/bin/$TC_HOST-gcov-tool
f17b54
export TC_GFORTRAN=/usr/bin/$TC_HOST-gfortran
f17b54
export TC_GPROF=/usr/bin/$TC_HOST-gprof
f17b54
export TC_LD=/usr/bin/$TC_HOST-ld
f17b54
export TC_LD_BFD=/usr/bin/$TC_HOST-ld.bfd
f17b54
export TC_NM=/usr/bin/$TC_HOST-nm
f17b54
export TC_OBJCOPY=/usr/bin/$TC_HOST-objcopy
f17b54
export TC_OBJDUMP=/usr/bin/$TC_HOST-objdump
f17b54
export TC_PKG_CONFIG=/usr/bin/$TC_HOST-pkg-config
f17b54
export TC_RANLIB=/usr/bin/$TC_HOST-ranlib
f17b54
export TC_READELF=/usr/bin/$TC_HOST-readelf
f17b54
export TC_SIZE=/usr/bin/$TC_HOST-size
f17b54
export TC_STRINGS=/usr/bin/$TC_HOST-strings
f17b54
export TC_STRIP=/usr/bin/$TC_HOST-strip
f17b54
export TC_WINDMC=/usr/bin/$TC_HOST-windmc
f17b54
export TC_WINDRES=/usr/bin/$TC_HOST-windres
f17b54
f17b54
export TC_LDFLAGS=" -L/usr/$TC_HOST/sys-root/mingw/lib $INITIAL_LDFLAGS"
f17b54
export TC_CFLAGS=" $TC_EXTRA_CPP_OPTIONS -I/usr/$TC_HOST/sys-root/mingw/include $INITIAL_CFLAGS"
f17b54
export TC_CPPFLAGS=" $TC_EXTRA_CPP_OPTIONS -I/usr/$TC_HOST/sys-root/mingw/include $INITIAL_CPPFLAGS"
f17b54
export TC_CXXFLAGS=" $TC_EXTRA_CPP_OPTIONS -I/usr/$TC_HOST/sys-root/mingw/include $INITIAL_CXXFLAGS"
f17b54
export TC_PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/$TC_HOST/sys-root/mingw/lib/pkgconfig"
f17b54
export TC_PKG_CONFIG_LIBDIR="/usr/$TC_HOST/sys-root/mingw/lib"
f17b54
export TC_XDG_DATA_DIRS="$INITIAL_XDG_DATA_DIRS"
f17b54
export TC_CMAKE_INCLUDE_PATH="/usr/$TC_HOST/sys-root/mingw/include:$INITIAL_CMAKE_INCLUDE_PATH"
f17b54
export TC_CMAKE_LIBRARY_PATH="/usr/$TC_HOST/sys-root/mingw/lib:$INITIAL_CMAKE_LIBRARY_PATH"
f17b54
f17b54
unset TC_EXTRA_CPP_OPTIONS