[oe] [meta-oe][PATCH 2/2] openocd: Fix build on x86_64

Adrian Bunk bunk at stusta.de
Tue May 21 07:19:28 UTC 2019


On Mon, May 20, 2019 at 11:55:29PM -0700, Khem Raj wrote:
>...
> +Fixes
> +| src/flash/nor/esirisc_flash.c:95:9: error: 'PAGE_SIZE' macro redefined [-Werror,-Wmacro-redefined]
> +| #define PAGE_SIZE                       4096
> +|         ^
> +| /mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/openocd/0.10+gitrAUTOINC+7ee618692f-r0/recipe-sysroot/usr/inclu
> +de/limits.h:89:9: note: previous definition is here
> +| #define PAGE_SIZE PAGESIZE
>...
> +--- a/src/flash/nor/esirisc_flash.c
> ++++ b/src/flash/nor/esirisc_flash.c
> +@@ -92,7 +92,9 @@
> + #endif
> + 
> + #define CONTROL_TIMEOUT		5000		/* 5s    */
> ++#ifndef PAGE_SIZE
> + #define PAGE_SIZE			4096
> ++#endif
> + #define PB_MAX				32
>...

Are you sure this is correct?
This looks like two completely unrelated defines that just happen to 
have the same name.
And it worked by chance since they have the same value on x86_64.

Renaming to something like ESIRISC_PAGE_SIZE would be a proper fix.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



More information about the Openembedded-devel mailing list