From 5185a368c3ee8dfe341ea4e2ec876a28487345e0 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Wed, 4 Jun 2014 17:34:06 +0400 Subject: [PATCH] automake: add dummy.cc to fix 'make tags' Commit 421e6c561704 ("test_librbd_fsx: add krbd mode support") added a requirement for ceph_test_librbd_fsx to be linked with a C++ linker. Implement it in a way that doesn't break 'make tags'. Fixes: #8530 Signed-off-by: Ilya Dryomov --- src/common/dummy.cc | 20 ++++++++++++++++++++ src/test/Makefile.am | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/common/dummy.cc diff --git a/src/common/dummy.cc b/src/common/dummy.cc new file mode 100644 index 0000000000000..262671426a1dc --- /dev/null +++ b/src/common/dummy.cc @@ -0,0 +1,20 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2014 Inktank, Inc + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + +/* + * A dummy file with a .cc extension to make autotools link + * ceph_test_librbd_fsx with a C++ linker. An approach w/o a physical + * dummy.cc recommended in 8.3.5 Libtool Convenience Libraries works, + * but breaks 'make tags' and friends. + */ diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 5b854919adfc7..79668ec6fec1a 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -639,8 +639,8 @@ ceph_test_librbd_CXXFLAGS = $(UNITTEST_CXXFLAGS) bin_DEBUGPROGRAMS += ceph_test_librbd if LINUX -ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c -nodist_EXTRA_ceph_test_librbd_fsx_SOURCES = dummy.cc # force c++ linking +# Force use of C++ linker with dummy.cc - LIBKRBD is a C++ library +ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c common/dummy.cc ceph_test_librbd_fsx_LDADD = $(LIBKRBD) $(LIBRBD) $(LIBRADOS) ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format bin_DEBUGPROGRAMS += ceph_test_librbd_fsx -- 2.39.5