Skip to contentSkip to conversation

pegtl: Disable type-limits warning

PATCH New Khem Raj 1 participant 3 messages Aug 17, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 pegtl: Disable type-limits warning

gcc 10.2 warns with this
rep_one_min_max.hpp:40:26: error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits]

---
 meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb +2 -0
index 92741d8178..01233699a5 100644
@@ -10,3 +10,5 @@ SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=2.x \
 inherit cmake
 
 S = "${WORKDIR}/git"
+
+CXXFLAGS += " -Wno-error=type-limits"
Signature · 1 line
2.28.0
author
#1 lore raw

PATCH 2/3 opensaf: Fix build with -fno-common

---
 .../0001-Fix-build-with-fno-common.patch      | 311 ++++++++++++++++++
 .../opensaf/opensaf_5.20.05.bb                |   1 +
 2 files changed, 312 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch
meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch new file +311 -0
new file mode 100644
index 0000000000..b581c571bb
@@ -0,0 +1,311 @@
+From 9a46462f08535e946d97fd40c79229a7ee8b7336 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Aug 2020 00:00:00 -0700
+Subject: [PATCH] Fix build with -fno-common
+
+Mark the declarations with extern where needed in header files
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/ckpt/agent/cpa_cb.h   |  2 +-
+ src/ckpt/ckptd/cpd_init.h |  2 +-
+ src/evt/agent/eda.h       |  2 +-
+ src/evt/evtd/eds.h        |  2 +-
+ src/evt/evtd/eds_amf.c    |  2 ++
+ src/evt/evtd/eds_amf.h    |  2 +-
+ src/evt/evtd/eds_cb.h     |  2 +-
+ src/imm/immd/immd.h       |  2 +-
+ src/lck/lckd/gld_dl_api.h |  4 ++--
+ src/lck/lcknd/glnd_cb.h   |  4 ++--
+ src/mds/mds_core.h        | 34 +++++++++++++++++++---------------
+ src/mds/mds_dt_tcp.c      |  2 ++
+ src/mds/mds_dt_tcp.h      |  2 +-
+ src/mds/mds_main.c        |  2 +-
+ src/msg/msgnd/mqnd_db.h   |  2 +-
+ 15 files changed, 37 insertions(+), 29 deletions(-)
+
+diff --git a/src/ckpt/agent/cpa_cb.h b/src/ckpt/agent/cpa_cb.h
+index ac48c6c..d633583 100644
+--- a/src/ckpt/agent/cpa_cb.h
++++ b/src/ckpt/agent/cpa_cb.h
+@@ -119,7 +119,7 @@ typedef struct cpa_cb {
+ 
+ } CPA_CB;
+ 
+-uint32_t gl_cpa_hdl;
++extern uint32_t gl_cpa_hdl;
+ 
+ typedef struct cpa_prcess_evt_sync {
+   NCS_QELEM qelem;
+diff --git a/src/ckpt/ckptd/cpd_init.h b/src/ckpt/ckptd/cpd_init.h
+index 0c02642..cf3466b 100644
+--- a/src/ckpt/ckptd/cpd_init.h
++++ b/src/ckpt/ckptd/cpd_init.h
+@@ -33,7 +33,7 @@
+ #include <saAmf.h>
+ #include "cpd_cb.h"
+ 
+-uint32_t gl_cpd_cb_hdl;
++extern uint32_t gl_cpd_cb_hdl;
+ 
+ /* Macro to get the component name for the component type */
+ #define m_CPD_TASKNAME "CPD"
+diff --git a/src/evt/agent/eda.h b/src/evt/agent/eda.h
+index 4d1991c..138c910 100644
+--- a/src/evt/agent/eda.h
++++ b/src/evt/agent/eda.h
+@@ -39,7 +39,7 @@
+ #include "base/logtrace.h"
+ 
+ /* EDA CB global handle declaration */
+-uint32_t gl_eda_hdl;
++extern uint32_t gl_eda_hdl;
+ 
+ /* EDA Default MDS timeout value */
+ #define EDA_MDS_DEF_TIMEOUT 100
+diff --git a/src/evt/evtd/eds.h b/src/evt/evtd/eds.h
+index bc9c429..3545d77 100644
+--- a/src/evt/evtd/eds.h
++++ b/src/evt/evtd/eds.h
+@@ -72,6 +72,6 @@
+ #include "base/daemon.h"
+ 
+ /* EDS CB global handle declaration */
+-uint32_t gl_eds_hdl;
++extern uint32_t gl_eds_hdl;
+ 
+ #endif  // EVT_EVTD_EDS_H_
+diff --git a/src/evt/evtd/eds_amf.c b/src/evt/evtd/eds_amf.c
+index 97b71a5..adebf0c 100644
+--- a/src/evt/evtd/eds_amf.c
++++ b/src/evt/evtd/eds_amf.c
+@@ -30,6 +30,8 @@ stuff.
+ #include "eds.h"
+ #include "eds_dl_api.h"
+ 
++struct next_HAState nextStateInfo;
++
+ /* HA AMF statemachine & State handler definitions */
+ 
+ /****************************************************************************
+diff --git a/src/evt/evtd/eds_amf.h b/src/evt/evtd/eds_amf.h
+index e9aeaa6..f9803b4 100644
+--- a/src/evt/evtd/eds_amf.h
++++ b/src/evt/evtd/eds_amf.h
+@@ -49,7 +49,7 @@ uint32_t eds_quiesced_state_handler(EDS_CB *cb, SaInvocationT invocation);
+ struct next_HAState {
+   uint8_t nextState1;
+   uint8_t nextState2;
+-} nextStateInfo; /* AMF HA state can transit to a maximum of the two defined
++}; /* AMF HA state can transit to a maximum of the two defined
+                     states */
+ 
+ #define VALIDATE_STATE(curr, next)                  \
+diff --git a/src/evt/evtd/eds_cb.h b/src/evt/evtd/eds_cb.h
+index c127ead..19c48cd 100644
+--- a/src/evt/evtd/eds_cb.h
++++ b/src/evt/evtd/eds_cb.h
+@@ -40,7 +40,7 @@
+ #include "base/ncssysf_tmr.h"
+ 
+ /* global variables */
+-uint32_t gl_eds_hdl;
++extern uint32_t gl_eds_hdl;
+ 
+ struct eda_reg_list_tag;
+ 
+diff --git a/src/imm/immd/immd.h b/src/imm/immd/immd.h
+index 7dc1da6..bab3945 100644
+--- a/src/imm/immd/immd.h
++++ b/src/imm/immd/immd.h
+@@ -42,7 +42,7 @@
+ #include "immd_sbedu.h"
+ #include "base/ncs_mda_pvt.h"
+ 
+-IMMD_CB *immd_cb;
++extern IMMD_CB *immd_cb;
+ 
+ extern uint32_t initialize_for_assignment(IMMD_CB *cb, SaAmfHAStateT ha_state);
+ 
+diff --git a/src/lck/lckd/gld_dl_api.h b/src/lck/lckd/gld_dl_api.h
+index 6476a71..3a67fd1 100644
+--- a/src/lck/lckd/gld_dl_api.h
++++ b/src/lck/lckd/gld_dl_api.h
+@@ -33,7 +33,7 @@
+ #include "base/ncsgl_defs.h"
+ #include "base/ncs_lib.h"
+ 
+-uint32_t gl_gld_hdl;
+-uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info);
++extern uint32_t gl_gld_hdl;
++extern uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info);
+ 
+ #endif  // LCK_LCKD_GLD_DL_API_H_
+diff --git a/src/lck/lcknd/glnd_cb.h b/src/lck/lcknd/glnd_cb.h
+index 3b82f60..77a1f88 100644
+--- a/src/lck/lcknd/glnd_cb.h
++++ b/src/lck/lcknd/glnd_cb.h
+@@ -28,8 +28,8 @@ extern "C" {
+ #endif
+ 
+ /* global variables */
+-uint32_t gl_glnd_hdl;
+-NCSCONTEXT gl_glnd_task_hdl;
++extern uint32_t gl_glnd_hdl;
++extern NCSCONTEXT gl_glnd_task_hdl;
+ 
+ /* macros for the global varibales */
+ #define m_GLND_RETRIEVE_GLND_CB_HDL gl_glnd_hdl
+diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h
+index dad62cd..ed69d3a 100644
+--- a/src/mds/mds_core.h
++++ b/src/mds/mds_core.h
+@@ -26,6 +26,10 @@
+ #ifndef MDS_MDS_CORE_H_
+ #define MDS_MDS_CORE_H_
+ 
++#ifndef EXTERN
++#define EXTERN extern
++#endif
++
+ #include <pthread.h>
+ #include "base/ncsgl_defs.h"
+ #include "mds/mds_papi.h"
+@@ -600,65 +604,65 @@ extern "C" {
+ /* ******************************************** */
+ 
+ /* Initialization of MDTM Module */
+-uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref);
++EXTERN uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref);
+ 
+ /* Destroying the MDTM Module*/
+-uint32_t (*mds_mdtm_destroy)(void);
++EXTERN uint32_t (*mds_mdtm_destroy)(void);
+ 
+-uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req);
++EXTERN uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req);
+ 
+ /* SVC Install */
+-uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
++EXTERN uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+                                  NCSMDS_SCOPE_TYPE install_scope,
+                                  V_DEST_RL role, MDS_VDEST_ID vdest_id,
+                                  NCS_VDEST_TYPE vdest_policy,
+                                  MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver);
+ 
+ /* SVC Uninstall */
+-uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
++EXTERN uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+                                    NCSMDS_SCOPE_TYPE install_scope,
+                                    V_DEST_RL role, MDS_VDEST_ID vdest_id,
+                                    NCS_VDEST_TYPE vdest_policy,
+                                    MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver);
+ 
+ /* SVC Subscribe */
+-uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
++EXTERN uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+                                    NCSMDS_SCOPE_TYPE subscribe_scope,
+                                    MDS_SVC_HDL local_svc_hdl,
+                                    MDS_SUBTN_REF_VAL *subtn_ref_val);
+ 
+ /*  added svc_hdl */
+ /* SVC Unsubscribe */
+-uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
++EXTERN uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+                                      NCSMDS_SCOPE_TYPE subscribe_scope,
+                                      MDS_SUBTN_REF_VAL subtn_ref_val);
+ 
+ /* VDEST Install */
+-uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id);
++EXTERN uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id);
+ 
+ /* VDEST Uninstall */
+-uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id);
++EXTERN uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id);
+ 
+ /* VDEST Subscribe */
+-uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id,
++EXTERN uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id,
+                                      MDS_SUBTN_REF_VAL *subtn_ref_val);
+ 
+ /* VDEST Unsubscribe */
+-uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id,
++EXTERN uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id,
+                                        MDS_SUBTN_REF_VAL subtn_ref_val);
+ 
+ /* Tx Register (For incrementing the use count) */
+-uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest);
++EXTERN uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest);
+ 
+ /* Tx Unregister (For decrementing the use count) */
+-uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest);
++EXTERN uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest);
+ 
+ /* Node subscription */
+-uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl,
++EXTERN uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl,
+                                     MDS_SUBTN_REF_VAL *subtn_ref_val);
+ 
+ /* Node unsubscription */
+-uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val);
++EXTERN uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val);
+ 
+ #ifdef __cplusplus
+ }
+diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
+index 4a37246..e73cef4 100644
+--- a/src/mds/mds_dt_tcp.c
++++ b/src/mds/mds_dt_tcp.c
+@@ -70,6 +70,8 @@ NCS_PATRICIA_TREE mdtm_reassembly_list;
+ 
+ /* Get the pid of the process */
+ pid_t mdtm_pid;
++  
++MDTM_TCP_CB *tcp_cb;
+ 
+ static void mds_mdtm_enc_init(MDS_MDTM_DTM_MSG *init, uint8_t *buff);
+ static uint32_t mdtm_create_rcv_task(void);
+diff --git a/src/mds/mds_dt_tcp.h b/src/mds/mds_dt_tcp.h
+index 1065464..350d534 100644
+--- a/src/mds/mds_dt_tcp.h
++++ b/src/mds/mds_dt_tcp.h
+@@ -50,7 +50,7 @@ typedef struct mdtm_tcp_cb {
+ 
+ } MDTM_TCP_CB;
+ 
+-MDTM_TCP_CB *tcp_cb;
++extern MDTM_TCP_CB *tcp_cb;
+ 
+ typedef enum mds_mdtm_dtm_msg_types {
+   MDS_MDTM_DTM_PID_TYPE = 1,
+diff --git a/src/mds/mds_main.c b/src/mds/mds_main.c
+index 0bcb2f9..5671ed3 100644
+--- a/src/mds/mds_main.c
++++ b/src/mds/mds_main.c
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #include "osaf/configmake.h"
+-
++#define EXTERN
+ /*****************************************************************************
+ ..............................................................................
+ 
+diff --git a/src/msg/msgnd/mqnd_db.h b/src/msg/msgnd/mqnd_db.h
+index b78024e..fee43e5 100644
+--- a/src/msg/msgnd/mqnd_db.h
++++ b/src/msg/msgnd/mqnd_db.h
+@@ -33,7 +33,7 @@
+ #include <saClm.h>
+ #include <saImmOi.h>
+ /* Decleration for global variable */
+-uint32_t gl_mqnd_cb_hdl;
++extern uint32_t gl_mqnd_cb_hdl;
+ 
+ /* Macros for reading global database */
+ #define m_MQND_STORE_HDL(hdl) (gl_mqnd_cb_hdl = (hdl))
+-- 
+2.28.0
+
meta-networking/recipes-daemons/opensaf/opensaf_5.20.05.bb +1 -0
index f11df49f86..bd972e3466 100644
@@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
            file://0001-Add-configure-time-check-for-gettid-API.patch \
            file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
            file://0001-immom_python-convert-to-python3.patch \
+           file://0001-Fix-build-with-fno-common.patch \
            "
 SRC_URI[md5sum] = "d56bacf4c234c134e60e9b25f6f26671"
 SRC_URI[sha256sum] = "2478e298c0bce3b2cfdeb20875022cc11d7d3b53ecd3255422d22eb64c04953b"
Signature · 1 line
2.28.0
author
#2 lore raw

PATCH 3/3 crash: Fix arm64 build with -fno-common

In reply to Khem Raj
---
 ...-gcc-10-compilation-error.-Without-t.patch | 54 +++++++++++++++++++
 meta-oe/recipes-kernel/crash/crash_7.2.8.bb   |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/crash/crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch
meta-oe/recipes-kernel/crash/crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch new file +54 -0
new file mode 100644
index 0000000000..c946444388
@@ -0,0 +1,54 @@
+From 0dddb4e1158705345b7f4f71635d42c89e1b0c8f Mon Sep 17 00:00:00 2001
+From: Dave Anderson <[email protected]>
+Date: Fri, 31 Jan 2020 17:11:46 -0500
+Subject: [PATCH] Fix for an ARM64 gcc-10 compilation error.  Without the
+ patch, the build of the embedded gdb module fails with an error message that
+ indicates "multiple definition of 'tdesc_aarch64'". ([email protected])
+
+Upstream-Status: Backport [https://github.com/crash-utility/crash/commit/e770735200c02ac2414c394ea6ec5f7f033efe64]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ gdb-7.6.patch | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/gdb-7.6.patch b/gdb-7.6.patch
+index f6c311d..f64b55f 100644
+--- a/gdb-7.6.patch
++++ b/gdb-7.6.patch
+@@ -2471,3 +2471,33 @@ diff -up gdb-7.6/opcodes/configure.orig gdb-7.6/opcodes/configure
+  #else
+  # error "!__i386__ && !__x86_64__"
+  #endif
++--- gdb-7.6/gdb/features/aarch64.c.orig
+++++ gdb-7.6/gdb/features/aarch64.c
++@@ -5,7 +5,6 @@
++ #include "osabi.h"
++ #include "target-descriptions.h"
++ 
++-struct target_desc *tdesc_aarch64;
++ static void
++ initialize_tdesc_aarch64 (void)
++ {
++--- gdb-7.6/gdb/aarch64-linux-nat.c.orig
+++++ gdb-7.6/gdb/aarch64-linux-nat.c
++@@ -37,6 +37,7 @@
++ 
++ #include "gregset.h"
++ 
+++extern struct target_desc *tdesc_aarch64;
++ #include "features/aarch64.c"
++ 
++ /* Defines ps_err_e, struct ps_prochandle.  */
++--- gdb-7.6/gdb/aarch64-tdep.c.orig
+++++ gdb-7.6/gdb/aarch64-tdep.c
++@@ -52,6 +52,7 @@
++ #include "gdb_assert.h"
++ #include "vec.h"
++ 
+++struct target_desc *tdesc_aarch64;
++ #include "features/aarch64.c"
++ #include "features/aarch64-without-fpu.c"
++ 
+-- 
+2.28.0
+
meta-oe/recipes-kernel/crash/crash_7.2.8.bb +1 -0
index 834c92cc46..6e2533635b 100644
@@ -25,6 +25,7 @@ SRC_URI = "git://github.com/crash-utility/${BPN}.git \
            file://remove-unrecognized-gcc-option-m32-for-mips.patch \
            file://0002-crash-fix-build-error-unknown-type-name-gdb_fpregset.patch \
            file://0003-crash-detect-the-sysroot-s-glibc-header-file.patch \
+           file://0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch \
            "
 SRCREV = "24f4801f8c8871a2e3e660fe9fa8fdd86bb29876"
 
Signature · 1 line
2.28.0