All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] icu: Delete inapropriate flag at link
Date: Sat, 21 Jun 2014 19:14:59 +0200	[thread overview]
Message-ID: <20140621191459.7a124206@free-electrons.com> (raw)
In-Reply-To: <53A4A737.9070304@mind.be>

Dear Arnout Vandecappelle,

On Fri, 20 Jun 2014 23:27:19 +0200, Arnout Vandecappelle wrote:

>  I don't see how -nostdlib -nodefaultlibs could have that effect - especially in
> buildroot, where we always force the abi. Do you have an example configuration
> where this happens?

Yes:

BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_EABIHF=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_ICU=y

With this configuration, all libraries are properly built EABIhf. For
example, libicutu.so:

$ LANG=C arm-linux-gnueabihf-readelf -A output/target/usr/lib/libicutu.so.51.2 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6
  Tag_Virtualization_use: TrustZone

However, libicudata.so is not built properly:

$ LANG=C arm-linux-gnueabihf-readelf -A output/target/usr/lib/libicudata.so.51.2 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "Cortex-A8"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3-D16
  Tag_Virtualization_use: TrustZone

I was actually with Maxime in Paris a couple of weeks ago to debug this
issue. He had a Qt application that was not starting properly due to
this problem, because the dynamic library loader was refusing to load
the libicudata library. After applying the patch for Debian to remove
the problematic flags and rebuilding icu, we were able to start his Qt
application with no problem.

Also, the Debian changelog is pretty clear about what they've done, and
explicitly mentions the armhf problem. From
http://metadata.ftp-master.debian.org/changelogs//main/i/icu/icu_52.1-3_changelog:

icu (4.8.1.1-2) unstable; urgency=low

  * debian/patches/icudata-stdlibs.patch: Link stdlibs to libicudata so we
    get reasonably sane ELF headers on armhf.  Thanks Adam Conrad
    <adconrad@ubuntu.com>.  (Closes: #653457)

 -- Jay Berkenbilt <qjb@debian.org>  Wed, 04 Jan 2012 09:52:11 -0500

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653457 for
more details.

Hopefully, these details will be enough to justify the patch. Though I
agree with you that Maxime's description of the patch should have been
more detailed.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2014-06-21 17:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 16:13 [Buildroot] [PATCH 1/2] icu: Delete inapropriate flag at link Maxime Hadjinlian
2014-06-19 16:13 ` [Buildroot] [PATCH 2/2] devmem2: fix output when _FILE_OFFSET_BITS=64 Maxime Hadjinlian
2014-06-29 10:43   ` Thomas Petazzoni
2014-06-29 14:31     ` Thomas Petazzoni
2014-06-20 21:27 ` [Buildroot] [PATCH 1/2] icu: Delete inapropriate flag at link Arnout Vandecappelle
2014-06-21 10:51   ` Maxime Hadjinlian
2014-06-21 17:14   ` Thomas Petazzoni [this message]
2014-06-24 18:06     ` Arnout Vandecappelle
2014-06-29 10:48 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140621191459.7a124206@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.