diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-10-24 21:38:32 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-10-24 21:38:32 +0300 |
commit | 4ccae4f8c6e9724c7b5a891aecfe37475549ee6a (patch) | |
tree | ec66a01ed0517f3c2b245c6e6f57a9b2d1983b88 /src/Makefile.am | |
parent | 4aa6cddca445b71a97fc200cf4437233bde91a46 (diff) | |
download | sciteco-4ccae4f8c6e9724c7b5a891aecfe37475549ee6a.tar.gz |
removed -rdynamic linker flag: should speed up release/nightly builds and decrease the binary size significantly
* -rdynamic was added to make sure that malloc replacement functions were exported and visible to shared libraries.
It was more or less currently only used on Linux and Haiku as Win32 and Mac OS do not override malloc.
* The option however exported all symbols which would prevent them to be removed at link-time.
Other optimizations could also be affected, perhaps resulting in less inlining.
* On Haiku, -rdynamic is not supported and cause build failures.
* It has been tested (nm -D ./sciteco | grep ' T ') that malloc() and friends are exported even when linking with -O3.
Even the __attribute__((used)) has been shown to be superfluous, but we keep it anyway just to be sure.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 76c5843..ab6e35f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,12 +16,6 @@ AM_CFLAGS = -std=gnu11 -Wall -Wno-initializer-overrides -Wno-unused-value AM_CPPFLAGS += -I$(top_srcdir)/contrib/rb3ptr AM_LDFLAGS = -if REPLACE_MALLOC -# NOTE: This may be necessary to ensure that malloc() overriding -# works. It may prevent elimination of unused functions, though. -AM_LDFLAGS += -rdynamic -endif - if STATIC_EXECUTABLES # AM_LDFLAGS are libtool flags, NOT compiler/linker flags AM_LDFLAGS += -all-static |