From 7cfb839be6e386dc068b140fe883c7bc3ac60c80 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 4 Feb 2017 23:19:40 -0500 Subject: Make it possible to disable stack smashing protection. Also reflect anything in ABI flags into pkg-config Libs field. GH #863 --- src/build-data/botan.pc.in | 2 +- src/build-data/cc/clang.txt | 3 ++- src/build-data/cc/gcc.txt | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/build-data') diff --git a/src/build-data/botan.pc.in b/src/build-data/botan.pc.in index 85943ab3f..e19f0efed 100644 --- a/src/build-data/botan.pc.in +++ b/src/build-data/botan.pc.in @@ -7,6 +7,6 @@ Name: Botan Description: Crypto and TLS for C++11 Version: %{version} -Libs: -L${libdir} -lbotan-%{version_major} +Libs: -L${libdir} -lbotan-%{version_major} %{cxx_abi_flags} Libs.private: %{link_to} Cflags: -I${includedir} diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt index 15538307c..2e6070390 100644 --- a/src/build-data/cc/clang.txt +++ b/src/build-data/cc/clang.txt @@ -8,7 +8,7 @@ add_lib_dir_option -L add_lib_option -l add_framework_option "-framework " -lang_flags "-std=c++11 -D_REENTRANT -fstack-protector" +lang_flags "-std=c++11 -D_REENTRANT" warning_flags "-Wall -Wextra -Wpedantic -Wshadow -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wunreachable-code" maintainer_warning_flags "-Qunused-arguments -Werror -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unreachable-code -Wno-error=deprecated-declarations" @@ -22,6 +22,7 @@ sanitizer_flags "-fsanitize=address,undefined" shared_flags "-fPIC" coverage_flags "--coverage" +stack_protector_flags "-fstack-protector" visibility_build_flags "-fvisibility=hidden" visibility_attribute '__attribute__((visibility("default")))' diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index ce6cb8364..07c1d7d0a 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -21,6 +21,7 @@ size_optimization_flags "-Os" shared_flags "-fPIC" coverage_flags "--coverage" +stack_protector_flags "-fstack-protector" # GCC 4.8 sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address" @@ -123,7 +124,7 @@ all_x86_64 -> "-momit-leaf-frame-pointer" # Flags set here are included at compile and link time -all -> "-pthread -fstack-protector" +all -> "-pthread" cilkplus -> "-fcilkplus" openmp -> "-fopenmp" -- cgit v1.2.3