summaryrefslogtreecommitdiffstats
path: root/package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
diff options
context:
space:
mode:
authorAngelo Compagnucci <angelo@amarulasolutions.com>2017-12-21 15:54:10 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-28 23:33:13 +0100
commitb52f74f42821556e3296723fe049a073ac749c6e (patch)
treefde4a6d59fbdc46232e68aa45e9b97a3f45e8ade /package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
parentc68ec4297ec9fea58fab910fe095bbfefd11c6f8 (diff)
downloadbuildroot-b52f74f42821556e3296723fe049a073ac749c6e.tar.gz
buildroot-b52f74f42821556e3296723fe049a073ac749c6e.zip
package/i2c-tools: bump to version 4.0
This patch bumps i2c-tools to version 4.0 and adds a couple of new commands named i2ctransfer and eeprog. It adds also several upstream commits not included in the release that fix static compilation issues and parallel build issues. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch')
-rw-r--r--package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch b/package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
new file mode 100644
index 0000000000..b5ec5471de
--- /dev/null
+++ b/package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
@@ -0,0 +1,64 @@
+From 9906b2ecb6aec02d6348d6237b784135e6930d0b Mon Sep 17 00:00:00 2001
+From: Angelo Compagnucci <angelo@amarulasolutions.com>
+Date: Wed, 6 Dec 2017 10:12:07 +0100
+Subject: Makefile: Add flag to disable dynamic library
+
+In such cases where you need to disable entirely the dynamic
+library compilation, now you can use the BUILD_DYNAMIC_LIB=0
+flag.
+
+Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+---
+ Makefile | 10 +++++++++-
+ lib/Module.mk | 6 +++++-
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c85317c..1bb5572 100644
+--- a/Makefile
++++ b/Makefile
+@@ -32,12 +32,20 @@ CFLAGS ?= -O2
+ CFLAGS += -Wall
+ SOCFLAGS := -fpic -D_REENTRANT $(CFLAGS)
+
+-USE_STATIC_LIB ?= 0
++BUILD_DYNAMIC_LIB ?= 1
+ BUILD_STATIC_LIB ?= 1
++USE_STATIC_LIB ?= 0
++
+ ifeq ($(USE_STATIC_LIB),1)
+ BUILD_STATIC_LIB := 1
+ endif
+
++ifeq ($(BUILD_DYNAMIC_LIB),0)
++ifeq ($(BUILD_STATIC_LIB),0)
++$(error BUILD_DYNAMIC_LIB and BUILD_STATIC_LIB cannot be disabled at the same time)
++endif
++endif
++
+ KERNELVERSION := $(shell uname -r)
+
+ .PHONY: all strip clean install uninstall
+diff --git a/lib/Module.mk b/lib/Module.mk
+index fd2c8c4..44fa938 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -27,9 +27,13 @@ LIB_SHSONAME := $(LIB_SHBASENAME).$(LIB_MAINVER)
+ LIB_SHLIBNAME := $(LIB_SHBASENAME).$(LIB_VER)
+ LIB_STLIBNAME := libi2c.a
+
+-LIB_TARGETS := $(LIB_SHLIBNAME)
+ LIB_LINKS := $(LIB_SHSONAME) $(LIB_SHBASENAME)
+ LIB_OBJECTS := smbus.o
++
++LIB_TARGETS :=
++ifeq ($(BUILD_DYNAMIC_LIB),1)
++LIB_TARGETS += $(LIB_SHLIBNAME)
++endif
+ ifeq ($(BUILD_STATIC_LIB),1)
+ LIB_TARGETS += $(LIB_STLIBNAME)
+ LIB_OBJECTS += smbus.ao
+--
+2.7.4
+
OpenPOWER on IntegriCloud