Skip to content

Commit

Permalink
Remove unneeded compiler flags. Increase size for -Wlarger-than to 2M…
Browse files Browse the repository at this point in the history
…. Add flags for Debug builds and edit flags for Asan builds in documentation.
  • Loading branch information
atoppi committed May 21, 2024
1 parent fdd90a5 commit f727ba8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 1 addition & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ CFLAGS="$CFLAGS \
-fPIC \
-fstack-protector-all \
-fstrict-aliasing \
-ggdb3 \
-pthread \
-Wall \
-Warray-bounds \
Expand All @@ -30,7 +29,7 @@ CFLAGS="$CFLAGS \
-Wformat-security \
-Wformat=2 \
-Winit-self \
-Wlarger-than=65537 \
-Wlarger-than=2097152 \
-Wmissing-declarations \
-Wmissing-format-attribute \
-Wmissing-include-dirs \
Expand All @@ -53,7 +52,6 @@ case "$CC" in
*clang*)
# Specific clang flags
CFLAGS="$CFLAGS \
-Wno-cast-align \
-Wno-initializer-overrides \
-Wno-missing-noreturn"
;;
Expand All @@ -65,7 +63,6 @@ cc*)
*)
# Specific gcc flags
CFLAGS="$CFLAGS \
-Wcast-align \
-Wno-override-init \
-Wunsafe-loop-optimizations \
-Wunused-but-set-variable"
Expand Down
11 changes: 10 additions & 1 deletion src/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -3111,6 +3111,15 @@ sudo supervisorctl update
* bugs and the like, as it can provide information about the values of
* variables when they were used and the application crashed.
*
* First of all make sure that debugging symbols are enabled by reconfiguring Janus like this:
*
\verbatim
CFLAGS="-Og -g3 -ggdb3 -fno-omit-frame-pointer" ./configure --prefix=/opt/janus
\endverbatim
*
* Once done configuring, do a \c make \c clean (to make sure
* everything is recompiled from scratch) and then a \c make and \c make \c install.
*
* When Janus crashes, you should get a core dump file somewhere. This is
* a recorded state of the application memory at the time of crashing, and
* so a backtrace of what lead to an issue can help. You can open such
Expand Down Expand Up @@ -3145,7 +3154,7 @@ gdb bt
* Once you've installed libasan, reconfigure Janus like this:
*
\verbatim
CFLAGS="-O1 -g3 -ggdb3 -fno-omit-frame-pointer -fsanitize=address -fno-sanitize-recover=all -fsanitize-address-use-after-scope" LDFLAGS="-fsanitize=address" ./configure --prefix=/opt/janus
CFLAGS="-O0 -g3 -ggdb3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize-address-use-after-scope -fno-sanitize-recover=all" LDFLAGS="-fsanitize=address" ./configure --prefix=/opt/janus
\endverbatim
*
* Of course you're free to add whatever additional configuration parameter
Expand Down

0 comments on commit f727ba8

Please sign in to comment.