Search
SailfishOS Open Build Service
>
Projects
>
home:LiuQian
>
cross-accel-mipsel
> fix-stable-debugtypes.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File fix-stable-debugtypes.patch of Package cross-accel-mipsel
This patch tweaks .debug_types generation to fix reproducible builds in binutils and probably other packages. It affects C++ code that has this kind of thing in a class definition: static const int sarmag = 8; static const char armag[sarmag]; The fixed patch doesn't try to checksum the contents of the array because they might be defined in another compilation unit, and the purpose of the checksum is to unify debug info across compilation units. Richard Braakman richard.braakman@jollamobile.com --- gcc-linaro-4.6-2013.01/gcc/dwarf2out.c 2013-01-15 10:27:09.000000000 +0200 +++ patched-gcc/gcc/dwarf2out.c 2013-06-25 21:45:21.932110768 +0300 @@ -9043,8 +9043,11 @@ case dw_val_class_vec: CHECKSUM_ULEB128 (DW_FORM_block); - CHECKSUM_ULEB128 (sizeof (at->dw_attr_val.v.val_vec)); - CHECKSUM (at->dw_attr_val.v.val_vec); + /* Don't checksum all of val_vec because it contains a pointer. */ + CHECKSUM_ULEB128 (sizeof (at->dw_attr_val.v.val_vec.length) + + sizeof (at->dw_attr_val.v.val_vec.elt_size)); + CHECKSUM (at->dw_attr_val.v.val_vec.length); + CHECKSUM (at->dw_attr_val.v.val_vec.elt_size); break; case dw_val_class_flag: