Files
calc/Makefile.local

98 lines
3.5 KiB
Makefile

#!/usr/bin/env make
#
# Makefile.local - local Makefile variables
#
# This file is included by Makefile after the last Makefile is set and
# before the first make rule. This makes this file suitable to override
# Makefile variables.
#
# To replace a Makefile variable, use := symbols. For example:
#
# CCWERR:= -Werror
#
# You can append to an existing Makefile variable using '+=' symbols.
# For example:
#
# CFLAGS+= -Ofast
####
###################################################################
# NOTE: For this and other commended out examples in this file, #
# you need to remove the leading '#<whitespaces>' to take effect. #
# #
# Comments start with a #-character. #
###################################################################
####
# RHEL Diagnosing memory, thread, and crash issues
#
# For more info see: https://github.com/google/sanitizers/wiki/AddressSanitizer
#
# This comment block was tested under:
#
# RHEL9 gcc version 11.3.1 20221121 (Red Hat 11.3.1-4) (GCC)
#
# with:
#
# libasan-11.3.1-4.3.el9.x86_64 libubsan-11.3.1-4.3.el9.x86_64
#
# NOTE: With the above version, these are NOT supported:
#
# UNSUPPORTED_FSANITIZE:= -fsanitize=nullability-arg -fsanitize=nullability-assign
#
# Uncomment these lines:
#
# DEBUG:= -O0 -g
# FSANITIZE:= -fsanitize=undefined -fsanitize=address -fsanitize=bool -fsanitize=bounds
# FSANITIZE+= -fsanitize=enum -fsanitize=vptr -fsanitize=integer-divide-by-zero
# FSANITIZE+= -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
# FSANITIZE+= -fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute
# FSANITIZE+= -fsanitize=null -fsanitize=shift -fsanitize=signed-integer-overflow
# FSANITIZE+= -fsanitize=unreachable -fsanitize=vla-bound
# CFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
# LDFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1
####
####
# macOS Diagnosing memory, thread, and crash issues
#
# For more info see: https://github.com/google/sanitizers/wiki/AddressSanitizer
#
# This comment block was tested under:
#
# macOS 13.5 with clang version 14.0.3 (clang-1403.0.22.14.1)
#
# For more info for clang to Diagnosing memory, thread, and crash issues early, see:
#
# https://developer.apple.com/documentation/xcode/diagnosing-memory-thread-and-crash-issues-early
#
# NOTE: With the above version, these are NOT supported:
#
# UNSUPPORTED_FSANITIZE:= -fsanitize-nullability-return
#
# Uncomment these lines:
#
# DEBUG:= -O0 -g
# FSANITIZE:= -fsanitize=undefined -fsanitize=address -fsanitize=bool -fsanitize=bounds
# FSANITIZE+= -fsanitize=enum -fsanitize=vptr -fsanitize=integer-divide-by-zero
# FSANITIZE+= -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
# FSANITIZE+= -fsanitize=nonnull-attribute -fsanitize=nullability-arg
# FSANITIZE+= -fsanitize=nullability-assign -fsanitize=returns-nonnull-attribute
# FSANITIZE+= -fsanitize=null -fsanitize=object-size -fsanitize=shift
# FSANITIZE+= -fsanitize=signed-integer-overflow -fsanitize=unreachable -fsanitize=vla-bound
# CFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
# LDFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1
####
####
# To reduce dependency chains under macOS:
#
# This comment block was tested under:
#
# macOS 13.5 with clang version 14.0.3 (clang-1403.0.22.14.1)
#
# LDFLAGS+= '-Wl,-dead_strip_dylibs -Wl,-dead_strip'
####