https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97822
--- Comment #2 from Vladimir Koković <vladimir.kokovic at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> Please specify the exact target
inxi --machine --graphics --cpu --system
System: Host: vlada-kuci Kernel: 5.8.18-1-MANJARO x86_64 bits: 64 Desktop:
KDE Plasma 5.20.2 Distro: Manjaro Linux
Machine: Type: Desktop Mobo: ASUSTeK model: M5A78L-M PLUS/USB3 v: Rev X.0x
serial: 160882541101074 BIOS: American Megatrends
v: 0404 date: 06/27/2016
CPU: Info: 8-Core model: AMD FX-8300 bits: 64 type: MCP L2 cache: 2048
KiB
Speed: 3234 MHz min/max: 1400/3300 MHz Core speeds (MHz): 1: 3234 2:
2271 3: 2413 4: 2087 5: 2668 6: 1585 7: 2028
8: 1460
Graphics: Device-1: NVIDIA GK208B [GeForce GT 710] driver: nvidia v: 440.100
Display: x11 server: X.Org 1.20.9 driver: nvidia resolution:
1920x1080~60Hz
OpenGL: renderer: GeForce GT 710/PCIe/SSE2 v: 4.6.0 NVIDIA 440.100
GIT_DIR=/mnt/WD-Elements-25A1/src/gcc-mirror-git/gcc/.git git describe HEAD
misc/first-auto-changelog-4144-gc283a711c85
Build a cross compiler for MinGW(gcc 10.2.0)
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-w64-mingw32
My build script:
----------------
#!/bin/bash
set -v
set -e
# Script to configure a crossed-native-compiler for MinGW.
# Should be run twice.
# The first pass is for configure and partial build and the second for complete
build.
MINGW_DIR=/mnt/sdd1/home/src/gcc-mirror-git
GCC_DIR=$MINGW_DIR/gcc
PREFIX=$MINGW_DIR/mingw-install
TARGET=x86_64-w64-mingw32
OBJDIR=mingw-objdir
export CPP=/usr/bin/cpp
cd $MINGW_DIR
fullbuild="no"
if [ ! -f "$OBJDIR/Makefile" ]; then
fullbuild="yes"
fi
if [[ $fullbuild == "yes" ]]; then
rm -rf $OBJDIR
mkdir $OBJDIR
fi
cd $OBJDIR
if [[ $fullbuild == "yes" ]]; then
set +e
make distclean > $MINGW_DIR/mingw-make-distclean-out.log 2>&1
set -e
$GCC_DIR/configure \
--srcdir=$GCC_DIR \
--prefix="$PREFIX" \
--target=$TARGET \
--enable-shared \
--enable-static \
--enable-threads=posix \
--enable-fully-dynamic-string \
--enable-libstdcxx-time=yes \
--enable-libstdcxx-filesystem-ts=yes \
--with-system-zlib \
--enable-cloog-backend=isl \
--enable-lto \
--disable-dw2-exceptions \
--enable-libgomp \
--disable-multilib \
--enable-checking=release \
> $MINGW_DIR/mingw-configure-out.log 2>&1
else
set +e
x=`grep "\/\*VK \#define _GLIBCXX_HAVE_SYS_SDT_H 1 \*\/"
"$MINGW_DIR/$OBJDIR/$TARGET/libstdc++-v3/include/$TARGET/bits/c++config.h"`
set -e
if [[ $x == "" ]]; then
sed --in-place -e "s'#define _GLIBCXX_HAVE_SYS_SDT_H 1'/*VK #define
_GLIBCXX_HAVE_SYS_SDT_H 1 */'g"
"$MINGW_DIR/$OBJDIR/$TARGET/libstdc++-v3/include/$TARGET/bits/c++config.h"
fi
fi
if [[ ! -L "$PREFIX/$TARGET/include" ]] ; then
mkdir -p $PREFIX/$TARGET
cd $PREFIX/$TARGET
ln -s /usr/$TARGET/include include
ln -s /usr/$TARGET/lib lib
cd $MINGW_DIR/$OBJDIR
fi
make -j4 > $MINGW_DIR/mingw-make-out.log 2>&1
make install > $MINGW_DIR/mingw-make-install-out.log 2>&1
wineserver -p
#
# Wine requires that the path be set in its own conf file (not PATH envvar)
that points to wherever the c++ standard library is.
# At least on Linux.
# and
# If you want to change the PATH, SYSTEM or TEMP env variables, then of
course you can't modify in standard way,
# since this will alter the Unix environment settings. Instead, you should
set them into the registry.
# To set them you should launch wine regedit and then go to the
HKEY_CURRENT_USER/Environment and modify the value
# new string value: PATH
C:\windows\system32;C:\windows;C:\windows\system32\wbem;z:\usr\x86_64-w64-mingw32\bin
#
make -k check > $MINGW_DIR/mingw-make-check-out.log 2>&1
wineserver -k
exit 0
----------------