[ovs-dev] [RFC 4/4] Remove unused USE_LINKER_SECTIONS

Helmut Schaa helmut.schaa at googlemail.com
Tue Dec 10 13:49:30 UTC 2013


Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
---
 configure.ac      |  1 -
 lib/automake.mk   | 22 ----------------------
 m4/openvswitch.m4 | 34 ----------------------------------
 3 files changed, 57 deletions(-)

diff --git a/configure.ac b/configure.ac
index 167cc71..96880af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,6 @@ OVS_CHECK_BACKTRACE
 OVS_CHECK_MALLOC_HOOKS
 OVS_CHECK_VALGRIND
 OVS_CHECK_SOCKET_LIBS
-OVS_CHECK_LINKER_SECTIONS
 OVS_CHECK_XENSERVER_VERSION
 OVS_CHECK_GROFF
 OVS_CHECK_GNU_MAKE
diff --git a/lib/automake.mk b/lib/automake.mk
index fadc4be..61e70ca 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -391,25 +391,3 @@ lib-install-data-local:
 	$(MKDIR_P) $(DESTDIR)$(LOGDIR)
 	$(MKDIR_P) $(DESTDIR)$(DBDIR)
 
-if !USE_LINKER_SECTIONS
-# All distributed sources, with names adjust properly for referencing
-# from $(builddir).
-all_sources = \
-	`for file in $(DIST_SOURCES); do \
-		if test -f $$file; then \
-			echo $$file; \
-		else \
-			echo $(VPATH)/$$file; \
-		fi; \
-	 done`
-
-lib/coverage.$(OBJEXT): lib/coverage.def
-lib/coverage.def: $(DIST_SOURCES)
-	sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
-CLEANFILES += lib/coverage.def
-
-lib/vlog.$(OBJEXT): lib/vlog-modules.def
-lib/vlog-modules.def: $(DIST_SOURCES)
-	sed -n 's|^VLOG_DEFINE_\(THIS_\)\{0,1\}MODULE(\([_a-zA-Z0-9]\{1,\}\)).*$$|VLOG_MODULE(\2)|p' $(all_sources) | LC_ALL=C sort -u > $@
-CLEANFILES += lib/vlog-modules.def
-endif
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index e7281ad..3d5c786 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -351,40 +351,6 @@ rm -f conftest$ac_exeext
 rm -f m4_ifval([$1], [conftest1.$ac_ext]) m4_ifval([$2], [conftest1.$ac_ext])[]dnl
 ])# OVS_LINK2_IFELSE
 
-dnl Defines USE_LINKER_SECTIONS to 1 if the compiler supports putting
-dnl variables in sections with user-defined names and the linker
-dnl automatically defines __start_SECNAME and __stop_SECNAME symbols
-dnl that designate the start and end of the sections.
-AC_DEFUN([OVS_CHECK_LINKER_SECTIONS],
-  [AC_CACHE_CHECK(
-    [for user-defined linker section support],
-    [ovs_cv_use_linker_sections],
-    [OVS_LINK2_IFELSE(
-      [AC_LANG_SOURCE(
-        [int a __attribute__((__section__("mysection"))) = 1;
-         int b __attribute__((__section__("mysection"))) = 2;
-         int c __attribute__((__section__("mysection"))) = 3;])],
-      [AC_LANG_PROGRAM(
-        [#include <stdio.h>
-         extern int __start_mysection;
-         extern int __stop_mysection;],
-        [int n_ints = &__stop_mysection - &__start_mysection;
-         int *i;
-         for (i = &__start_mysection; i < &__start_mysection + n_ints; i++) {
-             printf("%d\n", *i);
-         }])],
-      [ovs_cv_use_linker_sections=yes],
-      [ovs_cv_use_linker_sections=no])])
-   if test $ovs_cv_use_linker_sections = yes; then
-     AC_DEFINE([USE_LINKER_SECTIONS], [1],
-               [Define to 1 if the compiler support putting variables
-                into sections with user-defined names and the linker
-                automatically defines __start_SECNAME and __stop_SECNAME
-                symbols that designate the start and end of the section.])
-   fi
-   AM_CONDITIONAL(
-     [USE_LINKER_SECTIONS], [test $ovs_cv_use_linker_sections = yes])])
-
 dnl Checks for groff.
 AC_DEFUN([OVS_CHECK_GROFF],
   [AC_CACHE_CHECK(
-- 
1.8.1.4




More information about the dev mailing list