[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some questions about MAKE_HOST and LDFLAGS

From: Earnie Boyd
Subject: Re: Some questions about MAKE_HOST and LDFLAGS
Date: Sat, 2 Jul 2005 12:40:40 +0000

On 7:30:04 am 2005-07-02 Jerker_Bäck  <address@hidden> wrote:
> There's a string constant in config.h named MAKE_HOST
> #define MAKE_HOST "Windows32" or "i686-pc-cygwin" ...
> In the make code this is used only in version string output.
> Does it matter what this string says?
> Is it extracted by some tool (ie autoconfig) and used somehow?
> What is the proper way to force inclusion of a library?
> autoconfig and configure often test the compiler by compile a small
> program. This program is linked to libc.lib. However, this is not
> enough for later versions of the Microsoft C runtime library. You
> need at least one more linked library (ie BufferOverflowU.lib) =>
> linker failure.

I know Eli indicated LDFLAGS was correct.  It is for specifying switch to
the linker but LIBS should be used to specify the libraries used to resolve

> I stated this in my cygwin startup script:
> set cc=cl
> set cxx=cl
> set ld=link
> set as=ml
> set CFLAGS = -nologo -MD -Zi -Oxt -Oi -Oy -G6 -GF -EHsc
> set LDFLAGS=bufferoverflowu.lib

I would have (for gcc and binutils)
set LDFLAGS=-L/path/to/lib/directory
set LIBS=-lbufferoverflowu

> It works, but sometimes it looks strange since LDFLAGS seems to be
> used as a switch to the compiler. I want it to be used only by the
> linker. How to do this?

I'm not sure how you modify a Cygwin generated Makefile to specify the MS
versions of the compiler.

CC=cl CXX=cl LD=link AS=ml CFLAGS="-nologo -MD..." ./configure

This may help it is untested.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]