diff options
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch')
-rw-r--r-- | meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch b/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch deleted file mode 100644 index bfdb29b593..0000000000 --- a/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Workaround a problem with the C++ global constructors on ARM. | ||
4 | |||
5 | As documented in the Yocto Bugzilla bug 938, the global constructors | ||
6 | that define DEF_BUILTIN [const IdString _foo ( "foo" );] are not running | ||
7 | before the usage of _foo during the initialization of the compatibility | ||
8 | table. | ||
9 | |||
10 | The patch, along with a similar change to the recipe generation of the | ||
11 | oe-arch.h file, remove the DEF_BUILTIN globals and replace them with | ||
12 | immediate strings wherever they are used. | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
15 | |||
16 | Index: git/zypp/Arch.cc | ||
17 | =================================================================== | ||
18 | --- git.orig/zypp/Arch.cc 2011-08-04 21:03:31.000000000 -0700 | ||
19 | +++ git/zypp/Arch.cc 2011-08-04 21:04:16.635480895 -0700 | ||
20 | @@ -152,13 +152,10 @@ | ||
21 | // NOTE: Thake care CompatBits::IntT is able to provide one | ||
22 | // bit for each architecture. | ||
23 | // | ||
24 | -#define DEF_BUILTIN(A) const IdString _##A( #A ); | ||
25 | - DEF_BUILTIN( all ); | ||
26 | - DEF_BUILTIN( any ); | ||
27 | - DEF_BUILTIN( noarch ); | ||
28 | +/* Global constructors are not working properly on ARM, avoid the | ||
29 | + * known bad case and merge constructors in with the usages | ||
30 | + */ | ||
31 | |||
32 | -#include "oe-arch.h" | ||
33 | -#undef DEF_BUILTIN | ||
34 | |||
35 | /////////////////////////////////////////////////////////////////// | ||
36 | // | ||
37 | @@ -227,9 +224,9 @@ | ||
38 | // _noarch must have _idBit 0. | ||
39 | // Other builtins have 1-bit set | ||
40 | // and are initialized done on the fly. | ||
41 | - _compatSet.insert( Arch::CompatEntry( _all, 0 ) ); | ||
42 | - _compatSet.insert( Arch::CompatEntry( _any, 0 ) ); | ||
43 | - _compatSet.insert( Arch::CompatEntry( _noarch, 0 ) ); | ||
44 | + _compatSet.insert( Arch::CompatEntry( IdString ( "all" ), 0 ) ); | ||
45 | + _compatSet.insert( Arch::CompatEntry( IdString ( "any" ), 0 ) ); | ||
46 | + _compatSet.insert( Arch::CompatEntry( IdString ( "noarch" ), 0 ) ); | ||
47 | /////////////////////////////////////////////////////////////////// | ||
48 | // Define the CompatibleWith relation: | ||
49 | // | ||
50 | @@ -331,9 +328,9 @@ | ||
51 | /////////////////////////////////////////////////////////////////// | ||
52 | |||
53 | const Arch Arch_empty ( IdString::Empty ); | ||
54 | - const Arch Arch_all( _all ); | ||
55 | - const Arch Arch_any( _any ); | ||
56 | - const Arch Arch_noarch( _noarch ); | ||
57 | + const Arch Arch_all( IdString ( "all" ) ); | ||
58 | + const Arch Arch_any( IdString ( "any" ) ); | ||
59 | + const Arch Arch_noarch( IdString ( "noarch" ) ); | ||
60 | |||
61 | #define OE_PROTO 1 | ||
62 | #include "oe-arch.h" | ||
63 | @@ -345,7 +342,7 @@ | ||
64 | // METHOD TYPE : Ctor | ||
65 | // | ||
66 | Arch::Arch() | ||
67 | - : _entry( &ArchCompatSet::instance().assertDef( _noarch ) ) | ||
68 | + : _entry( &ArchCompatSet::instance().assertDef( IdString ( "noarch" ) ) ) | ||
69 | {} | ||
70 | |||
71 | Arch::Arch( IdString::IdType id_r ) | ||