changeset 55cddee143f0 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=55cddee143f0
description:
ext: Fix fputils compiler flags to ensure ISO C99
The fp code relies on C99, and depending on gcc version, the default
is to use c89. This patch adds -std=c99 when using gcc to ensure the
code is compiled in ISO C99 mode.
diffstat:
ext/fputils/SConscript | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r 13c5fea24be1 -r 55cddee143f0 ext/fputils/SConscript
--- a/ext/fputils/SConscript Wed Oct 02 11:03:38 2013 +0200
+++ b/ext/fputils/SConscript Wed Oct 02 06:08:43 2013 -0400
@@ -30,11 +30,19 @@
Import('main')
-main.Library('fputils', [
- main.SharedObject('fp80.c'),
+main.Prepend(CPPPATH=Dir('./include'))
+
+fpenv = main.Clone()
+
+# By default gcc uses c89 and clang uses c99. For fputils to compile
+# we need to use c99.
+if fpenv['GCC']:
+ fpenv.Append(CCFLAGS=['-std=c99'])
+
+fpenv.Library('fputils', [
+ fpenv.SharedObject('fp80.c'),
])
-main.Prepend(CPPPATH=Dir('./include'))
main.Append(LIBS=['fputils'])
main.Prepend(LIBPATH=[Dir('.')])
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev