[Buildroot] [PATCH] pcre2: add patch fixing a build issue on m68k

Peter Korsgaard peter at korsgaard.com
Tue Feb 27 09:29:49 UTC 2018


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at bootlin.com> writes:

Hi,

 > A pretty nasty difference in alignment rules between most
 > architectures and m68k lead pcre2 to fail building its 16-bit and
 > 32-bit variants on m68k. This commit adds a patch that fixes that.

 > +Index: src/pcre2_intmodedep.h
 > +===================================================================
 > +--- a/src/pcre2_intmodedep.h	(revision 923)
 > ++++ b/src/pcre2_intmodedep.h	(working copy)
 > +@@ -797,8 +797,10 @@
 > +   PCRE2_UCHAR occu[6];       /* Used for other case code units */
 > + #elif PCRE2_CODE_UNIT_WIDTH == 16
 > +   PCRE2_UCHAR occu[2];       /* Used for other case code units */
 > ++  uint8_t     unused[2];     /* Ensure 32 bit alignment */
 > + #else
 > +   PCRE2_UCHAR occu[1];       /* Used for other case code units */
 > ++  uint8_t     unused[2];     /* Ensure 32 bit alignment */

I haven't looked at the code, but doesn't this #else refer to the 32bit
variant, which may require 4 byte alignment depending on architecture,
so the 2 bytes padding you are adding would cause eptr to move to offset
0x3c instead of 0x38?

That in itself may not be an issue, but it is a change of behaviour.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list