diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf')
4 files changed, 308 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch new file mode 100644 index 000000000..effe25c85 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch @@ -0,0 +1,123 @@ +From ab00d6f5793b2d850f975bcb6d5d0aa6d7a9eaa4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 22 Apr 2017 12:34:37 -0700 +Subject: [PATCH] configure: Disable format-overflow if supported by gcc + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 6 ++-- + configure.ac | 2 ++ + m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 79 insertions(+), 3 deletions(-) + create mode 100644 m4/ax_check_compile_flag.m4 + +Index: opensaf-5.18.02/Makefile.am +=================================================================== +--- opensaf-5.18.02.orig/Makefile.am ++++ opensaf-5.18.02/Makefile.am +@@ -52,10 +52,10 @@ AM_CPPFLAGS = \ + -pthread \ + -D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \ + $(CORE_INCLUDES) \ +- $(all_includes) ++ $(all_includes) @NOWARNINGS@ + +-AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror +-AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror ++AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@ ++AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@ + + if ENABLE_GCOV + AM_CFLAGS += --coverage +Index: opensaf-5.18.02/configure.ac +=================================================================== +--- opensaf-5.18.02.orig/configure.ac ++++ opensaf-5.18.02/configure.ac +@@ -593,6 +593,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then + fi + AC_SUBST(OSAF_HARDEN_FLAGS) + ++AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow]) ++AC_SUBST(NOWARNINGS) + ############################################# + # List the output Makefiles + ############################################# +Index: opensaf-5.18.02/m4/ax_check_compile_flag.m4 +=================================================================== +--- /dev/null ++++ opensaf-5.18.02/m4/ax_check_compile_flag.m4 +@@ -0,0 +1,74 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the current language's compiler ++# or gives an error. (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the current language's default ++# flags (e.g. CFLAGS) when the check is done. The check is thus made with ++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to ++# force the compiler to issue an error when a bad flag is given. ++# ++# INPUT gives an alternative input source to AC_COMPILE_IFELSE. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> ++# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see <https://www.gnu.org/licenses/>. ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 5 ++ ++AC_DEFUN([AX_CHECK_COMPILE_FLAG], ++[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF ++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl ++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) ++AS_VAR_IF(CACHEVAR,yes, ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_COMPILE_FLAGS diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch new file mode 100644 index 000000000..5756a027b --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch @@ -0,0 +1,29 @@ +From 6248b717b4861d16b80235fd8e57d64e4f636428 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 13 Apr 2017 17:39:07 -0700 +Subject: [PATCH] configure: Pass linker specific options with -Wl + +This helps make it pass the options to linker correctly +and we can use non-gcc compilers + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index df4fc58..02771c6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -553,7 +553,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then + if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then + OSAF_HARDEN_FLAGS="" + fi +- OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -zrelro -znow" ++ OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now" + fi + AC_SUBST(OSAF_HARDEN_FLAGS) + +-- +2.12.2 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch new file mode 100644 index 000000000..76c47c658 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch @@ -0,0 +1,34 @@ +From 508ea7c0d67243feb1684eaa83569cb687561d64 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 15 Sep 2017 10:09:03 -0700 +Subject: [PATCH] immpbe_dump.cc: Use sys/wait.h instead of wait.h + +Fixes +redirecting incorrect #include <wait.h> to <sys/wait.h> + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/imm/common/immpbe_dump.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/imm/common/immpbe_dump.cc b/src/imm/common/immpbe_dump.cc +index 100222f37..33e47ce3c 100644 +--- a/src/imm/common/immpbe_dump.cc ++++ b/src/imm/common/immpbe_dump.cc +@@ -26,12 +26,12 @@ + #include <stdlib.h> + #include <stdio.h> + #include <time.h> +-#include <wait.h> + #include <unistd.h> + #include <iostream> + #include <sstream> + #include <stdint.h> + #include <sys/stat.h> ++#include <sys/wait.h> + #include <libgen.h> + + #include <saAis.h> +-- +2.14.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch new file mode 100644 index 000000000..4a2a825f9 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch @@ -0,0 +1,122 @@ +From 6442b57a855e273aa5a3d93e8596783cea128073 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 15 Sep 2017 09:39:40 -0700 +Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX + +Use _GNU_SOURCE instead of libc internal __USE_GNU +Do not use the deprecated headers under include/sys + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/base/os_defs.h | 5 +++-- + src/mds/mds_dt_tcp.c | 1 - + src/mds/mds_dt_tcp_disc.h | 2 +- + src/mds/mds_dt_tipc.c | 1 - + src/mds/mds_dt_tipc.h | 2 +- + src/mds/mds_dt_trans.c | 1 - + src/ntf/ntfd/NtfLogger.cc | 2 +- + 7 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/src/base/os_defs.h b/src/base/os_defs.h +index 50a9bf5fc..af6842863 100644 +--- a/src/base/os_defs.h ++++ b/src/base/os_defs.h +@@ -47,17 +47,18 @@ + #include <sys/stat.h> + #include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */ + #include <syslog.h> +-#ifndef __USE_GNU ++#include <limits.h> ++#ifndef _GNU_SOURCE + struct msgbuf { + long int mtype; + char mtext[1]; + }; + #endif /* else defined in <sys/msg.h> */ + #include <sys/time.h> +-#include <sys/fcntl.h> + #include <sys/socket.h> + #include <netinet/in.h> + ++#include <fcntl.h> + #include <signal.h> + #include <pthread.h> + +diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c +index 1407eb1ab..a87c22faa 100644 +--- a/src/mds/mds_dt_tcp.c ++++ b/src/mds/mds_dt_tcp.c +@@ -27,7 +27,6 @@ + + #include <stdlib.h> + #include <sched.h> +-#include <sys/poll.h> + #include <poll.h> + #include <sys/types.h> + #include <unistd.h> +diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h +index a6249d73e..574f52681 100644 +--- a/src/mds/mds_dt_tcp_disc.h ++++ b/src/mds/mds_dt_tcp_disc.h +@@ -24,7 +24,7 @@ + #include "base/ncssysf_tsk.h" + #include "base/ncssysf_mem.h" + #include "mds_dt_tcp_disc.h" +-#include "sys/poll.h" ++#include <poll.h> + + /* mds_indentifire + mds_version + msg_type + scope_type + server_type + + server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val + +diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c +index 37745e7f0..9b3255567 100644 +--- a/src/mds/mds_dt_tipc.c ++++ b/src/mds/mds_dt_tipc.c +@@ -35,7 +35,6 @@ + #include <stdbool.h> + #include <stdlib.h> + #include <sched.h> +-#include <sys/poll.h> + #include <poll.h> + #include <sys/types.h> + #include <unistd.h> +diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h +index e73a11b09..401d208c2 100644 +--- a/src/mds/mds_dt_tipc.h ++++ b/src/mds/mds_dt_tipc.h +@@ -32,7 +32,7 @@ + #include <assert.h> + #include <string.h> + #include <sys/param.h> +-#include <sys/poll.h> ++#include <poll.h> + #include <netdb.h> + #include <errno.h> + #include <fcntl.h> +diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c +index 6f621e04e..5aacbd33e 100644 +--- a/src/mds/mds_dt_trans.c ++++ b/src/mds/mds_dt_trans.c +@@ -26,7 +26,6 @@ + #include "mds_core.h" + #include "base/osaf_utility.h" + +-#include <sys/poll.h> + #include <poll.h> + + #define MDS_PROT_TCP 0xA0 +diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc +index 84014b578..31b1ccc6c 100644 +--- a/src/ntf/ntfd/NtfLogger.cc ++++ b/src/ntf/ntfd/NtfLogger.cc +@@ -20,7 +20,7 @@ + * INCLUDE FILES + * ======================================================================== + */ +-#include <sys/poll.h> ++#include <poll.h> + + #include "base/osaf_utility.h" + #include <saAis.h> +-- +2.14.1 + |