All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code
@ 2014-01-06 11:05 sonic.adi at gmail.com
  2014-01-14 21:52 ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: sonic.adi at gmail.com @ 2014-01-06 11:05 UTC (permalink / raw)
  To: buildroot

From: Sonic Zhang <sonic.zhang@analog.com>

Some compiler, such as Blackfin GNU compiler, prefix a charater to any
C symbol in generated assembly code. If any assembly symbol is invoked
from C code, it needs to be prefixed as well.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
 .../icu/icu-detect-compiler-symbol-prefix.patch    |  104 ++++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 package/icu/icu-detect-compiler-symbol-prefix.patch

diff --git a/package/icu/icu-detect-compiler-symbol-prefix.patch b/package/icu/icu-detect-compiler-symbol-prefix.patch
new file mode 100644
index 0000000..9ca7690
--- /dev/null
+++ b/package/icu/icu-detect-compiler-symbol-prefix.patch
@@ -0,0 +1,104 @@
+package: icu: detect and add compiler symbol prefix to the assembly code
+
+Some compiler, such as Blackfin GNU compiler, prefix a charater to any
+C symbol in generated assembly code. If any assembly symbol is invoked
+from C code, it needs to be prefixed as well.
+
+--- icu-51.2/source/configure	2014-01-06 17:13:20.907249812 +0800
++++ icu-51.2.bak/source/configure	2014-01-06 17:12:57.335248659 +0800
+@@ -612,6 +612,7 @@
+ ICUDATA_CHAR
+ SAMPLES_TRUE
+ TESTS_TRUE
++SYMBOL_PREFIX
+ ICULIBSUFFIXCNAME
+ U_HAVE_LIB_SUFFIX
+ ICULIBSUFFIX
+@@ -7226,7 +7227,16 @@
+     U_HAVE_LIB_SUFFIX=0
+ fi
+ 
++# Check compiler generated symbol profix
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
++$as_echo "checking for symbol prefix... " >&6; }
++    SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
++                  | ${CPP-${CC-gcc} -E} - 2>&1 \
++                  | ${EGREP-grep} "^PREFIX=" \
++                  | sed -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
+ 
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
++$as_echo "$SYMBOL_PREFIX" >&6; }
+ 
+ # Enable/disable tests
+ # Check whether --enable-tests was given.
+--- icu-51.2/source/extra/uconv/Makefile.in	2014-01-06 17:47:13.991347946 +0800
++++ icu-51.2.bak/source/extra/uconv/Makefile.in	2014-01-06 17:48:01.571355282 +0800
+@@ -57,7 +57,7 @@
+ ## Static mode
+ ifeq ($(UCONVMSG_MODE),static)
+ DEFS += -DUCONVMSG_LINK=$(MSGNAME)
+-UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(MSGNAME).$(A)
++UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)@SYMBOL_PREFIX@$(MSGNAME).$(A)
+ LIBS += $(UCONVMSG_LIB)
+ PKGMODE=static
+ INSTALLTO=$(libdir)
+@@ -151,7 +151,7 @@
+ endif
+ 
+ $(UCONVMSG_LIB): $(RESFILES) $(RESDIR)/$(RESDIR).lst pkgdata.inc
+-	$(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p $(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
++	$(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p @SYMBOL_PREFIX@$(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
+ 
+ $(RESDIR)/$(RESDIR).lst: Makefile $(srcdir)/resfiles.mk
+ 	@-$(RMV) $@
+--- icu-51.2/source/data/Makefile.in	2014-01-06 19:00:28.879570005 +0800
++++ icu-51.2.bak/source/data/Makefile.in	2014-01-06 19:00:07.891570170 +0800
+@@ -175,13 +175,13 @@
+ packagedata: icupkg.inc $(PKGDATA_LIST) build-local
+ ifneq ($(ENABLE_STATIC),)
+ ifeq ($(PKGDATA_MODE),dll)
+-	$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST)
++	$(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST)
+ endif
+ endif
+ ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
+-	$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST)
++	$(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST)
+ ifeq ($(OS390BATCH),1)
+-	$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(OS390_PDS_NAME) $(PKGDATA_LIST)
++	$(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(OS390_PDS_NAME) $(PKGDATA_LIST)
+ endif
+ else
+ 	$(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR)
+@@ -203,11 +203,11 @@
+ endif
+ ifneq ($(ENABLE_STATIC),)
+ ifeq ($(PKGDATA_MODE),dll)
+-	$(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR)
++	$(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)
+ endif
+ endif
+ ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
+-	$(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)
++	$(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)
+ else
+ 	$(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR)
+ endif
+@@ -218,7 +218,7 @@
+ #### 390 support
+ install390: package390
+ 	$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir)
+-	$(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)
++	$(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)
+ ifeq ($(PKGDATA_MODE),dll)
+ 	$(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(FINAL_IMPORT_LIB) $(DESTDIR)$(ICUPKGDATA_DIR)/$(FINAL_IMPORT_LIB)
+ endif
+@@ -226,7 +226,7 @@
+ #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode
+ package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata
+ 	ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX)
+-	$(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)
++	$(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)
+ 	cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO)
+ 
+ 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code
  2014-01-06 11:05 [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code sonic.adi at gmail.com
@ 2014-01-14 21:52 ` Peter Korsgaard
  2014-01-22  9:18   ` Sonic Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2014-01-14 21:52 UTC (permalink / raw)
  To: buildroot

>>>>> "sonic" == sonic adi <sonic.adi@gmail.com> writes:

 > From: Sonic Zhang <sonic.zhang@analog.com>
 > Some compiler, such as Blackfin GNU compiler, prefix a charater to any
 > C symbol in generated assembly code. If any assembly symbol is invoked
 > from C code, it needs to be prefixed as well.

 > Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>

Thanks. Has this been submitted upstream?

 > ---
 >  .../icu/icu-detect-compiler-symbol-prefix.patch    |  104 ++++++++++++++++++++
 >  1 file changed, 104 insertions(+)
 >  create mode 100644 package/icu/icu-detect-compiler-symbol-prefix.patch

 > diff --git a/package/icu/icu-detect-compiler-symbol-prefix.patch b/package/icu/icu-detect-compiler-symbol-prefix.patch
 > new file mode 100644
 > index 0000000..9ca7690
 > --- /dev/null
 > +++ b/package/icu/icu-detect-compiler-symbol-prefix.patch
 > @@ -0,0 +1,104 @@
 > +package: icu: detect and add compiler symbol prefix to the assembly code
 > +
 > +Some compiler, such as Blackfin GNU compiler, prefix a charater to any
 > +C symbol in generated assembly code. If any assembly symbol is invoked
 > +from C code, it needs to be prefixed as well.
 > +
 > +--- icu-51.2/source/configure	2014-01-06 17:13:20.907249812 +0800
 > ++++ icu-51.2.bak/source/configure	2014-01-06 17:12:57.335248659 +0800

Please adjust configure.ac and set ICU_AUTORECONF = YES instead.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code
  2014-01-14 21:52 ` Peter Korsgaard
@ 2014-01-22  9:18   ` Sonic Zhang
  2014-01-22  9:59     ` Peter Korsgaard
  2014-01-27  6:30     ` Arnout Vandecappelle
  0 siblings, 2 replies; 5+ messages in thread
From: Sonic Zhang @ 2014-01-22  9:18 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Wed, Jan 15, 2014 at 5:52 AM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "sonic" == sonic adi <sonic.adi@gmail.com> writes:
>
>  > From: Sonic Zhang <sonic.zhang@analog.com>
>  > Some compiler, such as Blackfin GNU compiler, prefix a charater to any
>  > C symbol in generated assembly code. If any assembly symbol is invoked
>  > from C code, it needs to be prefixed as well.
>
>  > Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>
> Thanks. Has this been submitted upstream?

Do you mean the icu source upstream? Not yet. Where do you prefer to
host this patch? in buildroot or icu project?

>
>  > ---
>  >  .../icu/icu-detect-compiler-symbol-prefix.patch    |  104 ++++++++++++++++++++
>  >  1 file changed, 104 insertions(+)
>  >  create mode 100644 package/icu/icu-detect-compiler-symbol-prefix.patch
>
>  > diff --git a/package/icu/icu-detect-compiler-symbol-prefix.patch b/package/icu/icu-detect-compiler-symbol-prefix.patch
>  > new file mode 100644
>  > index 0000000..9ca7690
>  > --- /dev/null
>  > +++ b/package/icu/icu-detect-compiler-symbol-prefix.patch
>  > @@ -0,0 +1,104 @@
>  > +package: icu: detect and add compiler symbol prefix to the assembly code
>  > +
>  > +Some compiler, such as Blackfin GNU compiler, prefix a charater to any
>  > +C symbol in generated assembly code. If any assembly symbol is invoked
>  > +from C code, it needs to be prefixed as well.
>  > +
>  > +--- icu-51.2/source/configure       2014-01-06 17:13:20.907249812 +0800
>  > ++++ icu-51.2.bak/source/configure   2014-01-06 17:12:57.335248659 +0800
>
> Please adjust configure.ac and set ICU_AUTORECONF = YES instead.

But, there is no configure.ac file in the icu source code.

Regards,

Sonic
>
> --
> Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code
  2014-01-22  9:18   ` Sonic Zhang
@ 2014-01-22  9:59     ` Peter Korsgaard
  2014-01-27  6:30     ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2014-01-22  9:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Sonic" == Sonic Zhang <sonic.adi@gmail.com> writes:

Hi,

 >> Thanks. Has this been submitted upstream?

 > Do you mean the icu source upstream? Not yet. Where do you prefer to
 > host this patch? in buildroot or icu project?

I would very much prefer if this gets included upstream in icu.


 >> > +--- icu-51.2/source/configure       2014-01-06 17:13:20.907249812 +0800
 >> > ++++ icu-51.2.bak/source/configure   2014-01-06 17:12:57.335248659 +0800
 >> 
 >> Please adjust configure.ac and set ICU_AUTORECONF = YES instead.

 > But, there is no configure.ac file in the icu source code.

Ahh, I didn't know. Ok, then.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code
  2014-01-22  9:18   ` Sonic Zhang
  2014-01-22  9:59     ` Peter Korsgaard
@ 2014-01-27  6:30     ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2014-01-27  6:30 UTC (permalink / raw)
  To: buildroot

On 22/01/14 10:18, Sonic Zhang wrote:
> Hi Peter,
>
> On Wed, Jan 15, 2014 at 5:52 AM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>>> "sonic" == sonic adi <sonic.adi@gmail.com> writes:
>>   > +--- icu-51.2/source/configure       2014-01-06 17:13:20.907249812 +0800
>>   > ++++ icu-51.2.bak/source/configure   2014-01-06 17:12:57.335248659 +0800
>>
>> Please adjust configure.ac and set ICU_AUTORECONF = YES instead.
>
> But, there is no configure.ac file in the icu source code.

  It is called configured.in in this package.

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-27  6:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-06 11:05 [Buildroot] [PATCH] package: icu: detect and add compiler symbol prefix to the assembly code sonic.adi at gmail.com
2014-01-14 21:52 ` Peter Korsgaard
2014-01-22  9:18   ` Sonic Zhang
2014-01-22  9:59     ` Peter Korsgaard
2014-01-27  6:30     ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.