Bug 74490 - check-static-inits.sh failure on alpha/armel/hppa/mips/mipsel/s390x/sparc
Summary: check-static-inits.sh failure on alpha/armel/hppa/mips/mipsel/s390x/sparc
Status: RESOLVED FIXED
Alias: None
Product: HarfBuzz
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Behdad Esfahbod
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 06:44 UTC by Pino Toscano
Modified: 2014-04-09 23:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Ignore libgcc bit operations functions (425 bytes, text/plain)
2014-02-04 06:44 UTC, Pino Toscano
Details

Description Pino Toscano 2014-02-04 06:44:49 UTC
Created attachment 93338 [details]
Ignore libgcc bit operations functions

When enabling the execution of the tests of harfbuzz 0.9.26 at build time in Debian, check-static-inits.sh failed on some architectures (alpha, armel, hppa, mips, mipsel, s390x, and sparc).
The failure logs were like the following (taken from a s390x build):
  Checking that no object file has static initializers
  Checking that no object file has lazy static C++ constructors/destructors or other such stuff
  0000000000000000         *UND*  0000000000000000 __ctzdi2
  Ouch, .libs/libharfbuzz_la-hb-ot-layout.o has lazy static C++ constructors/destructors or other such stuff
  0000000000000000         *UND*  0000000000000000 __clzdi2
  Ouch, .libs/libharfbuzz_la-hb-ot-map.o has lazy static C++ constructors/destructors or other such stuff

It seems like it is mistaking four functions (__clzdi2, __ctzdi2, __clzsi2, __ctzsi2) as if they were C++ stuff. Searching around gave me an old documentation [1] which seems to indicate that these are internal libgcc symbols for bit operations.

Hence, I'm proposing to ignore them; patch attached for it.

[1] http://soc.if.usp.br/manual/gcc-4.1-doc/gccint.html#Integer-library-routines
Comment 1 Behdad Esfahbod 2014-04-09 23:34:31 UTC
Fix differently.  Thanks.

Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed Apr 9 16:33:32 2014 -0700

    Tighten up check-static-inits.sh check
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=74490

diff --git a/src/check-static-inits.sh b/src/check-static-inits.sh
index bb0a7ff..83d02c8 100755
--- a/src/check-static-inits.sh
+++ b/src/check-static-inits.sh
@@ -30,7 +30,7 @@ done
 
 echo "Checking that no object file has lazy static C++ constructors/destructors or other such stu
 for obj in $OBJS; do
-       if objdump -t "$obj" | grep '__c'; then
+       if objdump -t "$obj" | grep '__cxa_'; then


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.