1 |
commit: aaaea44d224016bccfd008d0b904961f788d8189 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 2 20:57:10 2011 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 5 04:26:23 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=aaaea44d |
7 |
|
8 |
use make conditional for -cstd flag |
9 |
|
10 |
cc.mk was using ashell call to determine the value of the cstd variable. |
11 |
This reworks that code so it uses a make conditional. |
12 |
|
13 |
--- |
14 |
mk/cc.mk | 6 +++--- |
15 |
1 files changed, 3 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/mk/cc.mk b/mk/cc.mk |
18 |
index 74a816e..06556f0 100644 |
19 |
--- a/mk/cc.mk |
20 |
+++ b/mk/cc.mk |
21 |
@@ -5,9 +5,9 @@ CFLAGS?= -O2 |
22 |
|
23 |
# Default to using the C99 standard |
24 |
CSTD?= c99 |
25 |
-_CSTD_SH= if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi |
26 |
-_CSTD:= $(shell ${_CSTD_SH}) |
27 |
-CFLAGS+= ${_CSTD} |
28 |
+ifneq (${CSTD},) |
29 |
+CFLAGS+= -std=${CSTD} |
30 |
+endif |
31 |
|
32 |
# Try and use some good cc flags if we're building from git |
33 |
# We don't use -pedantic as it will warn about our perfectly valid |