Thread (11 messages) flat view 11 messages, 4 authors, 2016-06-15

Re: [PATCH 4/4] Makefile: Don't pass $(ALL_CFLAGS) to the linker

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:00

Hi Ramsay,

Ramsay Jones wrote:
    LINK : warning LNK4044: unrecognized option '/Zi'; ignored

In order to suppress the warning, we refrain from passing the
$(ALL_CFLAGS) macro to the linker.

Note that, should it be necessary in the future, an option
intended for both the (front-end) compiler and the linker can
be included in both CFLAGS and LDFLAGS.
I think traditionally CPPFLAGS is meant to be used for the purpose
you are describing (see [1] for example).

I realize that the Makefile does not currently use the terms this way:
making it consistent would require

 . s/BASIC_CFLAGS/BASIC_CPPFLAGS/, except that the

	BASIC_CFLAGS += -Kthread

   settings should probably stay as-is

 . Windows BASIC_CFLAGS would probably need to be split:

	BASIC_CFLAGS = -nologo
	BASIC_CPPFLAGS = -I. -I../zlib ... -DWIN32 ...

 . s/COMPAT_CFLAGS/COMPAT_CPPFLAGS

What do you think?
Jonathan

[1] http://www.gnu.org/software/autoconf/manual/html_node/Preset-Output-Variables.html#index-CFLAGS-80
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help