Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
32ab028680
!22 [sync] PR-18: Workaround -Wstringop-truncation error for loongarch64
From: @openeuler-sync-bot 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
2025-02-11 02:01:01 +00:00
Wenlong Zhang
522fc42b27 Workaround -Wstringop-truncation error for loongarch64
(cherry picked from commit c57710b32d453f6e2314550e4942029465650e5c)
2025-02-11 09:51:06 +08:00
openeuler-ci-bot
0beaf70310
!13 riscv64:解决-Werror=stringop-truncation构建失败
From: @laokz 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-10-16 02:57:27 +00:00
laokz
42b59db319 riscv64: Workaround -Wstringop-truncation error
On riscv64, the compiler complained:

     In file included from /usr/include/string.h:548,
                      from omxregister.c:42:
     In function 'strncpy',
         inlined from 'showComponentsList' at omxregister.c:110:3,
         inlined from 'main' at omxregister.c:463:9:
     /usr/include/bits/string_fortified.h:95:10: error: '__builtin_strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
        95 |   return __builtin___strncpy_chk (__dest, __src, __len,
           |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        96 |                                   __glibc_objsize (__dest));
           |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
     cc1: all warnings being treated as errors

It seems that the -O optimization to generate arch assemblies
leads to different behavior between riscv and arm, x86.
Add -Wno-stringop-truncation CFLAGS to workaround the problem.
2023-10-06 11:51:44 +08:00
openeuler-ci-bot
41df89f615
!12 Fix build failure caused by gcc upgrade to 12.3.1
From: @starlet-dx 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-07-15 02:19:00 +00:00
starlet-dx
a0bd8fef12 Fix build failure caused by gcc upgrade to 12.3.1 2023-07-15 09:49:37 +08:00
openeuler-ci-bot
d85b6f0222 !4 fix compile failure by update GCC-10
From: @luweitao_y
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
2021-08-14 06:46:02 +00:00
Lu Weitao
f9c873909b fix compile failure by GCC-10
Signed-off-by: Lu Weitao <luweitaobe@163.com>
2021-08-10 15:29:23 +08:00
openeuler-ci-bot
0162ac4b62 !2 Add yaml file
Merge pull request !2 from lyn/master
2020-05-09 15:27:23 +08:00
lyn1001
be1b9bd569 Add yaml file 2020-05-07 14:15:45 +08:00
5 changed files with 92 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Subject: fix FTBFS with GCC-11
We need to malloc line before using it.
Bug-Debian: http://bugs.debian.org/984195
Index: libomxil-bellagio-0.9.3/src/core_extensions/OMXCoreRMExt.c
===================================================================
--- libomxil-bellagio-0.9.3.orig/src/core_extensions/OMXCoreRMExt.c
+++ libomxil-bellagio-0.9.3/src/core_extensions/OMXCoreRMExt.c
@@ -169,6 +169,7 @@ OMX_ERRORTYPE readRegistryFile() {
}
free(registry_filename);
libname = malloc(OMX_MAX_STRINGNAME_SIZE * 2);
+ line = malloc(MAX_LINE_LENGTH+1);
fseek(omxregistryfp, 0, 0);
while(1) {
@@ -193,7 +194,6 @@ OMX_ERRORTYPE readRegistryFile() {
fseek(omxregistryfp, 0, 0);
qualityList = malloc(numberOfLines * sizeof (stLoaderComponentType*));
qualityListItems = numberOfLines;
- line = malloc(MAX_LINE_LENGTH);
listindex = 0;
while(1) {

33
fix-multi-define.patch Normal file
View File

@ -0,0 +1,33 @@
diff -urN ./src/omx_reference_resource_manager.c ./src/omx_reference_resource_manager.c
--- ./src/omx_reference_resource_manager.c 2021-08-05 18:44:02.502180627 +0800
+++ ./src/omx_reference_resource_manager.c 2021-08-05 18:47:24.151838514 +0800
@@ -30,6 +30,11 @@
#include "base/omx_base_component.h"
#include "queue.h"
+int globalIndex;
+NameIndexType *listOfcomponentRegistered;
+ComponentListType **globalComponentList;
+ComponentListType **globalWaitingComponentList;
+
/**
* This is the static base pointer of the list
*/
diff -urN ./src/omx_reference_resource_manager.h ./src/omx_reference_resource_manager.h
--- ./src/omx_reference_resource_manager.h 2011-01-12 15:53:26.000000000 +0800
+++ ./src/omx_reference_resource_manager.h 2021-08-05 18:46:51.663571188 +0800
@@ -49,10 +49,10 @@
};
-int globalIndex;
-NameIndexType *listOfcomponentRegistered;
-ComponentListType **globalComponentList;
-ComponentListType **globalWaitingComponentList;
+extern int globalIndex;
+extern NameIndexType *listOfcomponentRegistered;
+extern ComponentListType **globalComponentList;
+extern ComponentListType **globalWaitingComponentList;
OMX_ERRORTYPE RM_RegisterComponent(char *name, int max_components);
OMX_ERRORTYPE addElemToList(ComponentListType **list, OMX_COMPONENTTYPE *openmaxStandComp, int index, OMX_BOOL bIsWaiting);

View File

@ -0,0 +1,12 @@
diff -urN ./src/omx_create_loaders_linux.c ./src/omx_create_loaders_linux.c
--- ./src/omx_create_loaders_linux.c 2011-05-20 13:28:17.000000000 +0800
+++ ./src/omx_create_loaders_linux.c 2021-08-05 18:45:57.607126826 +0800
@@ -95,7 +95,7 @@
if (isFileExisting) {
loaderFP = fopen(omxloader_registry_filename, "r");
// dlopen all loaders defined in .omxloaders file
- libraryFileName = malloc(MAX_LINE_LENGTH);
+ libraryFileName = malloc(MAX_LINE_LENGTH + 1);
while(1) {
index_readline = 0;
while(index_readline < MAX_LINE_LENGTH) {

View File

@ -1,6 +1,6 @@
Name: libomxil-bellagio
Version: 0.9.3
Release: 21
Release: 25
Summary: OpenMAX Integration Layer
License: LGPLv2+
URL: http://omxil.sourceforge.net
@ -14,6 +14,9 @@ Patch0006: bellagio-0.9.3-segfault-on-removeFromWaitResource.patch
Patch0007: omxil_version.patch
Patch0008: libomxil-bellagio-0.9.3-memcpy.patch
Patch0009: libomxil-bellagio-0.9.3-valgrind_register.patch
Patch0010: fix-stringop-overflow.patch
Patch0011: fix-multi-define.patch
Patch0012: Fix-FTBFS-with-gcc12.patch
BuildRequires: doxygen libtool gcc-c++
%description
@ -47,6 +50,9 @@ autoreconf -vif
%build
%ifarch riscv64 loongarch64
export CFLAGS="$CFLAGS -Wno-stringop-truncation"
%endif
%configure --disable-static
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@ -98,5 +104,17 @@ install -pm 0755 test/components/resource_manager/.libs/{omxprioritytest,omxrmte
%changelog
* Mon Dec 02 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 0.9.3-25
- Workaround -Wstringop-truncation error for loongarch64
* Sat Oct 07 2023 laokz <zhangkai@iscas.ac.cn> - 0.9.3-24
- Workaround -Wstringop-truncation error for riscv64
* Sat Jul 15 2023 yaoxin <yao_xin001@hoperun.com> - 0.9.3-23
- Fix build failure caused by gcc upgrade to 12.3.1
* Sat Jul 31 2021 luweitao <luweitao2@huawei.com> - 0.9.3-22
- fix failure by upgrade to GCC-10
* Tue Dec 31 2019 zoushuangshuang <zoushuangshuang@huawei.com> - 0.9.3-21
- Package init

4
libomxil-bellagio.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: felipec/libomxil-bellagio
tag_prefix: ^
seperator: .