[Date Prev][Date Next] [Chronological] [Thread] [Top]

Unable to build MinGW OpenLDAP in Cygwin: gcc no longer supports the "-mno-cygwin" flag?

Hi, OpenLDAP developers,


I am trying to build OpenLDAP client libraries on Windows by following the instructions listed on the OpenLDAP.org Faq-O-Matic.


Building MinGW OpenLDAP in a Cygwin Environment




In the MinGW Support in Cygwin section




To create the wrapper script, start the Cygwin bash shell, and execute the following:

        $ cd /usr/bin

        $ cat > mgcc


        gcc -mno-cygwin $*



The problem is that it seems gcc no longer supports the “-mno-cygwin” flag:


$ gcc -mno-cygwin

gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.




I am currently using Cygwin version …


$ uname -a

CYGWIN_NT-6.1-WOW64 hostname 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin


And my gcc version is …


$ gcc -v

Using built-in specs.

Target: i686-pc-cygwin

Configured with: /gnu/gcc/releases/respins/4.3.4-4/gcc4-4.3.4-4/src/gcc-4.3.4/configure --srcdir=/gnu/gcc/releases/respins/4.3.4-4/gcc4-4.3.4-4/src/gcc-4.3.4 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man -C --datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr --with-mpfr=/usr --enable-bootstrap --enable-version-specific-runtime-libs --with-slibdir=/usr/bin --libexecdir=/usr/lib --enable-static --enable-shared --enable-shared-libgcc --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2 --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --disable-symvers --enable-libjava --program-suffix=-4 --enable-libgomp --enable-libssp --enable-libada --enable-threads=posix --with-arch=i686 --with-tune=generic --enable-libgcj-sublibs CC=gcc-4 CXX=g++-4 CC_FOR_TARGET=gcc-4 CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake GNATBIND_FOR_TARGET=gnatbind --with-ecj-jar=/usr/share/java/ecj.jar

Thread model: posix

gcc version 4.3.4 20090804 (release) 1 (GCC)


Any help would be much appreciated.




Daisy Wu