diff options
author | Michael Vogt <mvo@debian.org> | 2015-08-18 11:57:35 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-08-18 11:57:35 +0200 |
commit | b53c9cea2902572822bbbece5bac236c1bbf846e (patch) | |
tree | 6c6b0524e0971c0623ccbff71383523ee0b2a5cc /buildlib | |
parent | 21248c0f00ee71412dbadc6ebf84011cf974346d (diff) | |
parent | 2a22cd60f04c4291ea9b9b72e15b6d2ec378b001 (diff) |
Merge remote-tracking branch 'upstream/debian/experimental' into feature/srv-records
Diffstat (limited to 'buildlib')
-rw-r--r-- | buildlib/config.h.in | 4 | ||||
-rw-r--r-- | buildlib/environment.mak.in | 10 | ||||
-rw-r--r-- | buildlib/library.mak | 10 | ||||
-rw-r--r-- | buildlib/libversion.mak | 6 | ||||
-rw-r--r-- | buildlib/po4a_manpage.mak | 1 |
5 files changed, 21 insertions, 10 deletions
diff --git a/buildlib/config.h.in b/buildlib/config.h.in index 66ab33c2b..c6b1ee669 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -28,9 +28,11 @@ /* If there is no socklen_t, define this for the netdb shim */ #undef NEED_SOCKLEN_T_DEFINE -/* We need the getresuid() function */ +/* Check for getresuid() function and similar ones */ #undef HAVE_GETRESUID #undef HAVE_GETRESGID +#undef HAVE_SETRESUID +#undef HAVE_SETRESGID /* Define to the size of the filesize containing structures */ #undef _FILE_OFFSET_BITS diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index b0a8d9d35..287205181 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -9,9 +9,15 @@ PACKAGE_MAIL = @PACKAGE_MAIL@ CC = @CC@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2 CXX = @CXX@ -CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra +CXXFLAGS+= @CXXFLAGS@ -std=c++11 -Wall -Wextra CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations -CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn +CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef +# suggests methods which already have such an attribute +#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn +# gcc reports currently lots of them at the end of file - unknown reason +CXXFLAGS+= -Wno-deprecated-declarations +# sanitize options to be enabled for testing +#CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr # a bit too pedantic to be run by default #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros NUM_PROCS = @NUM_PROCS@ diff --git a/buildlib/library.mak b/buildlib/library.mak index cc0286d7e..03f868116 100644 --- a/buildlib/library.mak +++ b/buildlib/library.mak @@ -21,6 +21,7 @@ $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOU $(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE))))) $(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS)) $(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR) +$(LOCAL)-VERSIONSCRIPT := $(LIB)/lib$(LIBRARY)-$(MAJOR)-$(MINOR).symver $(LOCAL)-SLIBS := $(SLIBS) $(LOCAL)-LIBRARY := $(LIBRARY) @@ -39,7 +40,7 @@ MKDIRS += $(OBJ) $(DEP) $(LIB) $(dir $($(LOCAL)-HEADERS)) # The clean rules .PHONY: clean/$(LOCAL) veryclean/$(LOCAL) clean/$(LOCAL): - -rm -f $($(@F)-OBJS) $($(@F)-DEP) + -rm -f $($(@F)-OBJS) $($(@F)-DEP) $($(@F)-VERSIONSCRIPT) veryclean/$(LOCAL): clean/$(LOCAL) -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so* @@ -50,11 +51,14 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR): $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR) $(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR) ln -sf $(<F) $@ +$($(LOCAL)-VERSIONSCRIPT): + echo '$(shell echo '$(LIBRARY)' | tr -d '-' | tr 'a-z' 'A-Z')_$(MAJOR) { global: *; };' > $@ + # The binary build rule -$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS) +$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS) $($(LOCAL)-VERSIONSCRIPT) -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null echo Building shared library $@ - $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,--version-script=$($(@F)-VERSIONSCRIPT) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \ $(filter %.opic,$^) \ $($(@F)-SLIBS) diff --git a/buildlib/libversion.mak b/buildlib/libversion.mak index deb3da377..1b1855be3 100644 --- a/buildlib/libversion.mak +++ b/buildlib/libversion.mak @@ -4,11 +4,11 @@ # with each non-ABI break to the lib, please increase RELEASE. # The versionnumber is extracted from apt-pkg/macros.h - see also there. LIBAPTPKG_MAJOR=$(shell awk -v ORS='.' '/^\#define APT_PKG_M/ {print $$3}' $(BASE)/apt-pkg/contrib/macros.h | sed 's/\.$$//') -LIBAPTPKG_RELEASE=$(shell grep -E '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/contrib/macros.h | cut -d ' ' -f 3) +LIBAPTPKG_RELEASE=$(shell grep '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/contrib/macros.h | cut -d ' ' -f 3) # Version number of libapt-inst # Please increase MAJOR with each ABI break, # with each non-ABI break to the lib, please increase MINOR. # The versionnumber is extracted from apt-inst/makefile - see also there. -LIBAPTINST_MAJOR=$(shell egrep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) -LIBAPTINST_MINOR=$(shell egrep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) +LIBAPTINST_MAJOR=$(shell grep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) +LIBAPTINST_MINOR=$(shell grep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak index 0f53a8600..2e98652a5 100644 --- a/buildlib/po4a_manpage.mak +++ b/buildlib/po4a_manpage.mak @@ -57,7 +57,6 @@ HAVE_PO4A=yes endif # take care of the rest -SOURCE := $(SOURCE) $(wildcard apt.$(LC).8) INCLUDES := ifndef HAVE_PO4A |