AnsweredAssumed Answered

linux-qoriq LSDK 1812 build failed by gcc8

Question asked by lei maohui on Jan 10, 2019

I tried build kernel(lsdk 1812) by gcc8 for ls1046a, and got error message as following. Is there any patch to fix this issue?

-------------------------------------------------

 

 from drivers/staging/fsl_qbman/dpa_alloc.c:32:

./include/linux/fsl_qman.h:415:1: error: alignment 1 of ‘struct qm_eqcr_entry’ is less than 8 [-Werror=packed-not-aligned]  } __packed;  ^

./include/linux/fsl_qman.h:469:3: error: alignment 1 of ‘struct <anonymous>’ is less than 8 [-Werror=packed-not-aligned]

   } __packed ern;

   ^

./include/linux/fsl_qman.h:468:17: error: ‘fd’ offset 15 in ‘struct <anonymous>’ isn’t aligned to 8  -Werror=packed-not-aligned]

    struct qm_fd fd;

                 ^~

./include/linux/fsl_qman.h:486:3: error: alignment 1 of ‘struct <anonymous>’ is less than 8 [-Werror=packed-not-aligned]

   } __packed dcern;

   ^

./include/linux/fsl_qman.h:485:17: error: ‘fd’ offset 15 in ‘struct <anonymous>’ isn’t aligned to 8  -Werror=packed-not-aligned]

    struct qm_fd fd;

                 ^~

./include/linux/fsl_qman.h:1679:1: error: alignment 1 of ‘struct qm_mcr_ceetm_cq_peek_pop_xsfdrread’ is less than 8 [-Werror=packed-not-aligned]  } __packed;  ^

./include/linux/fsl_qman.h:1677:15: error: ‘fd’ offset 14 in ‘struct qm_mcr_ceetm_cq_peek_pop_xsfdrread’ isn’t aligned to 8 [-Werror=packed-not-aligned]

 

drivers/staging/fsl_qbman/qman_config.c:815:29: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
if ((qman_ip_rev & 0xFF00) == QMAN_REV31) {
^~

 

 

Refreence to http://patchwork.dpdk.org/patch/39666/ , I made a patch 0001-To-fix-build-error-for-gcc8.patch. Although build error is gone, but board can't start.

Outcomes