`
chenqi210
  • 浏览: 76885 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

compile script for mingw64

 
阅读更多
#! /bin/sh

#cd /d/opensource
#wget mingw-w64
#wget gcc
#wget binutils

#make -p /d/opensource
#cd /d/opensource/
#cvs -z9 -d:pserver:anoncvs@sourceware.org:/cvs/src co binutils
#svn co svn://gcc.gnu.org/svn/gcc/trunk gcc-trunk
#svn co https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk mingw-w64-trunk

mkdir /d/portable/sysroot
mkdir -p /d/build/binutils-build
mkdir -p /d/build/mingw-w64-headers-build
mkdir -p /d/build/mingw-w64-crt-build
mkdir -p /d/build/gcc-build

cd /d/build/binutils-build
../../opensource/binutils-src/configure    \
    --target=x86_64-w64-mingw32 \
    --enable-targets=x86_64-w64-mingw32,i686-w64-mingw32 \
    --with-sysroot=/d/portable/sysroot --prefix=/d/portable/sysroot
make
make install
export PATH="$PATH:/d/portable/sysroot/bin"

cd ../mingw-w64-headers-build
../../opensource/mingw-w64-trunk/mingw-w64-headers/configure \
    --build=i686-pc-mingw32 --host=x86_64-w64-mingw32 \
    --prefix=/d/portable/sysroot
make install
#copy include
cp -a /d/portable/sysroot/include             /d/portable/sysroot/x86_64-w64-mingw32
mkdir -p /d/portable/sysroot/x86_64-w64-mingw32/lib
cp -a /d/portable/sysroot/x86_64-w64-mingw32/lib    /d/portable/sysroot/x86_64-w64-mingw32/lib64
cp -a /d/portable/sysroot/x86_64-w64-mingw32        /d/portable/sysroot/mingw

cd ../gcc-build
../../opensource/gcc-4.7.2-src/configure \
    --target=x86_64-w64-mingw32 --enable-targets=all \
    --with-sysroot=/d/portable/sysroot --prefix=/d/portable/sysroot
make all-gcc
make install-gcc

cd ../mingw-w64-crt-build
../../opensource/mingw-w64-trunk/mingw-w64-crt/configure \
    --host=x86_64-w64-mingw32 --enable-lib32 \
    --with-sysroot=/d/portable/sysroot --prefix=/d/portable/sysroot
make
make install

cp -a /d/portable/sysroot/lib                /d/portable/sysroot/x86_64-w64-mingw32
cp -a /d/portable/sysroot/lib32                /d/portable/sysroot/x86_64-w64-mingw32
cp -a /d/portable/sysroot/x86_64-w64-mingw32/lib/*    /d/portable/sysroot/x86_64-w64-mingw32/lib64
cp -a /d/portable/sysroot/x86_64-w64-mingw32/*        /d/portable/sysroot/mingw

cd ../gcc-build
make
make install
 
0
2
分享到:
评论

相关推荐

    MATLAB Support for MinGW-w64 C/C++ Compiler.rar

    资源是笔者在MATLAB里面安装的MinGW-w64 C/C++编译器安装包,主要用于作为博文https://blog.csdn.net/jiqiren_dasheng/article/details/103759720的资源附件。(声明:上传时积分设置的1,如果数值后续变了,就是...

    Compile ARPACK to x64dll_lib on Windows 7 for VS2005 by Using MinGW64

    在Window7操作系统上使用MinGW64/MSYS工具将Fortran77源码的ARPACK库编译为X64环境下Microsoft Visual Studio 20xx平台下可以使用的dll&lib;库,并给出了调用特征值和特征向量求解的C++/Win32工程,专门为一些希望在...

    MinGW_w64 CC++安装包及说明.rar

    ERROR: Unable to compile MEX function: "未找到支持的编译器或 SDK。您可以安装免费提供的 MinGW-w64 C/C++ 编译器的解决方案 含有安装包,以及对应的安装说明,系统环境说明, 按照说明操作,即可保证正常运行

    gdb-7.6.1-1-mingw32-bin.tar.lzma

    mingw32下载gdb失败可离线安装,GDB是GNU开源组织发布的一个强大的UNIX(不仅限于UNIX)下的C/C++程序调试工具。它搭配MINGW使用,可以使用户完成整个C/C+程序的编译和运行工作。有了GDB,用户可以在调试本地的C程序时...

    minGW opengl Texture

    MinGW compile opengl for Texture

    QT5.15.3 mingw x64编译版

    使用mingw x64环境,g++ v11.2.0 compile 移除了wmf plugin, d3d12, qdoc, qt3d, egl, qtwebengine, qtwebchannel, qtdatavis3d, qtlocation, qtlottie, qtpurchasing 公司产品在用,来自单位一位大神的分享。 ...

    How to compile Amalgamation for android

    How to compile Amalgamation for android

    VC2005 X64 Compile 設定

    VC2005 X64 Compile 設定

    MinGW3.4.2

    MinGW offline Installation use to compile QT programs for Windows

    mingw-win32-gcc(4.8.2)-release

    Qt开发必备工具,官网下载速度极慢,这里直接分享一个解压直接好用的,版本较高的mingw-win32版本,支持qt-4.8.6编译等,亲测OK的。

    iperf3 static compile for arm-linux

    iperf3 static compile for arm-linux

    compile_compile

    compile

    Cross compile OpenSSH for mips

    因为本人的嵌入式系统中安装DropBear来提供SSH服务,但DropBear没有sftp服务。所以就用OpenSSH编译出了一个sftp-server,把它单独放到系统里是可以使用的。前提是系统中有ssh服务。

    OpenCV-MinGW-Build-OpenCV-3.3.1.zip

    * Windows-10-64bit * MinGW-5.3.0-32bit * CMake-3.9.2 ## How to compile OpenCV * [wiki.qt . How to setup Qt and openCV on Windows](https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows) * [blog....

    mingwC/C++编译器

    wxgcc是一个开源的C/C++编辑软件,该软件轻型小巧,支持代码高亮,支持即时输入即时运行;是对著名的GCC开源编译工具的简单图形前端实现,通过wxpython语言开发而成。支持Windows XP,Windows 7 和 Linux 等多个平台...

    compile DCMTK for Windows with CMake

    windows 下编译DCMTK,官方教程

    amr for arm64

    Compile Opencore amr 0.1.3 on iOS7

    vlc compile for android

    This page is an introduction to the compilation of VLC for Android on Linux

    Design Compile使用说明

    Design Compile是synopsys的综合软件,它的功能是把RTL级的代码转化为门级网表。资源适合DC的 初学者

    Compile-time Dependency Injection for Go.zip

    Compile-time Dependency Injection for Go

Global site tag (gtag.js) - Google Analytics