New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw build: allow to pass custom CFLAGS #136

Merged
merged 1 commit into from Jan 9, 2015

Conversation

Projects
None yet
2 participants
@vszakats
Member

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

vszakats commented Jan 9, 2015

Indeed, very sorry, corrected it.

@gknauf

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

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

This comment has been minimized.

Contributor

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 added a commit that referenced this pull request Jan 9, 2015

Merge pull request #136 from vszakats/mingw-allow-custom-cflags
mingw build: allow to pass custom CFLAGS

@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 vszakats:mingw-allow-custom-cflags branch Jan 9, 2015

bagder added a commit to libssh2/libssh2 that referenced this pull request Mar 12, 2015

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment