Web lists-archives.com

Re: [Mingw-users] GCC 5.3 on mingw




Aye, heres my build script.

ABSPATH=$(cd "$(dirname "$0")"; pwd)
REALPATH=/mingw
INSTDIR=${ABSPATH}/_inst
BUILDDIR=${ABSPATH}/_gccbuild
export CC=${REALPATH}/bin/gcc
export CXX=${REALPATH}/bin/g++
export CPATH="${REALPATH}/mingw32/include;${REALPATH}/include"
export LPATH="${REALPATH}/mingw32/lib;${REALPATH}/lib"
export CFLAGS+=" -O2 -pipe -DWINPTHREAD_STATIC"
export CXXFLAGS+=" -O2 -pipe -DWINPTHREAD_STATIC"
export LDFLAGS=" -Wl,--large-address-aware"

pushd gcc-5.3.0 > /dev/null

# do not install libiberty
[[ -f libiberty/Makefile.in.src ]] && {
     rm -f libiberty/Makefile.in
     cp -f libiberty/Makefile.in.src libiberty/Makefile.in
} || {
     cp -f libiberty/Makefile.in libiberty/Makefile.in.src
}
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in

# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
[[ -f libiberty/configure.src ]] && {
     rm -f libiberty/configure
     cp -f libiberty/configure.src libiberty/configure
} || {
     cp -f libiberty/configure libiberty/configure.src
}
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure

[[ -f gcc/configure.src ]] && {
     rm -f gcc/configure
     cp -f gcc/configure.src gcc/configure
} || {
     cp -f gcc/configure gcc/configure.src
}
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" gcc/configure

# do not expect $prefix/mingw symlink
[[ -f configure.src ]] && {
     rm -f configure
     cp -f configure.src configure
} || {
     cp -f configure configure.src
}
sed -i 's/${prefix}\/mingw\//${prefix}\//g' configure

# change hardcoded /mingw prefix to the real prefix
[[ -f gcc/config/i386/mingw32.h.src ]] && {
     rm -f gcc/config/i386/mingw32.h
     cp -f gcc/config/i386/mingw32.h.src gcc/config/i386/mingw32.h
} || {
     cp -f gcc/config/i386/mingw32.h gcc/config/i386/mingw32.h.src
}
MINGW_NATIVE_PREFIX=$(cygpath -am /mingw/mingw32)
sed -i "s/\\/mingw\\//${MINGW_NATIVE_PREFIX//\//\\/}\\//g" 
gcc/config/i386/mingw32.h

popd > /dev/null

rm -fr ${BUILDDIR} && \
mkdir ${BUILDDIR} && \
cd ${BUILDDIR} && \
../gcc-5.3.0/configure \
--build=mingw32 \
--enable-checking=release \
--enable-threads=posix \
--enable-interwork \
--enable-languages=c,ada,c++,lto,objc,fortran,obj-c++ \
--enable-version-specific-runtime-libs \
--enable-graphite \
--enable-targets=i686-pc-mingw32 \
--enable-lto \
--enable-libatomic \
--enable-libgomp \
--enable-libstdcxx-threads \
--enable-libstdcxx-time=yes \
--enable-fully-dynamic-string \
--enable-interpreter \
--enable-hash-synchronization \
--enable-sjlj-exceptions \
--disable-shared \
--disable-libstdcxx-pch \
--disable-libstdcxx-debug \
--disable-libvtv \
--disable-multilib \
--disable-rpath \
--disable-debug \
--disable-symvers \
--disable-werror \
--disable-werror-allways \
--disable-win32-registry \
--disable-canonical-system-headers \
--prefix=${REALPATH} \
--with-arch=i686 \
--with-local-prefix=${REALPATH} \
--with-libiconv-prefix=${REALPATH} \
--with-libiconv \
--with-system-zlib \
--without-newlib \
--without-dwarf2 \
--with-tune=generic \
--with-{gmp,mpfr,mpc,isl}=${REALPATH} \
--libexecdir=${REALPATH}/lib \
--with-gxx-include-dir=${REALPATH}/include/c++/5.2.0 \
--with-native-system-header-dir=${REALPATH}/mingw32/include \
--with-gnu-as \
--with-gnu-ld \
--verbose &&
make && \
make DESTDIR=${INSTDIR} install && \
make DESTDIR=${INSTDIR} install-html && \
cd ..

for the dwarf2 version change --enable-sjlj-exceptions to 
--disable-sjlj-exceptions and --without-dwarf2 to --with-dwarf2.

the patchset used 
http://sourceforge.net/projects/tdm-gcc/files/Sources/TDM%20Sources/

omit the libgcceh.patch as that one is rather hackish, and if you dont 
want it you can also omit the eh_shmem.patch.

The rest are needed though as they work around a few quirks in the gcc 5 
series.

First test seems to work but ill let it bootstrap itself over night.


On 16-01-2016 16:40, Eli Zaretskii wrote:
>> From: ralph engels <ralphengels@xxxxxxxxx>
>> Date: Sat, 16 Jan 2016 16:15:14 +0100
>>
>> It required some patching but im having a build of gcc-5.3.0 cooking
>> now. Should be done later today.
> Thanks.  Would it be possible for you to publish the patch you used,
> and perhaps also the configuration options?
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@xxxxxxxxxxxxxxxxxxxxx
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe