chiark / gitweb /
build-sys: prevent library underlinking
authorEvangelos Foutras <evangelos@foutrelis.com>
Fri, 19 Apr 2013 21:17:08 +0000 (00:17 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Apr 2013 22:15:45 +0000 (18:15 -0400)
Underlinking can cause subtle bugs like the recent issue with
libnss_myhostname (which was fixed in commit 1e335af7).

configure.ac

index 517378394841325ab367ae371e12e099bc7fcd79..ce02ff6f807f6507df1e71d8d7443344757bb9bc 100644 (file)
@@ -144,6 +144,7 @@ AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
 
 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--as-needed \
+        -Wl,--no-undefined \
         -Wl,--gc-sections \
         -Wl,-z,relro \
         -Wl,-z,now])