diff options
author | Prashanth Pai <ppai@redhat.com> | 2018-05-10 18:25:56 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-05-18 04:22:42 +0000 |
commit | 89e1a4e5720509c096ff6860c1a8c483e0019278 (patch) | |
tree | 88f1fabf37eff57db85c23822f305f4f16c4e280 /xlators/features | |
parent | c2cf3f686f3ea0efd936d2eafc404fc9d2e0acc7 (diff) |
build: Disallow unresolved symbol references
In the past, it was often[1] forgotten for xlators to be linked against
the symbols they refer to. This often caused glusterd2 to fail while
loading xlator's shared object (.so) file.
This change adds "--no-undefined" as a linker flag which causes the
linker to treat unresolved symbol references as an error and hence fail
linking.
[1]:
https://review.gluster.org/#/c/19912/
https://review.gluster.org/#/c/19664/
https://review.gluster.org/#/c/19056/
https://review.gluster.org/#/c/17659/
https://bugzilla.redhat.com/show_bug.cgi?id=1532238
Bonus:
Added cloudsync and utime xlator's generated source files to .gitignore
Updates: bz#1193929
Change-Id: I9604a4a87b7313a5fa43bda5fdb37dfa7ef8facd
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/changelog/lib/src/Makefile.am | 5 | ||||
-rw-r--r-- | xlators/features/glupy/src/Makefile.am | 6 | ||||
-rw-r--r-- | xlators/features/utime/src/Makefile.am | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/xlators/features/changelog/lib/src/Makefile.am b/xlators/features/changelog/lib/src/Makefile.am index 92ee26827da..6baafd6cf27 100644 --- a/xlators/features/changelog/lib/src/Makefile.am +++ b/xlators/features/changelog/lib/src/Makefile.am @@ -13,8 +13,9 @@ libgfchangelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la -libgfchangelog_la_LDFLAGS = $(GF_LDFLAGS) -version-info \ - $(LIBGFCHANGELOG_LT_VERSION) +libgfchangelog_la_LDFLAGS = $(GF_LDFLAGS) \ + -version-info $(LIBGFCHANGELOG_LT_VERSION) \ + $(GF_NO_UNDEFINED) libgfchangelogdir = $(includedir)/glusterfs/gfchangelog lib_LTLIBRARIES = libgfchangelog.la diff --git a/xlators/features/glupy/src/Makefile.am b/xlators/features/glupy/src/Makefile.am index f1802c3545e..1fadbe3e68d 100644 --- a/xlators/features/glupy/src/Makefile.am +++ b/xlators/features/glupy/src/Makefile.am @@ -15,9 +15,9 @@ AM_CFLAGS = $(PYTHONDEV_CPPFLAGS) -Wall -fno-strict-aliasing \ $(GF_CFLAGS) # Flags to build glupy.so with -glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version \ - -nostartfiles -export-symbols \ - $(top_srcdir)/xlators/features/glupy/src/glupy.sym +glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -nostartfiles \ + -export-symbols $(top_srcdir)/xlators/features/glupy/src/glupy.sym \ + $(GF_NO_UNDEFINED) glupy_la_SOURCES = glupy.c glupy_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ diff --git a/xlators/features/utime/src/Makefile.am b/xlators/features/utime/src/Makefile.am index 52f2eb5df24..e94a00a8326 100644 --- a/xlators/features/utime/src/Makefile.am +++ b/xlators/features/utime/src/Makefile.am @@ -10,7 +10,7 @@ utime_la_SOURCES = $(utime_sources) nodist_utime_la_SOURCES = utime-autogen-fops.c utime-autogen-fops.h BUILT_SOURCES = utime-autogen-fops.h -utime_la_LDFLAGS = -module -avoid-version +utime_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) utime_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la noinst_HEADERS_utime = $(UTIME_SRC)/utime-helpers.h |