X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <30467813.post@talk.nabble.com>
References: <30467239.post@talk.nabble.com>	<AANLkTi==cVmy4Z=Ya26Et=xVNE4NRDr9ouEHXcBuE24x@mail.gmail.com>	<30467813.post@talk.nabble.com>
Date: Wed, 15 Dec 2010 16:04:57 -0500
Message-ID: <AANLkTi=uDYKEfWTY+C2pg7=Boy8tmosi+JmBfyq=nSRJ@mail.gmail.com>
Subject: Re: mingw-targeted cross-compiler question
From: NightStrike <nightstrike@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Dec 15, 2010 at 3:50 PM, gviewer <marlonmin@gmail.com> wrote:
>
> My cygwin may already install that package, then how to modify the flag in
> Makefile to compile.

That depends on the makefile.  Usually, there's a user-settable
variable called CFLAGS that you can use to customize things.  But
basically, with the cross compiler, you call a canonically named
executable instead of the normal one.  So for instance, to compile for
64-bit windows, instead of:

gcc -mno-cygwin  file.c

you would use:

x86_64-w64-mingw32-gcc  file.c

Make sense?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

