diff options
author | Ulf Hermann <[email protected]> | 2019-01-30 10:24:44 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2019-08-26 07:50:53 +0000 |
commit | d2db6ecd9994210e75fb4362d781ec882ec7238a (patch) | |
tree | de0a6af582218030dcae43ed1a6911756f7527d1 | |
parent | 188c2613b3744345e2ba3d4cfd0bcc47b12b74ae (diff) |
Split the "selfcontained" configure option in twoHEADQtCreator4.15.1QtCreator4.15.0-rc1QtCreator4.15.0-beta2QtCreator4.15.0-beta1QtCreator4.15.0QtCreator4.14.2QtCreator4.14.1QtCreator4.14.0-rc1QtCreator4.14.0-beta2QtCreator4.14.0-beta1QtCreator4.14.0QtCreator4.13.3QtCreator4.13.2QtCreator4.13.1QtCreator4.13.0-rc1QtCreator4.13.0-beta2QtCreator4.13.0-beta1QtCreator4.13.0QtCreator4.12.4QtCreator4.12.3QtCreator4.12.2QtCreator4.12.1QtCreator4.12.0-rc1QtCreator4.12.0-beta2QtCreator4.12.0-beta1QtCreator4.12.0QtCreator4.11.2QtCreator4.11.0-rc1QtCreator4.11.0-beta2QtCreator4.11.0-beta1QtCreator4.11.0master5.04.154.144.134.124.1112.011.010.0
upstream is growing an option to install elf.h. We want to use that.
Change-Id: Ica5bf0cdf281eb17ef29e0e1029662a5a9d875b1
Reviewed-by: Christian Kandeler <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | README.windows | 4 | ||||
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | libelf/Makefile.am | 20 | ||||
-rw-r--r-- | tests/Makefile.am | 10 |
6 files changed, 35 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am index 7e6f6bb4..5936be34 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,7 +39,7 @@ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ # Run all tests under valgrind. AM_DISTCHECK_CONFIGURE_FLAGS = \ --libdir=`echo $(libdir) | sed "s,^$(exec_prefix),$$dc_install_base,"`\ - --enable-gnulib --enable-selfcontained \ + --enable-gnulib --enable-install-elfh --enable-install-featuresh \ --disable-symbol-versioning \ --enable-valgrind --enable-sanitize-undefined \ CC="$(CC)" diff --git a/README.windows b/README.windows index 2c4df058..170754db 100644 --- a/README.windows +++ b/README.windows @@ -1,12 +1,12 @@ In order to build this with mingw/msys for perfparser, use the following configure line: -LDFLAGS=-static-libgcc configure --enable-maintainer-mode --enable-selfcontained --enable-gnulib \ +LDFLAGS=-static-libgcc configure --enable-maintainer-mode --enable-install-elfh --enable-install-featuresh --enable-gnulib \ --without-bzlib --without-lzma --disable-symbol-versioning That is: - static-libgcc so that we don't depend on a shared libgcc - maintainer-mode as we are building from git -- selfcontained to ship the headers needed to link perfparser +- install-elfh and install-featuresh to ship the headers needed to build perfparser - gnulib to replace missing libc functions - without-bzlib to avoid extra dependencies - without-lzma also to avoid dependencies diff --git a/configure.ac b/configure.ac index b351f086..eddacb8b 100644 --- a/configure.ac +++ b/configure.ac @@ -125,11 +125,11 @@ AS_HELP_STRING([--enable-gnulib], use_gnulib=$enableval, use_gnulib=no) AM_CONDITIONAL(USE_GNULIB, test "$use_gnulib" = yes) -AC_ARG_ENABLE([selfcontained], -AS_HELP_STRING([--enable-selfcontained], - [install extra headers to enable including and linking the libraries on non-GNU systems]), - selfcontained=$enableval, selfcontained=no) -AM_CONDITIONAL(SELFCONTAINED, test "$selfcontained" = yes) +AC_ARG_ENABLE([install-featuresh], +AS_HELP_STRING([--enable-install-featuresh], + [install a dummy features.h header]), + install_featuresh=$enableval, install_featuresh=no) +AM_CONDITIONAL(INSTALL_FEATURESH, test "$install_featuresh" = yes) AC_PROG_CC @@ -389,6 +389,11 @@ if test "$use_valgrind" = yes; then fi AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes) +AC_ARG_ENABLE([install-elfh], +AS_HELP_STRING([--enable-install-elfh],[install elf.h in include dir]), + [install_elfh=$enableval], [install_elfh=no]) +AM_CONDITIONAL(INSTALL_ELFH, test "$install_elfh" = yes) + AM_CONDITIONAL(BUILD_STATIC, [dnl test "$use_gprof" = yes -o "$use_gcov" = yes]) @@ -811,6 +816,7 @@ AC_MSG_NOTICE([ NOT RECOMMENDED FEATURES (should all be no) Experimental thread safety : ${use_locks} + install elf.h : ${install_elfh} OTHER FEATURES Deterministic archives by default : ${default_ar_deterministic} @@ -826,3 +832,9 @@ AC_MSG_NOTICE([ use rpath in tests : ${tests_use_rpath} test biarch : ${utrace_cv_cc_biarch} ]) + +if test "$install_elfh" = yes; then + if test "${prefix}" = "/usr/local" -o "${prefix}" = "/usr"; then + AC_MSG_WARN([installing elf.h in ${includedir} might conflict with glibc/system elf.h]) + fi +fi diff --git a/lib/Makefile.am b/lib/Makefile.am index edd669fb..908bd894 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -46,7 +46,7 @@ if !GPROF xmalloc_CFLAGS = -ffunction-sections endif -if SELFCONTAINED +if INSTALL_FEATURESH install-headers: install-am features.h.in $(mkinstalldirs) $(DESTDIR)$(includedir) $(INSTALL_HEADER) $(top_srcdir)/lib/features.h.in $(DESTDIR)$(includedir)/features.h diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 015a07e3..9d6da6b4 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -38,6 +38,16 @@ noinst_LIBRARIES = libelf_pic.a noinst_DATA = $(libelf_BARE) include_HEADERS = libelf.h gelf.h nlist.h +noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ + version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \ + chdr_xlate.h + +if INSTALL_ELFH +include_HEADERS += elf.h +else +noinst_HEADERS += elf.h +endif + pkginclude_HEADERS = elf-knowledge.h libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ @@ -149,16 +159,6 @@ endif install: install-am install-lib uninstall: uninstall-am uninstall-lib -noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ - version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \ - chdr_xlate.h - -if SELFCONTAINED -include_HEADERS += elf.h -else -noinst_HEADERS += elf.h -endif - EXTRA_DIST = libelf.map CLEANFILES += $(am_libelf_pic_a_OBJECTS) $(libelf_SONAME) $(libelf_BARE) diff --git a/tests/Makefile.am b/tests/Makefile.am index d60d6636..4b88e16d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -608,14 +608,12 @@ next_cfi_LDADD = $(libelf) $(libdw) $(libgnu) elfcopy_LDADD = $(libelf) $(libgnu) addsections_LDADD = $(libelf) $(libgnu) -if SELFCONTAINED -# In self contained mode we cannot expect a system elf header. -# Use our own then -system_elf_libelf_test_CPPFLAGS = -I$(top_srcdir)/libelf -else # We want to test the libelf header against the system elf.h header. -# Don't include any -I CPPFLAGS. +# Don't include any -I CPPFLAGS. Except when we install our own elf.h. +if !INSTALL_ELFH system_elf_libelf_test_CPPFLAGS = +else +system_elf_libelf_test_CPPFLAGS = -I$(top_srcdir)/libelf endif if USE_GNULIB system_elf_libelf_test_CPPFLAGS += -I$(top_srcdir)/libgnu -I$(top_builddir)/libgnu |