mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 15:04:10 +01:00
configure: Condition options for clang compatibility.
This commit is contained in:
parent
4c95fc94a5
commit
e1841a7159
1 changed files with 23 additions and 6 deletions
29
configure.ac
29
configure.ac
|
@ -522,8 +522,11 @@ AM_COND_IF([DEBUG],
|
|||
[
|
||||
CXXFLAGS+=" -g"
|
||||
CXXFLAGS+=" -ggdb"
|
||||
CXXFLAGS+=" -fvar-tracking"
|
||||
CXXFLAGS+=" -fvar-tracking-assignments"
|
||||
AM_COND_IF([GCC],
|
||||
[
|
||||
CXXFLAGS+=" -fvar-tracking"
|
||||
CXXFLAGS+=" -fvar-tracking-assignments"
|
||||
])
|
||||
], [
|
||||
AM_COND_IF([COMPACT],
|
||||
[
|
||||
|
@ -537,19 +540,33 @@ AM_COND_IF([DEBUG],
|
|||
|
||||
dnl Creates an ELF section in the output which contains a list of
|
||||
dnl the command line arguments used for compilation.
|
||||
CXXFLAGS+=" -frecord-gcc-switches"
|
||||
AM_COND_IF([GCC],
|
||||
[
|
||||
CXXFLAGS+=" -frecord-gcc-switches"
|
||||
])
|
||||
|
||||
AM_COND_IF([CLANG],
|
||||
[
|
||||
CXXFLAGS+=" -grecord-gcc-switches"
|
||||
])
|
||||
|
||||
dnl CXXFLAGS+=" -mmpx"
|
||||
dnl CXXFLAGS+=" -fcheck-pointer-bounds"
|
||||
CXXFLAGS+=" -fchkp-instrument-marked-only"
|
||||
CXXFLAGS+=" -fstack-protector-explicit"
|
||||
AM_COND_IF([GCC],
|
||||
[
|
||||
CXXFLAGS+=" -fchkp-instrument-marked-only"
|
||||
CXXFLAGS+=" -fstack-protector-explicit"
|
||||
])
|
||||
|
||||
dnl -fvisibility-inlines-hidden - for optimization; note the address of inline
|
||||
dnl functions won't be the same between translation units
|
||||
CXXFLAGS+=" -fvisibility-inlines-hidden"
|
||||
|
||||
dnl see gcc(1)
|
||||
CXXFLAGS+=" -fnothrow-opt"
|
||||
AM_COND_IF([GCC],
|
||||
[
|
||||
CXXFLAGS+=" -fnothrow-opt"
|
||||
])
|
||||
|
||||
dnl This disables thread-safety for static variable initialization
|
||||
dnl (specifically local static variables inside functions) which reduces
|
||||
|
|
Loading…
Reference in a new issue