Skip to content

Commit

Permalink
mingw build: allow to pass custom CFLAGS
Browse files Browse the repository at this point in the history
Allow to pass custom `CFLAGS` options via environment variable
`LIBSSH2_CFLAG_EXTRAS`. Default and automatically added options of
`GNUmakefile` have preference over custom ones. This addition is useful
for passing f.e. custom CPU tuning or LTO optimization (`-flto
-ffat-lto-objects`) options. The only current way to do this is to edit
`GNUmakefile`. This patch makes it unnecessary.

This is a mirror of similar libcurl patch:
curl/curl#136
  • Loading branch information
vszakats authored and bagder committed Mar 12, 2015
1 parent fe3e230 commit 8f00a74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win32/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endif
-include $(OBJDIR)/version.inc

# Global flags for all compilers
CFLAGS = $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H
CFLAGS = $(LIBSSH2_CFLAG_EXTRAS) $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H

ifeq ($(CC),mwcc)
LD = mwld
Expand Down

0 comments on commit 8f00a74

Please sign in to comment.