summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2021-03-27 10:36:39 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-11-12 14:11:17 +0100
commite89a7ffebed02da9f8aebed17d829edf2d8c0a1c (patch)
treed10061ad7fd42e92bb4697e54bb77155b1793b13
parent8519c18da728c2b439bc68692d826bded0c20912 (diff)
downloadptxdist-e89a7ffebed02da9f8aebed17d829edf2d8c0a1c.tar.gz
ptxdist-e89a7ffebed02da9f8aebed17d829edf2d8c0a1c.tar.xz
wrapper: add option for -fno-semantic-interposition
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--platforms/toolchain_options.in8
-rw-r--r--scripts/wrapper/libwrapper.sh6
2 files changed, 14 insertions, 0 deletions
diff --git a/platforms/toolchain_options.in b/platforms/toolchain_options.in
index 0361bf6e7..9e48526f0 100644
--- a/platforms/toolchain_options.in
+++ b/platforms/toolchain_options.in
@@ -85,6 +85,14 @@ config TARGET_COMPILER_RECORD_SWITCHES
enabled, the final binary will likely be different each time a
package is rebuilt.
+config TARGET_NO_SEMANTIC_INTERPOSITION
+ bool
+ prompt "build with -fno-semantic-interposition"
+ help
+ Compile with -fno-semantic-interposition. This can improve
+ performance because allows for better optimization The downside
+ is that this makes LD_PRELOAD impossible.
+
config TARGET_BUILD_ID
bool
default y
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index 9597fcf77..d124af916 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -252,6 +252,10 @@ cc_add_arch() {
fi
}
+cc_add_optimizations() {
+ add_opt_arg TARGET_NO_SEMANTIC_INTERPOSITION "-fno-semantic-interposition"
+}
+
cpp_add_target_extra() {
cc_check_args ${pkg_cppflags}
add_opt_arg TARGET_COMPILER_RECORD_SWITCHES "-frecord-gcc-switches"
@@ -263,6 +267,7 @@ cpp_add_target_extra() {
cc_add_target_extra() {
cc_check_args ${pkg_cflags}
cpp_add_target_extra
+ cc_add_optimizations
cc_add_debug
cc_add_arch
add_arg ${pkg_cflags}
@@ -272,6 +277,7 @@ cc_add_target_extra() {
cxx_add_target_extra() {
cc_check_args ${pkg_cxxflags}
cpp_add_target_extra
+ cc_add_optimizations
cc_add_debug
cc_add_arch
add_arg ${pkg_cxxflags}