delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/01/10:00:17

X-Spam-Check-By: sourceware.org
Date: Fri, 1 Dec 2006 09:59:54 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
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> <Pine DOT GSO DOT 4 DOT 63 DOT 0611302348180 DOT 17676 AT access1 DOT cims DOT nyu DOT edu> <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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019