This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin -mno-cygwin AC_CHECK_SIZEOF


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]