gcc-5.4.0 static dwarf2 compile
生活随笔
收集整理的這篇文章主要介紹了
gcc-5.4.0 static dwarf2 compile
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
-------------------------------------------------------------------------------
又開(kāi)始折騰了, 靜態(tài)編譯 gcc-5.4.0 dwarf2
-------------------------------------------------------------------------------
http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.xz
-------------------------------------------------------------------------------
./configure \
--prefix=/usr/local \
--disable-shared \
--enable-static
make && make install
-------------------------------------------------------------------------------
ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
-------------------------------------------------------------------------------
./configure \
--prefix=/usr/local \
--disable-shared \
--enable-static
make && make install
-------------------------------------------------------------------------------
https://gmplib.org/download/gmp/gmp-6.1.1.tar.xz
-------------------------------------------------------------------------------
./configure \
--host=i686-w64-mingw32 \
--build=i686-w64-mingw32 \
--target=i686-w64-mingw32 \
--host=i686-w64-mingw32 \
--prefix=/usr/local \
--disable-shared \
--enable-static \
--enable-cxxconfigure: summary of build options:Version: GNU MP 6.1.1Host type: i686-w64-mingw32ABI: 32Install prefix: /usr/localCompiler: gccStatic libraries: yesShared libraries: no __declspec(dllexport) fix to --> __attribute__((visibility ("default")))
__declspec(dllimport) fix to --> make && make install-------------------------------------------------------------------------------
http://isl.gforge.inria.fr/isl-0.17.1.tar.xz
-------------------------------------------------------------------------------
./configure \
--host=i686-w64-mingw32 \
--build=i686-w64-mingw32 \
--target=i686-w64-mingw32 \
--host=i686-w64-mingw32 \
--disable-shared \
--enable-static
make && make install
-------------------------------------------------------------------------------
http://www.mr511.de/software/libelf-0.8.13.tar.gz
-------------------------------------------------------------------------------
./configure \
--prefix=/usr/local \
--disable-shared \
--enable-static
make && make install
-------------------------------------------------------------------------------
http://bugseng.com/products/ppl/download/ftp/releases/1.2/ppl-1.2.tar.xz don't install the ppl-1.2
http://bugseng.com/products/ppl/download/ftp/releases/0.11.2/ppl-0.11.2.tar.bz2
http://bugseng.com/products/ppl/download/ftp/releases/0.12.1/ppl-0.12.1.tar.xz
-------------------------------------------------------------------------------
./configure \
--prefix=/usr/local \
--disable-shared \
--enable-static \
--enable-cxx \
--with-gmp=/usr/local make && make install
===============================================================================
configure: error: Cannot find GMP version 4.1.3 or higher.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++ interface:
add --enable-cxx to the configuration options.So I also faced the same issue and what I did was:1) Went inside gmp-6.1.1 folder
2) make distclean
3) ./configure --prefix=/usr/local ... add --enable-cxx
4) make && make install
5) Went inside ppl-0.12.1 folder
6) ./configure --prefix=/usr/local ...
7) make & make installTook some 10-20 mins to compile and things were fine.
===============================================================================
GMP version 5.1.0 (and, presumably, later versions) defines std::numeric_limits.src/mp_std_bits.cc | 6 ++++++src/mp_std_bits_defs.hh | 6 ++++++2 files changed, 12 insertions(+), 0 deletions(-)diff --git a/src/mp_std_bits.cc b/src/mp_std_bits.cc
index c8da535..918b9af 100644
--- a/src/mp_std_bits.cc
+++ b/src/mp_std_bits.cc
@@ -25,6 +25,9 @@ site: http://bugseng.com/products/ppl/ . */#include "ppl-config.h"#include "mp_std_bits_defs.hh"+#if __GNU_MP_VERSION < 5 \
+ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
+const bool std::numeric_limits::is_specialized;const int std::numeric_limits::digits;const int std::numeric_limits::digits10;
@@ -70,3 +73,6 @@ const bool std::numeric_limits::is_modulo;const bool std::numeric_limits::traps;const bool std::numeric_limits::tininess_before;const std::float_round_style std::numeric_limits::round_style;
+
+#endif // __GNU_MP_VERSION < 5
+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)diff --git a/src/mp_std_bits_defs.hh b/src/mp_std_bits_defs.hh
index f71595a..0d078ec 100644
--- a/src/mp_std_bits_defs.hh
+++ b/src/mp_std_bits_defs.hh
@@ -38,6 +38,9 @@ void swap(mpz_class& x, mpz_class& y);#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)void swap(mpq_class& x, mpq_class& y);+#if __GNU_MP_VERSION < 5 \
+ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
+namespace std {#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
@@ -164,6 +167,9 @@ public:} // namespace std+#endif // __GNU_MP_VERSION < 5
+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
+#include "mp_std_bits_inlines.hh"#endif // !defined(PPL_mp_std_bits_defs_hh)
===============================================================================
-------------------------------------------------------------------------------http://www.bastoul.net/cloog/pages/download/cloog-0.18.4.tar.gz
-------------------------------------------------------------------------------
./configure \
--prefix=/usr/local \
--disable-shared \
--enable-static \
--with-ppl=/usr/local \
--with-isl=system
-------------------------------------------------------------------------------
http://ftp.osuosl.org/pub/clfs/conglomeration/cloog-ppl/cloog-ppl-0.15.11.tar.gz
-------------------------------------------------------------------------------
./configure \
--prefix=/usr/local \
--disable-shared \
--enable-static \
--with-ppl=/usr/local \
--with-gmp=/usr/local modify Makefile add -lstdc++
LIBS = -lpsapi -lws2_32 -lmswsock -lgmp -lppl_c -lppl -lgmpxx -lstdc++
-------------------------------------------------------------------------------
http://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2
-------------------------------------------------------------------------------
export CPP=/mingw/bin/cpp \
export LD_LIBRARY_PATH=/usr/local/lib \
export LIBS= \
export CFLAGS=' -I/usr/local/include -I/usr/mingw/i686-w64-mingw32/include ' \
export CPPFLAGS=' -I/usr/local/include -I/usr/mingw/i686-w64-mingw32/include ' \
export CXXFLAGS=' -I/usr/local/include -I/usr/mingw/i686-w64-mingw32/include ' \
export LDFLAGS=' -L/usr/local/lib -L/usr/mingw/i686-w64-mingw32/lib ' mkdir _build
cd _build../gcc-5.4.0/configure \
--prefix=/mingw32 \
--with-local-prefix=/mingw/local \
--build=i686-w64-mingw32 \
--host=i686-w64-mingw32 \
--target=i686-w64-mingw32 \
--with-native-system-header-dir=/mingw/i686-w64-mingw32/include \
--libexecdir=/usr/local/lib \
--enable-bootstrap \
--with-arch=i686 \
--with-tune=generic \
--enable-languages=c,lto,c++,objc,obj-c++,fortran \
--enable-shared \
--enable-static \
--disable-64bit \
--enable-threads=win32 \
--enable-libatomic \
--enable-graphite \
--enable-fully-dynamic-string \
--enable-libstdcxx-time=yes \
--disable-libstdcxx-pch \
--disable-libstdcxx-debug \
--disable-isl-version-check \
--enable-lto \
--enable-libgomp \
--disable-multilib \
--enable-checking=release \
--disable-rpath \
--disable-win32-registry \
--disable-nls \
--disable-werror \
--disable-symvers \
--with-libiconv \
--with-system-zlib \
--with-gmp=/usr/local \
--with-mpfr=/usr/local \
--with-mpc=/usr/local \
--with-isl=/usr/local \
--with-gnu-as \
--with-gnu-ld \
--disable-sjlj-exceptions \
--with-dwarf2make && make install
-------------------------------------------------------------------------------
結(jié)論:自己編譯太麻煩了, 現(xiàn)在最好用 MSYS2
MSYS2 支持 pacman 可以自動(dòng)安裝解決依賴關(guān)系庫(kù)
下面鏈接中包含幾乎所有的庫(kù)
http://repo.msys2.org/mingw/i686/
有些遺憾的是有些庫(kù)沒(méi)有靜態(tài)庫(kù), 需要靜態(tài)庫(kù)時(shí)還是自己編譯.
-------------------------------------------------------------------------------
mingw32-gcc-5.4.0-win32-dwarf2-2016-08-21.7z
mingw32-gcc-5.4.0-win32-sjlj-2016-08-21.7z
mingw32-gcc-5.4.0-win32-sjlj-2016-08-21.7z
轉(zhuǎn)載于:https://www.cnblogs.com/nlsoft/p/5782034.html
總結(jié)
以上是生活随笔為你收集整理的gcc-5.4.0 static dwarf2 compile的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: WCF 之 消息契约(MessageCo
- 下一篇: ArcSDE初学者需要弄清楚的几个问题(