mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 19:28:52 +02: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+=" -g"
|
||||||
CXXFLAGS+=" -ggdb"
|
CXXFLAGS+=" -ggdb"
|
||||||
CXXFLAGS+=" -fvar-tracking"
|
AM_COND_IF([GCC],
|
||||||
CXXFLAGS+=" -fvar-tracking-assignments"
|
[
|
||||||
|
CXXFLAGS+=" -fvar-tracking"
|
||||||
|
CXXFLAGS+=" -fvar-tracking-assignments"
|
||||||
|
])
|
||||||
], [
|
], [
|
||||||
AM_COND_IF([COMPACT],
|
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 Creates an ELF section in the output which contains a list of
|
||||||
dnl the command line arguments used for compilation.
|
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+=" -mmpx"
|
||||||
dnl CXXFLAGS+=" -fcheck-pointer-bounds"
|
dnl CXXFLAGS+=" -fcheck-pointer-bounds"
|
||||||
CXXFLAGS+=" -fchkp-instrument-marked-only"
|
AM_COND_IF([GCC],
|
||||||
CXXFLAGS+=" -fstack-protector-explicit"
|
[
|
||||||
|
CXXFLAGS+=" -fchkp-instrument-marked-only"
|
||||||
|
CXXFLAGS+=" -fstack-protector-explicit"
|
||||||
|
])
|
||||||
|
|
||||||
dnl -fvisibility-inlines-hidden - for optimization; note the address of inline
|
dnl -fvisibility-inlines-hidden - for optimization; note the address of inline
|
||||||
dnl functions won't be the same between translation units
|
dnl functions won't be the same between translation units
|
||||||
CXXFLAGS+=" -fvisibility-inlines-hidden"
|
CXXFLAGS+=" -fvisibility-inlines-hidden"
|
||||||
|
|
||||||
dnl see gcc(1)
|
dnl see gcc(1)
|
||||||
CXXFLAGS+=" -fnothrow-opt"
|
AM_COND_IF([GCC],
|
||||||
|
[
|
||||||
|
CXXFLAGS+=" -fnothrow-opt"
|
||||||
|
])
|
||||||
|
|
||||||
dnl This disables thread-safety for static variable initialization
|
dnl This disables thread-safety for static variable initialization
|
||||||
dnl (specifically local static variables inside functions) which reduces
|
dnl (specifically local static variables inside functions) which reduces
|
||||||
|
|
Loading…
Reference in a new issue