linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marcin Mirosław" <marcin@mejor.pl>
To: linux-bcache@vger.kernel.org
Cc: "Marcin Mirosław" <marcin@mejor.pl>
Subject: [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer.
Date: Tue, 13 Sep 2016 12:55:41 +0200	[thread overview]
Message-ID: <1473764144-18993-1-git-send-email-marcin@mejor.pl> (raw)

Currently is adding "-static" to linker flags. This needs compiling a couple of dependent libraries to get static
version of it. It is a little problematic, at least on Gentoo. Also static binary isn't needed for typical usage, if
somebody need it then it's easy to add "-static" to env variable LDFLAGS and get static binary.
Similar to CFLAGS, it's easier to add "-g" to CFLAGS than negating it by using "-g0".

Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 9f2773e..e9ca92d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 
 PREFIX=/usr
 INSTALL=install
-CFLAGS+=-std=gnu99 -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -I.
-LDFLAGS+=-static
+CFLAGS:=-std=gnu99 -O2 -Wall -D_FILE_OFFSET_BITS=64 -I. $(CFLAGS)
+LDFLAGS+=
 
 PKGCONFIG_LIBS="blkid uuid libnih"
 CFLAGS+=`pkg-config --cflags	${PKGCONFIG_LIBS}`
-- 
2.7.3

             reply	other threads:[~2016-09-13 10:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 10:55 Marcin Mirosław [this message]
2016-09-13 10:55 ` [PATCH v2 2/4] No need to spawn subshell for every source file Marcin Mirosław
2016-09-13 10:55 ` [PATCH v2 3/4] Make --help and man more consistent Marcin Mirosław
2016-09-13 10:55 ` [PATCH v2 4/4] Remove unimplemented options from manpage Marcin Mirosław
2016-09-13 15:33 ` [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Coly Li
2016-09-14  8:39   ` [PATCH v2 1/4][Resend] " Marcin Mirosław

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473764144-18993-1-git-send-email-marcin@mejor.pl \
    --to=marcin@mejor.pl \
    --cc=linux-bcache@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).