Skip to content

Commit

Permalink
Drop custom CFLAGS for libnuma itself
Browse files Browse the repository at this point in the history
Since the LTO build has been fixed with the SYMVER commit (92d4e7d),
we can now drop the custom CFLAGS for building libnuma sources.

Tested that enabling LTO results in a working build. Tested with:

  $ ./configure \
        CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto' \
        LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto'

(Note the extra `-flto` at the end of both CFLAGS and LDFLAGS.)

Also compared the symbols in `objdump -T .libs/libnuma.so.1.0.0` of an LTO
build versus a non-LTO build, to confirm that all the expected symbols are
still exported under the expected names.
  • Loading branch information
filbranden committed Sep 18, 2020
1 parent d73332a commit 5eada1c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ migspeed_LDADD = libnuma.la -lrt
memhog_SOURCES = memhog.c util.c
memhog_LDADD = libnuma.la

libnuma_la_CFLAGS = -g -O2 -fno-lto
libnuma_la_SOURCES = libnuma.c syscall.c distance.c affinity.c affinity.h sysfs.c sysfs.h rtnetlink.c rtnetlink.h versions.ldscript
libnuma_la_LDFLAGS = -version-info 1:0:0 -Wl,--version-script,$(srcdir)/versions.ldscript -Wl,-init,numa_init -Wl,-fini,numa_fini

Expand Down

0 comments on commit 5eada1c

Please sign in to comment.