xref: /OK3568_Linux_fs/buildroot/package/oracle-mysql/0004-Fix-gen_lex_hash-execution.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunMakefile: fix cross-compiling the server
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunMySQL Makefile believes it can run code it just compiled, to
4*4882a593Smuzhiyungenerate a header. This does not work for cross-compilation.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunInstead, use a pre-installed host-version of the required tool.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSigned-off-by: Marcelo Gutierrez (UTN/FRH) <kuyurix@gmail.com>
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun--- mysql-5.1.70/sql/Makefile.am
11*4882a593Smuzhiyun+++ mysql-5.1.70.patch/sql/Makefile.am
12*4882a593Smuzhiyun@@ -177,7 +177,7 @@
13*4882a593Smuzhiyun # this avoid the rebuild of the built files in a source dist
14*4882a593Smuzhiyun lex_hash.h:	gen_lex_hash.cc lex.h
15*4882a593Smuzhiyun 		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
16*4882a593Smuzhiyun-		./gen_lex_hash$(EXEEXT) > $@-t
17*4882a593Smuzhiyun+		gen_lex_hash$(EXEEXT) > $@-t
18*4882a593Smuzhiyun 		$(MV) $@-t $@
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun # For testing of udf_example.so
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun--- mysql-5.1.70/sql/Makefile.in
23*4882a593Smuzhiyun+++ mysql-5.1.70.patch/sql/Makefile.in
24*4882a593Smuzhiyun@@ -1310,7 +1310,7 @@
25*4882a593Smuzhiyun # this avoid the rebuild of the built files in a source dist
26*4882a593Smuzhiyun lex_hash.h:	gen_lex_hash.cc lex.h
27*4882a593Smuzhiyun 		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
28*4882a593Smuzhiyun-		./gen_lex_hash$(EXEEXT) > $@-t
29*4882a593Smuzhiyun+		gen_lex_hash$(EXEEXT) > $@-t
30*4882a593Smuzhiyun 		$(MV) $@-t $@
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun # We might have some stuff not built in this build, but that we want to install
33