Compare commits

...

No commits in common. "c9-beta" and "c8" have entirely different histories.
c9-beta ... c8

5 changed files with 125 additions and 68 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/orc-0.4.31.tar.xz SOURCES/orc-0.4.28.tar.xz

View File

@ -1 +1 @@
5d714f43f6c8a5d909b5f483e2e70447d6fe478a SOURCES/orc-0.4.31.tar.xz 8444720a197a15a3da05292ce86a33df7226e3c9 SOURCES/orc-0.4.28.tar.xz

View File

@ -1,4 +1,4 @@
From 734766c2596b6ff940778f659bd664b3d72abd61 Mon Sep 17 00:00:00 2001 From 4077146f8a49eeb0fc0c01ef45398aaca53bc958 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com> From: Wim Taymans <wtaymans@redhat.com>
Date: Wed, 31 Jul 2024 11:12:48 +0200 Date: Wed, 31 Jul 2024 11:12:48 +0200
Subject: [PATCH] Use vasprintf() if available for error messages and otherwise Subject: [PATCH] Use vasprintf() if available for error messages and otherwise
@ -18,28 +18,41 @@ Fixes #69
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/191> Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/191>
--- ---
configure.ac | 1 +
meson.build | 1 + meson.build | 1 +
orc/orccompiler.c | 6 +++++- orc/orccompiler.c | 6 +++++-
orc/orcparse.c | 18 +++++++++++++++--- orc/orcparse.c | 18 +++++++++++++++---
3 files changed, 21 insertions(+), 4 deletions(-) 4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index bdf89a6..0dd7d7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,7 @@ AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_FUNCS([vasprintf])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([sigaction])
AC_CHECK_FUNCS([sigsetjmp])
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index 41d5e5b..0e0d83b 100644 index 32f6492..ec085f0 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -118,6 +118,7 @@ int main() { @@ -97,6 +97,7 @@ int main() {
''' '''
cdata.set('HAVE_MONOTONIC_CLOCK', cc.compiles(monotonic_test)) cdata.set('HAVE_MONOTONIC_CLOCK', cc.compiles(monotonic_test))
cdata.set('HAVE_GETTIMEOFDAY', cc.has_function('gettimeofday')) cdata.set('HAVE_GETTIMEOFDAY', cc.has_function('gettimeofday'))
+cdata.set('HAVE_VASPRINTF', cc.has_function('vasprintf')) +cdata.set('HAVE_VASPRINTF', cc.has_function('vasprintf'))
cdata.set('HAVE_POSIX_MEMALIGN', cc.has_function('posix_memalign', prefix : '#include <stdlib.h>')) cdata.set('HAVE_POSIX_MEMALIGN', cc.has_function('posix_memalign'))
cdata.set('HAVE_MMAP', cc.has_function('mmap')) cdata.set('HAVE_MMAP', cc.has_function('mmap'))
diff --git a/orc/orccompiler.c b/orc/orccompiler.c diff --git a/orc/orccompiler.c b/orc/orccompiler.c
index 8d92cbe..ea0853c 100644 index 57c3ea4..6c16816 100644
--- a/orc/orccompiler.c --- a/orc/orccompiler.c
+++ b/orc/orccompiler.c +++ b/orc/orccompiler.c
@@ -1210,8 +1210,12 @@ orc_compiler_error_valist (OrcCompiler *compiler, const char *fmt, @@ -1207,8 +1207,12 @@ orc_compiler_error_valist (OrcCompiler *compiler, const char *fmt,
if (compiler->error_msg) return; if (compiler->error_msg) return;

View File

@ -0,0 +1,66 @@
From eac51dc1b6eb89e00ed2294e39949ad056287d1e Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Fri, 19 Jul 2019 16:18:04 +0200
Subject: [PATCH] x86: add endbr32 and endbr64 instructions
Issue endbr instructions at the start of generated functions to
make IBT (indirect branch tracking) work.
Resolves #17
---
orc/orcx86.c | 4 ++++
orc/orcx86insn.c | 2 ++
orc/orcx86insn.h | 2 ++
3 files changed, 8 insertions(+)
diff --git a/orc/orcx86.c b/orc/orcx86.c
index 02e6b34..d4cc086 100644
--- a/orc/orcx86.c
+++ b/orc/orcx86.c
@@ -452,6 +452,9 @@ orc_x86_emit_prologue (OrcCompiler *compiler)
orc_compiler_append_code(compiler,"%s:\n", compiler->program->name);
if (compiler->is_64bit) {
int i;
+
+ orc_x86_emit_cpuinsn_none (compiler, ORC_X86_endbr64);
+
for(i=0;i<16;i++){
if (compiler->used_regs[ORC_GP_REG_BASE+i] &&
compiler->save_regs[ORC_GP_REG_BASE+i]) {
@@ -459,6 +462,7 @@ orc_x86_emit_prologue (OrcCompiler *compiler)
}
}
} else {
+ orc_x86_emit_cpuinsn_none (compiler, ORC_X86_endbr32);
orc_x86_emit_push (compiler, 4, X86_EBP);
if (compiler->use_frame_pointer) {
orc_x86_emit_mov_reg_reg (compiler, 4, X86_ESP, X86_EBP);
diff --git a/orc/orcx86insn.c b/orc/orcx86insn.c
index 9d93197..a9bdd9f 100644
--- a/orc/orcx86insn.c
+++ b/orc/orcx86insn.c
@@ -254,6 +254,8 @@ static const OrcSysOpcode orc_x86_opcodes[] = {
{ "pshufw", ORC_X86_INSN_TYPE_IMM8_MMXM_MMX, 0, 0x00, 0x0f70 },
{ "movq", ORC_X86_INSN_TYPE_MMXM_MMX, 0, 0x00, 0x0f6f },
{ "movq", ORC_X86_INSN_TYPE_MMXM_MMX_REV, 0, 0x00, 0x0f7f },
+ { "endbr32", ORC_X86_INSN_TYPE_NONE, 0, 0xf3, 0x0f1efb },
+ { "endbr64", ORC_X86_INSN_TYPE_NONE, 0, 0xf3, 0x0f1efa },
};
static void
diff --git a/orc/orcx86insn.h b/orc/orcx86insn.h
index d109c95..864e5d6 100644
--- a/orc/orcx86insn.h
+++ b/orc/orcx86insn.h
@@ -277,6 +277,8 @@ typedef enum {
ORC_X86_pshufw,
ORC_X86_movq_mmx_load,
ORC_X86_movq_mmx_store,
+ ORC_X86_endbr32,
+ ORC_X86_endbr64,
} OrcX86Opcode;
enum {
--
2.21.0

View File

@ -1,17 +1,18 @@
Name: orc Name: orc
Version: 0.4.31 Version: 0.4.28
Release: 8%{?dist} Release: 4%{?dist}
Summary: The Oil Run-time Compiler Summary: The Oil Run-time Compiler
Group: System Environment/Libraries
License: BSD License: BSD
URL: http://cgit.freedesktop.org/gstreamer/orc/ URL: http://cgit.freedesktop.org/gstreamer/orc/
Source0: http://gstreamer.freedesktop.org/src/orc/%{name}-%{version}.tar.xz Source0: http://gstreamer.freedesktop.org/src/orc/%{name}-%{version}.tar.xz
Patch0001: 0001-Use-vasprintf-if-available-for-error-messages-and-ot.patch # upstream patches
Patch0: 0001-x86-add-endbr32-and-endbr64-instructions.patch
Patch1: 0001-Use-vasprintf-if-available-for-error-messages-and-ot.patch
BuildRequires: meson >= 0.47.0 BuildRequires: gtk-doc, libtool
BuildRequires: gcc
BuildRequires: gtk-doc
%description %description
Orc is a library and set of tools for compiling and executing Orc is a library and set of tools for compiling and executing
@ -22,6 +23,7 @@ subtraction, and many arithmetic operations.
%package doc %package doc
Summary: Documentation for Orc Summary: Documentation for Orc
Group: Development/Languages
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
BuildArch: noarch BuildArch: noarch
@ -30,6 +32,7 @@ Documentation for Orc.
%package devel %package devel
Summary: Development files and libraries for Orc Summary: Development files and libraries for Orc
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: %{name}-compiler Requires: %{name}-compiler
Requires: pkgconfig Requires: pkgconfig
@ -40,6 +43,7 @@ on orc.
%package compiler %package compiler
Summary: Orc compiler Summary: Orc compiler
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
@ -48,25 +52,39 @@ The Orc compiler, to produce optimized code.
%prep %prep
%autosetup -p1 %setup -q
%patch0 -p1
%patch1 -p1
gtkdocize --copy
NOCONFIGURE=1 autoreconf -vif
%build %build
%meson -D default_library=shared %configure --disable-static --enable-gtk-doc --enable-user-codemem --disable-gtk-doc-html
%meson_build
make %{?_smp_mflags} V=1
%install %install
%meson_install make install DESTDIR=%{buildroot} INSTALL="install -p"
# Remove unneeded files. # Remove unneeded files.
find %{buildroot}/%{_libdir} -name \*.a -delete find %{buildroot}/%{_libdir} -name \*.a -or -name \*.la -delete
rm -rf %{buildroot}/%{_libdir}/orc rm -rf %{buildroot}/%{_libdir}/orc
touch -r stamp-h1 %{buildroot}%{_includedir}/%{name}-0.4/orc/orc-stdint.h
%check %check
%ifnarch s390 s390x ppc %{power64} %{arm} i686 aarch64 %ifnarch s390 s390x ppc %{power64} %{arm} i686 aarch64
%meson_test make check
%endif %endif
%ldconfig_scriptlets
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files %files
@ -82,7 +100,6 @@ rm -rf %{buildroot}/%{_libdir}/orc
%{_includedir}/%{name}-0.4/ %{_includedir}/%{name}-0.4/
%{_libdir}/liborc-*.so %{_libdir}/liborc-*.so
%{_libdir}/pkgconfig/orc-0.4.pc %{_libdir}/pkgconfig/orc-0.4.pc
%{_libdir}/pkgconfig/orc-test-0.4.pc
%{_datadir}/aclocal/orc.m4 %{_datadir}/aclocal/orc.m4
%files compiler %files compiler
@ -90,52 +107,13 @@ rm -rf %{buildroot}/%{_libdir}/orc
%changelog %changelog
* Wed Jul 31 2024 Wim Taymans <wtaymans@redhat.com> 0.4.31-8 * Wed Jul 31 2024 Wim Taymans <wtaymans@redhat.com> 0.4.28-4
- Bump version for upgrade with z-stream
- Resolves: RHEL-50700
* Wed Jul 31 2024 Wim Taymans <wtaymans@redhat.com> 0.4.31-7
- Add patch for CVE-2024-40897 - Add patch for CVE-2024-40897
- Resolves: RHEL-50700 - Resolves: RHEL-50710
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.4.31-6 * Thu Sep 12 2019 Wim Taymans <wtaymans@redhat.com> 0.4.28-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - x86: add endbr32 and endbr64 instructions
Related: rhbz#1991688 - Resolves: rhbz#1693292
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.4.31-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.31-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.31-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.31-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 12 2019 Wim Taymans <wtaymans@redhat.com> 0.4.31-1
- Update to 0.4.31
* Tue Sep 24 2019 Wim Taymans <wtaymans@redhat.com> 0.4.30-1
- Update to 0.4.30
- Use meson as autogen was removed, add meson buildrequires
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.29-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 10 2019 Dan Horák <dan[at]danny.cz> 0.4.29-2
- revert commits changing ppc64/ppc64le support
* Tue Apr 23 2019 Wim Taymans <wtaymans@redhat.com> 0.4.29-1
- Update to 0.4.29
- Add orc-test pkgconfig file
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.28-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.28-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.28-2 * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.28-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
@ -270,7 +248,7 @@ rm -rf %{buildroot}/%{_libdir}/orc
* Thu Aug 19 2010 Fabian Deutsch <fabiand@fedoraproject.org> - 0.4.7-1 * Thu Aug 19 2010 Fabian Deutsch <fabiand@fedoraproject.org> - 0.4.7-1
- Updated to 0.4.7. - Updated to 0.4.7.
* Thu Jul 22 2010 Fabian Deutsch <fabiand@fedoraproject.org> - 0.4.6-1 * Tue Jul 22 2010 Fabian Deutsch <fabiand@fedoraproject.org> - 0.4.6-1
- Updated to 0.4.6. - Updated to 0.4.6.
- New orc-bugreport added. - New orc-bugreport added.