mingw build: allow to pass custom CFLAGS #136

Merged
merged 1 commit into from Jan 9, 2015

Projects

None yet

2 participants

@vszakats
Contributor
vszakats commented Jan 9, 2015

Allow to pass custom CFLAGS options via environment variable CURL_CFLAG_EXTRAS (the name comes from makefile.am where it serves a similar purpose). Default and automatically added options of makefile.m32 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 makefile.m32. This patch makes it unnecessary.

@gknauf
Collaborator
gknauf commented Jan 9, 2015

Hi Viktor,
On 09.01.2015 04:49, Viktor Szakáts wrote:

Allow to pass custom |CFLAGS| options via environment variable
|CURL_CFLAG_EXTRAS| (the name comes from |makefile.am| where it serves a
similar purpose). Default and automatically added options of
|makefile.m32| 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
|makefile.m32|. This patch makes it unnecessary.
your patch seems wrong because you didnt remove the original line ;-)
so with next (original) line CFLAGS is overwritten again and the
CURL_CFLAG_EXTRAS are lost ...
optherwise I'm fine with this patch.

Günter.

@vszakats
Contributor
vszakats commented Jan 9, 2015

Indeed, very sorry, corrected it.

@gknauf
Collaborator
gknauf commented Jan 9, 2015

On 09.01.2015 21:03, Viktor Szakáts wrote:

Indeed, very sorry, corrected it.
great!
Can you please also keep one newline at the end - some Windows editors
dont behave good when you dont have a newline after last line ...
same goes also for #134 ...

Günter.

@vszakats
Contributor
vszakats commented Jan 9, 2015

There is one new-line after the last line, which should be enough to make editors and git happy. Before the edit there were three of them. Are you sure that is necessary?

Before the edit:

0000002360: 41 52 45 53 5F 50 41 54 │ 48 29 20 2D 66 20 4D 61  ARES_PATH) -f Ma
0000002370: 6B 65 66 69 6C 65 2E 6D │ 33 32 **0D 0A 0D 0A 0D 0A**  kefile.m32

After the edit:

0000002380: 2D 66 20 4D 61 6B 65 66 │ 69 6C 65 2E 6D 33 32 **0D  -f Makefile.m32
0000002390: 0A**                      │                          
@gknauf
Collaborator
gknauf commented Jan 9, 2015

On 09.01.2015 21:54, Viktor Szakáts wrote:

There is one new-line after the last line, which should be enough to
make editors and git happy. Before the edit there were three of them.
Are you sure that is necessary?
no. I will now try to merge it with the GitHub interface - lets see if I
manage that, and then we will see afterwards what my editors say; but
I've just looked and you'Re right - I see 3 ...; I was a bit misleaded
from the GitHub diff ...

Günter.

@gknauf gknauf self-assigned this Jan 9, 2015
@gknauf gknauf merged commit 4e58589 into curl:master Jan 9, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@vszakats vszakats deleted the unknown repository branch Jan 9, 2015
@vszakats vszakats added a commit to vszakats/libssh2 that referenced this pull request Mar 11, 2015
@vszakats vszakats mingw build: allow to pass custom CFLAGS
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
0c9fc44
@vszakats vszakats referenced this pull request in libssh2/libssh2 Mar 11, 2015
Closed

mingw build: allow to pass custom CFLAGS #4

@bagder bagder added a commit to libssh2/libssh2 that referenced this pull request Mar 12, 2015
@vszakats @bagder vszakats + bagder mingw build: allow to pass custom CFLAGS
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
8f00a74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment