X-Spam-Check-By: sourceware.org Date: Fri, 1 Dec 2006 09:59:54 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cygwin -mno-cygwin AC_CHECK_SIZEOF Message-ID: <20061201145954.GA29063@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20061201023212 DOT GH19404 AT cox DOT net> <456FA8DD DOT 3030409 AT byu DOT net> <20061201135735 DOT GM19404 AT cox DOT net> <457036CE DOT 4060004 AT byu DOT net> <20061201142246 DOT GO19404 AT cox DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061201142246.GO19404@cox.net> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, Dec 01, 2006 at 09:22:46AM -0500, Bob Rossi wrote: >On Fri, Dec 01, 2006 at 07:06:06AM -0700, Eric Blake wrote: >> According to Bob Rossi on 12/1/2006 6:57 AM: >> > CPPFLAGS="-mno-cygwin" CFLAGS="-mno-cygwin -O0" >> > ./configure --build=mingw32 --enable-experimental-libtool >> >> EVIL. --build is for the platform you are BUILDING on (ie. cygwin), NOT >> the platform you are compiling for (ie. using -mno-cygwin says you are >> cross-compiling for mingw). By lying to configure, you are asking for >> problems. *Don't do that.* Also, setting environment variables prior to >> ./configure is deprecated, because rerunning ./config.status won't >> remember that you set those variables. And since -mno-cygwin is changing >> from a regular to a cross-compiler, you really should be setting it in CC >> rather than CFLAGS, so that the change happens everywhere. >> >> So, if you INSIST on using the cygwin environment to cross-compile mingw >> binaries, you should use: >> >> ./configure --build=i686-pc-cygwin --host=i686-pc-mingw32 \ >> CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' > >Well, if I do that, I get this: > > checking for MAP_ANON in sys/mman.h... no > checking for /dev/zero... configure: error: cannot check for file > existence when cross compiling > >This comes from the > AC_CHECK_FILE(/dev/zero) >call in configure.in. > >I think this might be an apr m4 macro problem. That's why I was lying >to configure. Is there standard conventions for getting around this >problem? I usually just set the appropriate "cache" variable ahead of time: ac_cv_dev_zero=yes ./configure (or whatever the name of the variable actually is) cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/