Harfbuzz does not link with gcc 4.2.1 (maemo5 fremantle)

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
6 years ago
6 years ago

People

(Reporter: romaxa, Unassigned)

Tracking

Trunk
ARM
Maemo
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 639392 [details] [diff] [review]
Build with gcc 4.2.x

Community SSU trying to build fennec for N900 because it is only modern available option for N900. I tried to build recent tip and got this error:

/home/scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/arm-none-linux-gnueabi-ld: libxul.so: hidden symbol `int SortedArrayOf<RangeRecord>::search<unsigned int>(unsigned int const&) const' isn't defined
/home/scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/arm-none-linux-gnueabi-ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [libxul.so] Error 1

I've noticed that this stuff got removed from trunk with some update
http://hg.mozilla.org/mozilla-central/rev/392319d8c1fa#l55.411

and that was making it compile with that compiler.
Attachment #639392 - Flags: feedback?(jfkthame)
Comment on attachment 639392 [details] [diff] [review]
Build with gcc 4.2.x

Review of attachment 639392 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/harfbuzz/src/hb-open-type-private.hh
@@ +685,5 @@
> +#if __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
> +// work around GCC 4.3 bug where the search() function gets improperly
> +// optimized away from some instantiations of this template
> +#pragma GCC visibility push(default)
> +#endif

Would it make sense to do "#pragma GCC visibility pop" later, to minimize the effect of this?
Comment on attachment 639392 [details] [diff] [review]
Build with gcc 4.2.x

Behdad, is this something you'd be willing to take upstream, if it fixes the compilation problem with some older gcc versions?
Attachment #639392 - Flags: review?(mozilla)

Comment 3

6 years ago
Jonathan,

I'm adding -fvisibility-inlines-hidden to the build.  Can you check whether that would fix the issue?

If not, yes, I'm fine with it, if done with the matching pop (which is available in the change pointed to in the original report.)

Updated

6 years ago
Duplicate of this bug: 732340
romaxa, is this still a problem now that bug 780409 has landed, or have the changes there resolved it?

Comment 6

6 years ago
Jonathan, did you also add the -fvisibility-inlines-hidden flag to the build?
(Reporter)

Comment 7

6 years ago
I'll try to recompile and will check it soon
(Reporter)

Comment 8

6 years ago
Yep, with bug 780409 landed problem not reproducible anymore.
Thanks
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
Attachment #639392 - Flags: review?(mozilla)
Attachment #639392 - Flags: feedback?(jfkthame)
You need to log in before you can comment on or make changes to this bug.