Skip to contentSkip to conversation

mysql: add option to build the server

PATCH New Marcelo Gutiérrez 1 participant 1 message Jan 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 mysql: add option to build the server

---
Changes v3 -> v4:
- fix tab/spacing
- move ifeq block
- add help text

Changes v2 -> v3:
- rename field <number> in the patch file name
- update new options postion
- update description to Makefile
- update Config.in

Changes v1 -> v2:
- fix comments following new policy
- rename patches
- remove useless hook points
- add the URL to the home of MySQL
- add commit-log description to the patches
- install host tools to $(HOST_DIR)/usr/bin
- fix only builds the required program

 package/mysql/Config.in                            |    8 ++++
 .../mysql-0003-ac_stack_direction-is-unset.patch   |   15 +++++++
 .../mysql-0004-Fix-gen_lex_hash-execution.patch    |   32 ++++++++++++++
 package/mysql/mysql.mk                             |   46 +++++++++++++++++++-
 4 files changed, 100 insertions(+), 1 deletion(-)
 create mode 100644 package/mysql/mysql-0003-ac_stack_direction-is-unset.patch
 create mode 100644 package/mysql/mysql-0004-Fix-gen_lex_hash-execution.patch
package/mysql/Config.in +8 -0
index 0def957..9bd28c1 100644
@@ -13,3 +13,11 @@ config BR2_PACKAGE_MYSQL
 comment "MySQL needs a toolchain w/ C++, threads"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+
+if BR2_PACKAGE_MYSQL
+
+config BR2_PACKAGE_MYSQL_SERVER
+	bool "MySQL server"
+	help
+	  Install the MySQL server on the target.
+endif
package/mysql/mysql-0003-ac_stack_direction-is-unset.patch new file +15 -0
new file mode 100644
index 0000000..6fef0a9
@@ -0,0 +1,15 @@
+misc.m4: ac_cv_c_stack_direction is unset.
+
+Signed-off-by: Marcelo Gutierrez (UTN/FRH) <[email protected]>
+
+--- mysql-5.1.70.orig/config/ac-macros/misc.m4
++++ mysql-5.1.70/config/ac-macros/misc.m4
+@@ -477,7 +477,7 @@
+     exit(ptr_f(&a) < 0);
+   }
+   ], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
+-   ac_cv_c_stack_direction=)])
++   ac_cv_c_stack_direction=0)])
+  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
+ ])dnl
+ 
package/mysql/mysql-0004-Fix-gen_lex_hash-execution.patch new file +32 -0
new file mode 100644
index 0000000..b91ed4f
@@ -0,0 +1,32 @@
+Makefile: fix cross-compiling the server
+
+MySQL Makefile believes it can run code it just compiled, to
+generate a header. This does not work for cross-compilation.
+
+Instead, use a pre-installed host-version of the required tool.
+
+Signed-off-by: Marcelo Gutierrez (UTN/FRH) <[email protected]>
+
+--- mysql-5.1.70/sql/Makefile.am
++++ mysql-5.1.70.patch/sql/Makefile.am
+@@ -177,7 +177,7 @@
+ # this avoid the rebuild of the built files in a source dist
+ lex_hash.h:	gen_lex_hash.cc lex.h
+ 		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
+-		./gen_lex_hash$(EXEEXT) > $@-t
++		gen_lex_hash$(EXEEXT) > $@-t
+ 		$(MV) $@-t $@
+ 
+ # For testing of udf_example.so
+
+--- mysql-5.1.70/sql/Makefile.in
++++ mysql-5.1.70.patch/sql/Makefile.in
+@@ -1310,7 +1310,7 @@
+ # this avoid the rebuild of the built files in a source dist
+ lex_hash.h:	gen_lex_hash.cc lex.h
+ 		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
+-		./gen_lex_hash$(EXEEXT) > $@-t
++		gen_lex_hash$(EXEEXT) > $@-t
+ 		$(MV) $@-t $@
+ 
+ # We might have some stuff not built in this build, but that we want to install
package/mysql/mysql.mk +45 -1

61 lines not on this page · raw message

Signature · 1 line
1.7.10.4