board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / icu / 0003-detect-compiler-symbol-prefix.patch
blob1e9537503b8c02025dee3623af7dd872524e3cda
1 detect and add compiler symbol prefix to the assembly code
3 Some compiler, such as Blackfin GNU compiler, prefix a charater to any
4 C symbol in generated assembly code. If any assembly symbol is invoked
5 from C code, it needs to be prefixed as well.
7 Note: since autoreconf doesn't work with this package because automake
8 isn't support
10 [Ryan: add information about why patching configure is ok]
11 [Gustavo: update for ICU4C 54.1]
13 Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
14 Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
15 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
17 diff -Nura icu.orig/source/configure icu/source/configure
18 --- icu.orig/source/configure 2014-12-18 15:49:43.038628644 -0300
19 +++ icu/source/configure 2014-12-18 15:56:05.793832186 -0300
20 @@ -637,6 +637,7 @@
21 ICUDATA_CHAR
22 SAMPLES_TRUE
23 TESTS_TRUE
24 +SYMBOL_PREFIX
25 ICULIBSUFFIXCNAME
26 U_HAVE_LIB_SUFFIX
27 ICULIBSUFFIX
28 @@ -7414,6 +7415,17 @@
29 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_UTF16_STRING_RESULT" >&5
30 $as_echo "$CHECK_UTF16_STRING_RESULT" >&6; }
32 +# Check compiler generated symbol profix
33 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
34 +$as_echo "checking for symbol prefix... " >&6; }
35 + SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
36 + | ${CPP-${CC-gcc} -E} - 2>&1 \
37 + | ${EGREP-grep} "^PREFIX=" \
38 + | sed -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
40 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
41 +$as_echo "$SYMBOL_PREFIX" >&6; }
43 # Enable/disable extras
44 # Check whether --enable-extras was given.
45 if test "${enable_extras+set}" = set; then :
46 diff -Nura icu.orig/source/data/Makefile.in icu/source/data/Makefile.in
47 --- icu.orig/source/data/Makefile.in 2014-12-18 15:49:42.908624160 -0300
48 +++ icu/source/data/Makefile.in 2014-12-18 16:01:32.751110913 -0300
49 @@ -182,11 +182,11 @@
50 packagedata: icupkg.inc $(PKGDATA_LIST) build-local
51 ifneq ($(ENABLE_STATIC),)
52 ifeq ($(PKGDATA_MODE),dll)
53 - $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST)
54 + $(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST)
55 endif
56 endif
57 ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
58 - $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST)
59 + $(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST)
60 else
61 $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR)
62 endif
63 @@ -209,11 +209,11 @@
64 endif
65 ifneq ($(ENABLE_STATIC),)
66 ifeq ($(PKGDATA_MODE),dll)
67 - $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR)
68 + $(PKGDATA_INVOKE) $(PKGDATA) -m static -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR)
69 endif
70 endif
71 ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
72 - $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR)
73 + $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR)
74 else
75 $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR)
76 endif
77 @@ -224,7 +224,7 @@
78 #### 390 support
79 install390: package390
80 $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir)
81 - $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR)
82 + $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR)
83 ifeq ($(PKGDATA_MODE),dll)
84 $(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(FINAL_IMPORT_LIB) $(DESTDIR)$(ICUPKGDATA_DIR)/$(FINAL_IMPORT_LIB)
85 endif
86 @@ -232,7 +232,7 @@
87 #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode
88 package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata
89 ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX)
90 - $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING)
91 + $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING)
92 cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO)
95 diff -Nura icu.orig/source/extra/uconv/Makefile.in icu/source/extra/uconv/Makefile.in
96 --- icu.orig/source/extra/uconv/Makefile.in 2014-12-18 15:49:42.986626850 -0300
97 +++ icu/source/extra/uconv/Makefile.in 2014-12-18 15:57:40.558101179 -0300
98 @@ -58,7 +58,8 @@
99 ## Static mode
100 ifeq ($(UCONVMSG_MODE),static)
101 DEFS += -DUCONVMSG_LINK=$(MSGNAME)
102 -UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(MSGNAME).$(A)
103 +UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)@SYMBOL_PREFIX@$(MSGNAME).$(A)
105 LIBS += $(UCONVMSG_LIB)
106 PKGMODE=static
107 INSTALLTO=$(libdir)
108 @@ -152,7 +153,7 @@
109 endif
111 $(UCONVMSG_LIB): $(RESFILES) $(RESDIR)/$(RESDIR).lst pkgdata.inc
112 - $(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p $(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
113 + $(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p @SYMBOL_PREFIX@$(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
115 $(RESDIR)/$(RESDIR).lst: Makefile $(srcdir)/resfiles.mk
116 @-$(RMV) $@