Skip to contentSkip to conversation

package/open2300: use mysql_config to retrieve cflags and libs

PATCH New Fabrice Fontaine 3 participants 3 messages Jul 14, 2020 – Jul 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/open2300: use mysql_config to retrieve cflags and libs

oracle-mysql won't built its own bundled zlib since commit 6fed83a03047535d4a9c849352f8c21b30177fcd so don't unconditionally link with zlib instead use mysql_config to retrieve cflags and libs as suggested by Thomas Petazzoni in review of first iteration

Fixes:
- No autobuilder failures yet

---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Use mysql_config instead of current workarounds

 package/open2300/open2300.mk | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
package/open2300/open2300.mk +2 -6
index 589d344b97..0ffb8b5046 100644
@@ -19,12 +19,8 @@ OPEN2300_LDFLAGS = $(TARGET_LDFLAGS)
 ifeq ($(BR2_PACKAGE_MYSQL),y)
 OPEN2300_DEPENDENCIES += mysql
 OPEN2300_BINS += mysql2300 mysqlhistlog2300
-OPEN2300_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql
-OPEN2300_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient
-ifeq ($(BR2_STATIC_LIBS),y)
-# mysql needs -lz, so we need to specify it for static builds
-OPEN2300_LDFLAGS += -lz
-endif
+OPEN2300_CFLAGS += $(shell $(STAGING_DIR)/usr/bin/mysql_config --cflags)
+OPEN2300_LDFLAGS += $(shell $(STAGING_DIR)/usr/bin/mysql_config --libs)
 endif
 
 define OPEN2300_BUILD_CMDS
Signature · 1 line
2.27.0
#1 lore raw

PATCH v2 1/1 package/open2300: use mysql_config to retrieve cflags and libs

Quoted 5 lines · On Tue, 14 Jul 2020 23:10:17 +0200 Fabrice Fontaine…

oracle-mysql won't built its own bundled zlib since commit 6fed83a03047535d4a9c849352f8c21b30177fcd so don't unconditionally link with zlib instead use mysql_config to retrieve cflags and libs as suggested by Thomas Petazzoni in review of first iteration

Quoted 7 lines

Fixes:
- No autobuilder failures yet

---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Use mysql_config instead of current workarounds

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 package/open2300: use mysql_config to retrieve cflags and libs

In reply to Fabrice Fontaine
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

oracle-mysql won't built its own bundled zlib since commit 6fed83a03047535d4a9c849352f8c21b30177fcd so don't unconditionally link with zlib instead use mysql_config to retrieve cflags and libs as suggested by Thomas Petazzoni in review of first iteration

Quoted 7 lines

Fixes:
- No autobuilder failures yet

---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Use mysql_config instead of current workarounds

Committed to 2020.02.x and 2020.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard