Skip to content

Commit 5eada1c

Browse files
committed
Drop custom CFLAGS for libnuma itself
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.
1 parent d73332a commit 5eada1c

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ migspeed_LDADD = libnuma.la -lrt
3939
memhog_SOURCES = memhog.c util.c
4040
memhog_LDADD = libnuma.la
4141

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

0 commit comments

Comments
 (0)