Index: tmp_buildroot-2016.05/package/bzip2/0100-avm-add-build-flags.patch =================================================================== --- /dev/null +++ tmp_buildroot-2016.05/package/bzip2/0100-avm-add-build-flags.patch @@ -0,0 +1,38 @@ +--- a/Makefile 2017-11-24 16:21:17.003925954 +0100 ++++ b/Makefile 2017-11-24 16:23:28.944774814 +0100 +@@ -18,9 +18,9 @@ + CC=gcc + AR=ar + RANLIB=ranlib +-LDFLAGS= ++override LDFLAGS += $(DEFAULT_LDFLAGS_APPL) + +-override CFLAGS += -Wall ++override CFLAGS += -Wall $(DEFAULT_CFLAGS_SRC) + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local + +--- ./Makefile-libbz2_so.orig 2017-12-01 12:45:39.385233416 +0100 ++++ ./Makefile-libbz2_so 2017-12-01 12:48:05.949020606 +0100 +@@ -23,7 +23,7 @@ + + SHELL=/bin/sh + CC=gcc +-override CFLAGS += -fpic -fPIC -Wall ++override CFLAGS += -fpic -fPIC -Wall $(DEFAULT_CFLAGS_LIB) + + OBJS= blocksort.sho \ + huffman.sho \ +@@ -34,8 +34,8 @@ + bzlib.sho + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) +- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 ++ $(CC) $(DEFAULT_LDFLAGS_LIB) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) ++ $(CC) $(DEFAULT_CFLAGS_SRC) $(DEFAULT_LDFLAGS_APPL) -o bzip2-shared bzip2.c libbz2.so.1.0.6 + + install: + install -m 0755 -D libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0.6 + Index: tmp_buildroot-2016.05/package/bzip2/bzip2.mk =================================================================== --- tmp_buildroot-2016.05.orig/package/bzip2/bzip2.mk +++ tmp_buildroot-2016.05/package/bzip2/bzip2.mk @@ -13,13 +13,13 @@ BZIP2_LICENSE_FILES = LICENSE ifeq ($(BR2_STATIC_LIBS),) define BZIP2_BUILD_SHARED_CMDS $(TARGET_MAKE_ENV) - $(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS) + $(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS) CFLAGS="$(CFLAGS) $(DEFAULT_CFLAGS_LIB)" LDFLAGS="$(LDFLAGS) $(DEFAULT_LDFLAGS_LIB)" endef endif define BZIP2_BUILD_CMDS $(TARGET_MAKE_ENV) - $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS) + $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS) CFLAGS="$(CFLAGS) $(DEFAULT_CFLAGS_SRC)" LDFLAGS="$(LDFLAGS) $(DEFAULT_LDFLAGS_APPL)" $(BZIP2_BUILD_SHARED_CMDS) endef