Package: libelf Version: 0.8.6-3 Severity: normal Tags: patch Hi,
In Maemo[0] we'd like to have all package using the warning flags, so I added that in the rules files, and fixed other build issues, namely: * Reverted part of the diff on Makefile.in, so that configure can detect the correct values by itself. * Remove the hardcoded LINK_SHLIB in debian/rules, now that the Makefile.in DTRT. * Pass the arguments to configure so that it can allow cross-building. * Support noopt, per policy. * Enable -Wall by default. regards, guillem [0] <http://www.maemo.org/>
diff -u libelf-0.8.6/lib/Makefile.in libelf-0.8.6/lib/Makefile.in --- libelf-0.8.6/lib/Makefile.in +++ libelf-0.8.6/lib/Makefile.in @@ -44,12 +44,15 @@ DEPSHLIBS = @DEPSHLIBS@ DO_SHLIB = @DO_SHLIB@ -PICFLAGS = -fPIC -SHLIB_SFX = .so.$(VERSION) +PICFLAGS = @PICFLAGS@ +SHLIB_SFX = @SHLIB_SFX@ SHLINK_SFX = .so.$(word 1,$(subst ., ,$(VERSION))).$(word 2,$(subst ., ,$(VERSION))) -SONAME_SFX = .so.$(MAJOR) -LINK_SHLIB = $(CC) -shared -INSTALL_SHLIB = @INSTALL_PROGRAM@ +#SHLINK_SFX = @SHLINK_SFX@ +SONAME_SFX = @SONAME_SFX@ +LINK_SHLIB = @LINK_SHLIB@ +INSTALL_SHLIB = @INSTALL_SHLIB@ +#INSTALL_SHLIB = @INSTALL_PROGRAM@ + SHLIB = libelf$(SHLIB_SFX) SHLINK = libelf$(SHLINK_SFX) diff -u libelf-0.8.6/debian/rules libelf-0.8.6/debian/rules --- libelf-0.8.6/debian/rules +++ libelf-0.8.6/debian/rules @@ -2,17 +2,25 @@ # # Alex Pennace -MAJOR=0 -CFLAGS=-O2 -g -D_REENTRANT +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g -D_REENTRANT + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif build: build-stamp build-stamp: dh_testdir mv po/de.gmo po/de.gmo.orig cp po/de.gmo.orig po/de.gmo - ./configure --prefix=/usr --enable-shared --host=$(DEB_HOST_GNU_TYPE) - make CFLAGS="$(CFLAGS)" \ - LINK_SHLIB='gcc -shared -Wl,-soname,libelf.so.$(MAJOR) -lc' + ./configure --prefix=/usr --enable-shared \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + make CFLAGS="$(CFLAGS)" touch build-stamp clean:

