diff options
Diffstat (limited to 'meta/recipes-support/libpcre/libpcre2/pcre-cross.patch')
-rw-r--r-- | meta/recipes-support/libpcre/libpcre2/pcre-cross.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch new file mode 100644 index 0000000000..9516caf51a --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | Fix for cross compiling | ||
2 | |||
3 | Fixed: | ||
4 | | ./dftables src/pcre2_chartables.c | ||
5 | | make: ./dftables: Command not found | ||
6 | | make: *** [src/pcre2_chartables.c] Error 127 | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
11 | |||
12 | diff --git a/Makefile.am b/Makefile.am | ||
13 | index 38f1d41..2bde083 100644 | ||
14 | --- a/Makefile.am | ||
15 | +++ b/Makefile.am | ||
16 | @@ -298,9 +298,21 @@ bin_SCRIPTS = pcre2-config | ||
17 | ## to copy a distributed set of tables that are defined for ASCII code. In this | ||
18 | ## case, dftables is not needed. | ||
19 | |||
20 | +CC_FOR_BUILD = @CC_FOR_BUILD@ | ||
21 | +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ | ||
22 | +CCLD_FOR_BUILD = @CCLD_FOR_BUILD@ | ||
23 | +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ | ||
24 | + | ||
25 | if WITH_REBUILD_CHARTABLES | ||
26 | noinst_PROGRAMS += dftables | ||
27 | dftables_SOURCES = src/dftables.c | ||
28 | + | ||
29 | +dftables_LINK = $(CCLD_FOR_BUILD) -o $@ | ||
30 | +dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD) | ||
31 | + | ||
32 | +src/dftables.o: $(srcdir)/src/dftables.c | ||
33 | + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/src/dftables.c | ||
34 | + | ||
35 | src/pcre2_chartables.c: dftables$(EXEEXT) | ||
36 | rm -f $@ | ||
37 | ./dftables$(EXEEXT) $@ | ||
38 | diff --git a/configure.ac b/configure.ac | ||
39 | index d7c57aa..d6eb0aa 100644 | ||
40 | --- a/configure.ac | ||
41 | +++ b/configure.ac | ||
42 | @@ -59,6 +59,23 @@ then | ||
43 | fi | ||
44 | fi | ||
45 | |||
46 | +if test x"$cross_compiling" = xyes; then | ||
47 | + CC_FOR_BUILD="${CC_FOR_BUILD-gcc}" | ||
48 | + CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}" | ||
49 | + CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}" | ||
50 | + LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}" | ||
51 | +else | ||
52 | + CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}" | ||
53 | + CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}" | ||
54 | + CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}" | ||
55 | + LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}" | ||
56 | +fi | ||
57 | +AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler]) | ||
58 | +AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend]) | ||
59 | +AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments]) | ||
60 | +AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments]) | ||
61 | + | ||
62 | + | ||
63 | # Check for a 64-bit integer type | ||
64 | AC_TYPE_INT64_T | ||
65 | |||