Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
f44ac96a
Commit
f44ac96a
authored
Apr 10, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around apparent GCC bug with -O2 -fno-exceptions.
parent
11147a45
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
super-test.sh
super-test.sh
+9
-2
No files found.
super-test.sh
View file @
f44ac96a
...
...
@@ -227,8 +227,10 @@ echo "========================================================================="
# Apple now aliases gcc to clang, so probe to find out what compiler we're really using.
if
(
${
CXX
:-
g
++
}
-dM
-E
-x
c++ /dev/null 2>&1 |
grep
-q
'__clang__'
)
;
then
IS_CLANG
=
yes
DISABLE_OPTIMIZATION_IF_GCC
=
else
IS_CLANG
=
no
DISABLE_OPTIMIZATION_IF_GCC
=
-O0
fi
if
[
$IS_CLANG
=
yes
]
;
then
...
...
@@ -369,13 +371,18 @@ echo "========================================================================="
echo
"Testing with -fno-rtti and -fno-exceptions"
echo
"========================================================================="
# GCC miscompiles capnpc-c++ when -fno-exceptions and -O2 are specified together. The
# miscompilation happens in one specific inlined call site of Array::dispose(), but this method
# is inlined in hundreds of other places without issue, so I have no idea how to narrow down the
# bug. Clang works fine. So, for now, we disable optimizations on GCC for -fno-exceptions tests.
doit ./configure
--disable-shared
CXXFLAGS
=
"
$CXXFLAGS
-fno-rtti"
doit make
-j6
check
doit make distclean
doit ./configure
--disable-shared
CXXFLAGS
=
"
$CXXFLAGS
-fno-exceptions"
doit ./configure
--disable-shared
CXXFLAGS
=
"
$CXXFLAGS
-fno-exceptions
$DISABLE_OPTIMIZATION_IF_GCC
"
doit make
-j6
check
doit make distclean
doit ./configure
--disable-shared
CXXFLAGS
=
"
$CXXFLAGS
-fno-rtti -fno-exceptions"
doit ./configure
--disable-shared
CXXFLAGS
=
"
$CXXFLAGS
-fno-rtti -fno-exceptions
$DISABLE_OPTIMIZATION_IF_GCC
"
doit make
-j6
check
# Valgrind is currently "experimental and mostly broken" on OSX and fails to run the full test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment