From 7c2d2aadf27290c85da31749191a9152a70c77ed Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 17 2022 08:45:11 +0000 Subject: import libjpeg-turbo-2.0.90-5.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..614a53f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libjpeg-turbo-2.0.90.tar.gz diff --git a/.libjpeg-turbo.metadata b/.libjpeg-turbo.metadata new file mode 100644 index 0000000..0bf94dc --- /dev/null +++ b/.libjpeg-turbo.metadata @@ -0,0 +1 @@ +13674f77644ae30be44de7092be71f5cdb021b1d SOURCES/libjpeg-turbo-2.0.90.tar.gz diff --git a/SOURCES/libjpeg-turbo-CET.patch b/SOURCES/libjpeg-turbo-CET.patch new file mode 100644 index 0000000..5cb4107 --- /dev/null +++ b/SOURCES/libjpeg-turbo-CET.patch @@ -0,0 +1,1250 @@ +From a4f0a1781a96968c5d2db63e5f123b72dbce1876 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 3 Dec 2020 18:19:33 +0100 +Subject: [PATCH] x86 SIMD: Add endbr32/endbr64 instructions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow for indirect branch tracking with Intel CET (Control-Flow +Enforcement Technology) [1], by making all exported routines a possible +target for an indirect jump. + +Signed-off-by: Nikola Forró + +[1] https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf +--- + simd/i386/jccolext-avx2.asm | 1 + + simd/i386/jccolext-mmx.asm | 1 + + simd/i386/jccolext-sse2.asm | 1 + + simd/i386/jcgryext-avx2.asm | 1 + + simd/i386/jcgryext-mmx.asm | 1 + + simd/i386/jcgryext-sse2.asm | 1 + + simd/i386/jchuff-sse2.asm | 1 + + simd/i386/jcphuff-sse2.asm | 2 ++ + simd/i386/jcsample-avx2.asm | 2 ++ + simd/i386/jcsample-mmx.asm | 2 ++ + simd/i386/jcsample-sse2.asm | 2 ++ + simd/i386/jdcolext-avx2.asm | 1 + + simd/i386/jdcolext-mmx.asm | 1 + + simd/i386/jdcolext-sse2.asm | 1 + + simd/i386/jdmrgext-avx2.asm | 2 ++ + simd/i386/jdmrgext-mmx.asm | 2 ++ + simd/i386/jdmrgext-sse2.asm | 2 ++ + simd/i386/jdsample-avx2.asm | 4 ++++ + simd/i386/jdsample-mmx.asm | 4 ++++ + simd/i386/jdsample-sse2.asm | 4 ++++ + simd/i386/jfdctflt-3dn.asm | 1 + + simd/i386/jfdctflt-sse.asm | 1 + + simd/i386/jfdctfst-mmx.asm | 1 + + simd/i386/jfdctfst-sse2.asm | 1 + + simd/i386/jfdctint-avx2.asm | 1 + + simd/i386/jfdctint-mmx.asm | 1 + + simd/i386/jfdctint-sse2.asm | 1 + + simd/i386/jidctflt-3dn.asm | 1 + + simd/i386/jidctflt-sse.asm | 1 + + simd/i386/jidctflt-sse2.asm | 1 + + simd/i386/jidctfst-mmx.asm | 1 + + simd/i386/jidctfst-sse2.asm | 1 + + simd/i386/jidctint-avx2.asm | 1 + + simd/i386/jidctint-mmx.asm | 1 + + simd/i386/jidctint-sse2.asm | 1 + + simd/i386/jidctred-mmx.asm | 2 ++ + simd/i386/jidctred-sse2.asm | 2 ++ + simd/i386/jquant-3dn.asm | 2 ++ + simd/i386/jquant-mmx.asm | 2 ++ + simd/i386/jquant-sse.asm | 2 ++ + simd/i386/jquantf-sse2.asm | 2 ++ + simd/i386/jquanti-avx2.asm | 2 ++ + simd/i386/jquanti-sse2.asm | 2 ++ + simd/nasm/jsimdext.inc | 8 ++++++++ + simd/x86_64/jccolext-avx2.asm | 1 + + simd/x86_64/jccolext-sse2.asm | 1 + + simd/x86_64/jcgryext-avx2.asm | 1 + + simd/x86_64/jcgryext-sse2.asm | 1 + + simd/x86_64/jchuff-sse2.asm | 1 + + simd/x86_64/jcphuff-sse2.asm | 2 ++ + simd/x86_64/jcsample-avx2.asm | 2 ++ + simd/x86_64/jcsample-sse2.asm | 2 ++ + simd/x86_64/jdcolext-avx2.asm | 1 + + simd/x86_64/jdcolext-sse2.asm | 1 + + simd/x86_64/jdmrgext-avx2.asm | 2 ++ + simd/x86_64/jdmrgext-sse2.asm | 2 ++ + simd/x86_64/jdsample-avx2.asm | 4 ++++ + simd/x86_64/jdsample-sse2.asm | 4 ++++ + simd/x86_64/jfdctflt-sse.asm | 1 + + simd/x86_64/jfdctfst-sse2.asm | 1 + + simd/x86_64/jfdctint-avx2.asm | 1 + + simd/x86_64/jfdctint-sse2.asm | 1 + + simd/x86_64/jidctflt-sse2.asm | 1 + + simd/x86_64/jidctfst-sse2.asm | 1 + + simd/x86_64/jidctint-avx2.asm | 1 + + simd/x86_64/jidctint-sse2.asm | 1 + + simd/x86_64/jidctred-sse2.asm | 2 ++ + simd/x86_64/jquantf-sse2.asm | 2 ++ + simd/x86_64/jquanti-avx2.asm | 2 ++ + simd/x86_64/jquanti-sse2.asm | 2 ++ + 70 files changed, 116 insertions(+) + +diff --git a/simd/i386/jccolext-avx2.asm b/simd/i386/jccolext-avx2.asm +index c46d684..7dc6e08 100644 +--- a/simd/i386/jccolext-avx2.asm ++++ b/simd/i386/jccolext-avx2.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_avx2) + + EXTN(jsimd_rgb_ycc_convert_avx2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jccolext-mmx.asm b/simd/i386/jccolext-mmx.asm +index 6357a42..8048abb 100644 +--- a/simd/i386/jccolext-mmx.asm ++++ b/simd/i386/jccolext-mmx.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_mmx) + + EXTN(jsimd_rgb_ycc_convert_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jccolext-sse2.asm b/simd/i386/jccolext-sse2.asm +index c6c8085..5307ddc 100644 +--- a/simd/i386/jccolext-sse2.asm ++++ b/simd/i386/jccolext-sse2.asm +@@ -41,6 +41,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2) + + EXTN(jsimd_rgb_ycc_convert_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jcgryext-avx2.asm b/simd/i386/jcgryext-avx2.asm +index 3fa7973..27a0e11 100644 +--- a/simd/i386/jcgryext-avx2.asm ++++ b/simd/i386/jcgryext-avx2.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2) + + EXTN(jsimd_rgb_gray_convert_avx2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jcgryext-mmx.asm b/simd/i386/jcgryext-mmx.asm +index 8af42e5..dda0e05 100644 +--- a/simd/i386/jcgryext-mmx.asm ++++ b/simd/i386/jcgryext-mmx.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_gray_convert_mmx) + + EXTN(jsimd_rgb_gray_convert_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jcgryext-sse2.asm b/simd/i386/jcgryext-sse2.asm +index c9d6ff1..f8835bb 100644 +--- a/simd/i386/jcgryext-sse2.asm ++++ b/simd/i386/jcgryext-sse2.asm +@@ -41,6 +41,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_gray_convert_sse2) + + EXTN(jsimd_rgb_gray_convert_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jchuff-sse2.asm b/simd/i386/jchuff-sse2.asm +index 278cf5e..b16b974 100644 +--- a/simd/i386/jchuff-sse2.asm ++++ b/simd/i386/jchuff-sse2.asm +@@ -349,6 +349,7 @@ times 1 << 14 db 15 + GLOBAL_FUNCTION(jsimd_huff_encode_one_block_sse2) + + EXTN(jsimd_huff_encode_one_block_sse2): ++ _endbr32 + + %assign stack_offset 0 + %define arg_state 4 + stack_offset +diff --git a/simd/i386/jcphuff-sse2.asm b/simd/i386/jcphuff-sse2.asm +index 8b73178..87190d1 100644 +--- a/simd/i386/jcphuff-sse2.asm ++++ b/simd/i386/jcphuff-sse2.asm +@@ -281,6 +281,7 @@ + GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2) + + EXTN(jsimd_encode_mcu_AC_first_prepare_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -460,6 +461,7 @@ EXTN(jsimd_encode_mcu_AC_first_prepare_sse2): + GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2) + + EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jcsample-avx2.asm b/simd/i386/jcsample-avx2.asm +index 0a20802..46eba8c 100644 +--- a/simd/i386/jcsample-avx2.asm ++++ b/simd/i386/jcsample-avx2.asm +@@ -43,6 +43,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_downsample_avx2) + + EXTN(jsimd_h2v1_downsample_avx2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +@@ -216,6 +217,7 @@ EXTN(jsimd_h2v1_downsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_downsample_avx2) + + EXTN(jsimd_h2v2_downsample_avx2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jcsample-mmx.asm b/simd/i386/jcsample-mmx.asm +index 2c223ee..b2b8ded 100644 +--- a/simd/i386/jcsample-mmx.asm ++++ b/simd/i386/jcsample-mmx.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_downsample_mmx) + + EXTN(jsimd_h2v1_downsample_mmx): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +@@ -185,6 +186,7 @@ EXTN(jsimd_h2v1_downsample_mmx): + GLOBAL_FUNCTION(jsimd_h2v2_downsample_mmx) + + EXTN(jsimd_h2v2_downsample_mmx): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jcsample-sse2.asm b/simd/i386/jcsample-sse2.asm +index 4fea60d..4c22b40 100644 +--- a/simd/i386/jcsample-sse2.asm ++++ b/simd/i386/jcsample-sse2.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_downsample_sse2) + + EXTN(jsimd_h2v1_downsample_sse2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +@@ -198,6 +199,7 @@ EXTN(jsimd_h2v1_downsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_downsample_sse2) + + EXTN(jsimd_h2v2_downsample_sse2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jdcolext-avx2.asm b/simd/i386/jdcolext-avx2.asm +index 015be04..b076765 100644 +--- a/simd/i386/jdcolext-avx2.asm ++++ b/simd/i386/jdcolext-avx2.asm +@@ -43,6 +43,7 @@ + GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_avx2) + + EXTN(jsimd_ycc_rgb_convert_avx2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jdcolext-mmx.asm b/simd/i386/jdcolext-mmx.asm +index 5813cfc..150f5b6 100644 +--- a/simd/i386/jdcolext-mmx.asm ++++ b/simd/i386/jdcolext-mmx.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_mmx) + + EXTN(jsimd_ycc_rgb_convert_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jdcolext-sse2.asm b/simd/i386/jdcolext-sse2.asm +index d5572b3..cd3ac70 100644 +--- a/simd/i386/jdcolext-sse2.asm ++++ b/simd/i386/jdcolext-sse2.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_sse2) + + EXTN(jsimd_ycc_rgb_convert_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jdmrgext-avx2.asm b/simd/i386/jdmrgext-avx2.asm +index e35f728..0db0aa4 100644 +--- a/simd/i386/jdmrgext-avx2.asm ++++ b/simd/i386/jdmrgext-avx2.asm +@@ -43,6 +43,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_avx2) + + EXTN(jsimd_h2v1_merged_upsample_avx2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -523,6 +524,7 @@ EXTN(jsimd_h2v1_merged_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_avx2) + + EXTN(jsimd_h2v2_merged_upsample_avx2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jdmrgext-mmx.asm b/simd/i386/jdmrgext-mmx.asm +index eb3e36b..6427a1a 100644 +--- a/simd/i386/jdmrgext-mmx.asm ++++ b/simd/i386/jdmrgext-mmx.asm +@@ -40,6 +40,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_mmx) + + EXTN(jsimd_h2v1_merged_upsample_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -408,6 +409,7 @@ EXTN(jsimd_h2v1_merged_upsample_mmx): + GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_mmx) + + EXTN(jsimd_h2v2_merged_upsample_mmx): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jdmrgext-sse2.asm b/simd/i386/jdmrgext-sse2.asm +index c113dc4..6897fa1 100644 +--- a/simd/i386/jdmrgext-sse2.asm ++++ b/simd/i386/jdmrgext-sse2.asm +@@ -42,6 +42,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_sse2) + + EXTN(jsimd_h2v1_merged_upsample_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -465,6 +466,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_sse2) + + EXTN(jsimd_h2v2_merged_upsample_sse2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jdsample-avx2.asm b/simd/i386/jdsample-avx2.asm +index a800c35..7d52708 100644 +--- a/simd/i386/jdsample-avx2.asm ++++ b/simd/i386/jdsample-avx2.asm +@@ -60,6 +60,7 @@ PW_EIGHT times 16 dw 8 + GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_avx2) + + EXTN(jsimd_h2v1_fancy_upsample_avx2): ++ _endbr32 + push ebp + mov ebp, esp + pushpic ebx +@@ -227,6 +228,7 @@ EXTN(jsimd_h2v1_fancy_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_avx2) + + EXTN(jsimd_h2v2_fancy_upsample_avx2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -570,6 +572,7 @@ EXTN(jsimd_h2v2_fancy_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v1_upsample_avx2) + + EXTN(jsimd_h2v1_upsample_avx2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +@@ -669,6 +672,7 @@ EXTN(jsimd_h2v1_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_upsample_avx2) + + EXTN(jsimd_h2v2_upsample_avx2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jdsample-mmx.asm b/simd/i386/jdsample-mmx.asm +index 12c49f0..7f2ab40 100644 +--- a/simd/i386/jdsample-mmx.asm ++++ b/simd/i386/jdsample-mmx.asm +@@ -59,6 +59,7 @@ PW_EIGHT times 4 dw 8 + GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_mmx) + + EXTN(jsimd_h2v1_fancy_upsample_mmx): ++ _endbr32 + push ebp + mov ebp, esp + pushpic ebx +@@ -217,6 +218,7 @@ EXTN(jsimd_h2v1_fancy_upsample_mmx): + GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_mmx) + + EXTN(jsimd_h2v2_fancy_upsample_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -541,6 +543,7 @@ EXTN(jsimd_h2v2_fancy_upsample_mmx): + GLOBAL_FUNCTION(jsimd_h2v1_upsample_mmx) + + EXTN(jsimd_h2v1_upsample_mmx): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +@@ -640,6 +643,7 @@ EXTN(jsimd_h2v1_upsample_mmx): + GLOBAL_FUNCTION(jsimd_h2v2_upsample_mmx) + + EXTN(jsimd_h2v2_upsample_mmx): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jdsample-sse2.asm b/simd/i386/jdsample-sse2.asm +index 4e28d2f..3311b25 100644 +--- a/simd/i386/jdsample-sse2.asm ++++ b/simd/i386/jdsample-sse2.asm +@@ -59,6 +59,7 @@ PW_EIGHT times 8 dw 8 + GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2) + + EXTN(jsimd_h2v1_fancy_upsample_sse2): ++ _endbr32 + push ebp + mov ebp, esp + pushpic ebx +@@ -216,6 +217,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2) + + EXTN(jsimd_h2v2_fancy_upsample_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -538,6 +540,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2) + + EXTN(jsimd_h2v1_upsample_sse2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +@@ -635,6 +638,7 @@ EXTN(jsimd_h2v1_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2) + + EXTN(jsimd_h2v2_upsample_sse2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jfdctflt-3dn.asm b/simd/i386/jfdctflt-3dn.asm +index 322ab16..109e36e 100644 +--- a/simd/i386/jfdctflt-3dn.asm ++++ b/simd/i386/jfdctflt-3dn.asm +@@ -56,6 +56,7 @@ PD_1_306 times 2 dd 1.306562964876376527856643 + GLOBAL_FUNCTION(jsimd_fdct_float_3dnow) + + EXTN(jsimd_fdct_float_3dnow): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jfdctflt-sse.asm b/simd/i386/jfdctflt-sse.asm +index 86952c6..b1e0576 100644 +--- a/simd/i386/jfdctflt-sse.asm ++++ b/simd/i386/jfdctflt-sse.asm +@@ -67,6 +67,7 @@ PD_1_306 times 4 dd 1.306562964876376527856643 + GLOBAL_FUNCTION(jsimd_fdct_float_sse) + + EXTN(jsimd_fdct_float_sse): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jfdctfst-mmx.asm b/simd/i386/jfdctfst-mmx.asm +index 80645a5..be84fdb 100644 +--- a/simd/i386/jfdctfst-mmx.asm ++++ b/simd/i386/jfdctfst-mmx.asm +@@ -81,6 +81,7 @@ PW_F1306 times 4 dw F_1_306 << CONST_SHIFT + GLOBAL_FUNCTION(jsimd_fdct_ifast_mmx) + + EXTN(jsimd_fdct_ifast_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jfdctfst-sse2.asm b/simd/i386/jfdctfst-sse2.asm +index 446fa7a..945f9cf 100644 +--- a/simd/i386/jfdctfst-sse2.asm ++++ b/simd/i386/jfdctfst-sse2.asm +@@ -82,6 +82,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHIFT + GLOBAL_FUNCTION(jsimd_fdct_ifast_sse2) + + EXTN(jsimd_fdct_ifast_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jfdctint-avx2.asm b/simd/i386/jfdctint-avx2.asm +index 23cf733..56acb63 100644 +--- a/simd/i386/jfdctint-avx2.asm ++++ b/simd/i386/jfdctint-avx2.asm +@@ -260,6 +260,7 @@ PW_1_NEG1 times 8 dw 1 + GLOBAL_FUNCTION(jsimd_fdct_islow_avx2) + + EXTN(jsimd_fdct_islow_avx2): ++ _endbr32 + push ebp + mov ebp, esp + pushpic ebx +diff --git a/simd/i386/jfdctint-mmx.asm b/simd/i386/jfdctint-mmx.asm +index 34a43b9..4d1e773 100644 +--- a/simd/i386/jfdctint-mmx.asm ++++ b/simd/i386/jfdctint-mmx.asm +@@ -102,6 +102,7 @@ PW_DESCALE_P2X times 4 dw 1 << (PASS1_BITS - 1) + GLOBAL_FUNCTION(jsimd_fdct_islow_mmx) + + EXTN(jsimd_fdct_islow_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jfdctint-sse2.asm b/simd/i386/jfdctint-sse2.asm +index 6f8e18c..3954c8f 100644 +--- a/simd/i386/jfdctint-sse2.asm ++++ b/simd/i386/jfdctint-sse2.asm +@@ -103,6 +103,7 @@ PW_DESCALE_P2X times 8 dw 1 << (PASS1_BITS - 1) + GLOBAL_FUNCTION(jsimd_fdct_islow_sse2) + + EXTN(jsimd_fdct_islow_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctflt-3dn.asm b/simd/i386/jidctflt-3dn.asm +index 8795191..eb49902 100644 +--- a/simd/i386/jidctflt-3dn.asm ++++ b/simd/i386/jidctflt-3dn.asm +@@ -65,6 +65,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_float_3dnow) + + EXTN(jsimd_idct_float_3dnow): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctflt-sse.asm b/simd/i386/jidctflt-sse.asm +index b27ecfd..ffe54f8 100644 +--- a/simd/i386/jidctflt-sse.asm ++++ b/simd/i386/jidctflt-sse.asm +@@ -75,6 +75,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_float_sse) + + EXTN(jsimd_idct_float_sse): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctflt-sse2.asm b/simd/i386/jidctflt-sse2.asm +index c646eae..fd1fe35 100644 +--- a/simd/i386/jidctflt-sse2.asm ++++ b/simd/i386/jidctflt-sse2.asm +@@ -75,6 +75,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_float_sse2) + + EXTN(jsimd_idct_float_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctfst-mmx.asm b/simd/i386/jidctfst-mmx.asm +index 24622d4..00940b8 100644 +--- a/simd/i386/jidctfst-mmx.asm ++++ b/simd/i386/jidctfst-mmx.asm +@@ -96,6 +96,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_ifast_mmx) + + EXTN(jsimd_idct_ifast_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctfst-sse2.asm b/simd/i386/jidctfst-sse2.asm +index 19704ff..1f4af33 100644 +--- a/simd/i386/jidctfst-sse2.asm ++++ b/simd/i386/jidctfst-sse2.asm +@@ -94,6 +94,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_ifast_sse2) + + EXTN(jsimd_idct_ifast_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctint-avx2.asm b/simd/i386/jidctint-avx2.asm +index 199c7df..2eb606a 100644 +--- a/simd/i386/jidctint-avx2.asm ++++ b/simd/i386/jidctint-avx2.asm +@@ -296,6 +296,7 @@ PW_1_NEG1 times 8 dw 1 + GLOBAL_FUNCTION(jsimd_idct_islow_avx2) + + EXTN(jsimd_idct_islow_avx2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctint-mmx.asm b/simd/i386/jidctint-mmx.asm +index f15c8d3..2d91b7e 100644 +--- a/simd/i386/jidctint-mmx.asm ++++ b/simd/i386/jidctint-mmx.asm +@@ -109,6 +109,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_islow_mmx) + + EXTN(jsimd_idct_islow_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctint-sse2.asm b/simd/i386/jidctint-sse2.asm +index 43e3201..804be19 100644 +--- a/simd/i386/jidctint-sse2.asm ++++ b/simd/i386/jidctint-sse2.asm +@@ -107,6 +107,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_islow_sse2) + + EXTN(jsimd_idct_islow_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +diff --git a/simd/i386/jidctred-mmx.asm b/simd/i386/jidctred-mmx.asm +index e2307e1..cb43106 100644 +--- a/simd/i386/jidctred-mmx.asm ++++ b/simd/i386/jidctred-mmx.asm +@@ -117,6 +117,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_4x4_mmx) + + EXTN(jsimd_idct_4x4_mmx): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -504,6 +505,7 @@ EXTN(jsimd_idct_4x4_mmx): + GLOBAL_FUNCTION(jsimd_idct_2x2_mmx) + + EXTN(jsimd_idct_2x2_mmx): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jidctred-sse2.asm b/simd/i386/jidctred-sse2.asm +index 6e56494..2a61b9e 100644 +--- a/simd/i386/jidctred-sse2.asm ++++ b/simd/i386/jidctred-sse2.asm +@@ -115,6 +115,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_4x4_sse2) + + EXTN(jsimd_idct_4x4_sse2): ++ _endbr32 + push ebp + mov eax, esp ; eax = original ebp + sub esp, byte 4 +@@ -425,6 +426,7 @@ EXTN(jsimd_idct_4x4_sse2): + GLOBAL_FUNCTION(jsimd_idct_2x2_sse2) + + EXTN(jsimd_idct_2x2_sse2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +diff --git a/simd/i386/jquant-3dn.asm b/simd/i386/jquant-3dn.asm +index 5cb60ca..a0599eb 100644 +--- a/simd/i386/jquant-3dn.asm ++++ b/simd/i386/jquant-3dn.asm +@@ -36,6 +36,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_float_3dnow) + + EXTN(jsimd_convsamp_float_3dnow): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +@@ -138,6 +139,7 @@ EXTN(jsimd_convsamp_float_3dnow): + GLOBAL_FUNCTION(jsimd_quantize_float_3dnow) + + EXTN(jsimd_quantize_float_3dnow): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jquant-mmx.asm b/simd/i386/jquant-mmx.asm +index 61305c6..080021b 100644 +--- a/simd/i386/jquant-mmx.asm ++++ b/simd/i386/jquant-mmx.asm +@@ -36,6 +36,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_mmx) + + EXTN(jsimd_convsamp_mmx): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +@@ -145,6 +146,7 @@ EXTN(jsimd_convsamp_mmx): + GLOBAL_FUNCTION(jsimd_quantize_mmx) + + EXTN(jsimd_quantize_mmx): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jquant-sse.asm b/simd/i386/jquant-sse.asm +index 218adc9..cacd2a9 100644 +--- a/simd/i386/jquant-sse.asm ++++ b/simd/i386/jquant-sse.asm +@@ -36,6 +36,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_float_sse) + + EXTN(jsimd_convsamp_float_sse): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +@@ -138,6 +139,7 @@ EXTN(jsimd_convsamp_float_sse): + GLOBAL_FUNCTION(jsimd_quantize_float_sse) + + EXTN(jsimd_quantize_float_sse): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jquantf-sse2.asm b/simd/i386/jquantf-sse2.asm +index a881ab5..6f4789c 100644 +--- a/simd/i386/jquantf-sse2.asm ++++ b/simd/i386/jquantf-sse2.asm +@@ -36,6 +36,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_float_sse2) + + EXTN(jsimd_convsamp_float_sse2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +@@ -115,6 +116,7 @@ EXTN(jsimd_convsamp_float_sse2): + GLOBAL_FUNCTION(jsimd_quantize_float_sse2) + + EXTN(jsimd_quantize_float_sse2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jquanti-avx2.asm b/simd/i386/jquanti-avx2.asm +index 5ed6bec..efcddd2 100644 +--- a/simd/i386/jquanti-avx2.asm ++++ b/simd/i386/jquanti-avx2.asm +@@ -37,6 +37,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_avx2) + + EXTN(jsimd_convsamp_avx2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +@@ -130,6 +131,7 @@ EXTN(jsimd_convsamp_avx2): + GLOBAL_FUNCTION(jsimd_quantize_avx2) + + EXTN(jsimd_quantize_avx2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/i386/jquanti-sse2.asm b/simd/i386/jquanti-sse2.asm +index 0a50940..98d39e0 100644 +--- a/simd/i386/jquanti-sse2.asm ++++ b/simd/i386/jquanti-sse2.asm +@@ -36,6 +36,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_sse2) + + EXTN(jsimd_convsamp_sse2): ++ _endbr32 + push ebp + mov ebp, esp + push ebx +@@ -121,6 +122,7 @@ EXTN(jsimd_convsamp_sse2): + GLOBAL_FUNCTION(jsimd_quantize_sse2) + + EXTN(jsimd_quantize_sse2): ++ _endbr32 + push ebp + mov ebp, esp + ; push ebx ; unused +diff --git a/simd/nasm/jsimdext.inc b/simd/nasm/jsimdext.inc +index e8d50b0..f140d4d 100644 +--- a/simd/nasm/jsimdext.inc ++++ b/simd/nasm/jsimdext.inc +@@ -512,6 +512,14 @@ const_base: + + %endif + ++%imacro _endbr32 0 ++ dd 0xfb1e0ff3 ++%endmacro ++ ++%imacro _endbr64 0 ++ dd 0xfa1e0ff3 ++%endmacro ++ + ; -------------------------------------------------------------------------- + ; Defines picked up from the C headers + ; +diff --git a/simd/x86_64/jccolext-avx2.asm b/simd/x86_64/jccolext-avx2.asm +index ffb527d..5c01670 100644 +--- a/simd/x86_64/jccolext-avx2.asm ++++ b/simd/x86_64/jccolext-avx2.asm +@@ -40,6 +40,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_avx2) + + EXTN(jsimd_rgb_ycc_convert_avx2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jccolext-sse2.asm b/simd/x86_64/jccolext-sse2.asm +index af70ed6..99c1889 100644 +--- a/simd/x86_64/jccolext-sse2.asm ++++ b/simd/x86_64/jccolext-sse2.asm +@@ -39,6 +39,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2) + + EXTN(jsimd_rgb_ycc_convert_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jcgryext-avx2.asm b/simd/x86_64/jcgryext-avx2.asm +index ddcc2c0..a5b9619 100644 +--- a/simd/x86_64/jcgryext-avx2.asm ++++ b/simd/x86_64/jcgryext-avx2.asm +@@ -40,6 +40,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2) + + EXTN(jsimd_rgb_gray_convert_avx2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jcgryext-sse2.asm b/simd/x86_64/jcgryext-sse2.asm +index f1d399a..550fc2f 100644 +--- a/simd/x86_64/jcgryext-sse2.asm ++++ b/simd/x86_64/jcgryext-sse2.asm +@@ -39,6 +39,7 @@ + GLOBAL_FUNCTION(jsimd_rgb_gray_convert_sse2) + + EXTN(jsimd_rgb_gray_convert_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jchuff-sse2.asm b/simd/x86_64/jchuff-sse2.asm +index 0072028..1770a84 100644 +--- a/simd/x86_64/jchuff-sse2.asm ++++ b/simd/x86_64/jchuff-sse2.asm +@@ -258,6 +258,7 @@ times 1 << 14 db 15 + GLOBAL_FUNCTION(jsimd_huff_encode_one_block_sse2) + + EXTN(jsimd_huff_encode_one_block_sse2): ++ _endbr64 + + %ifdef WIN64 + +diff --git a/simd/x86_64/jcphuff-sse2.asm b/simd/x86_64/jcphuff-sse2.asm +index 8ed4472..f316b27 100644 +--- a/simd/x86_64/jcphuff-sse2.asm ++++ b/simd/x86_64/jcphuff-sse2.asm +@@ -281,6 +281,7 @@ + GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2) + + EXTN(jsimd_encode_mcu_AC_first_prepare_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +@@ -449,6 +450,7 @@ EXTN(jsimd_encode_mcu_AC_first_prepare_sse2): + GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2) + + EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jcsample-avx2.asm b/simd/x86_64/jcsample-avx2.asm +index b32527a..28bf70a 100644 +--- a/simd/x86_64/jcsample-avx2.asm ++++ b/simd/x86_64/jcsample-avx2.asm +@@ -44,6 +44,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_downsample_avx2) + + EXTN(jsimd_h2v1_downsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -206,6 +207,7 @@ EXTN(jsimd_h2v1_downsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_downsample_avx2) + + EXTN(jsimd_h2v2_downsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jcsample-sse2.asm b/simd/x86_64/jcsample-sse2.asm +index 2fcfe45..2093090 100644 +--- a/simd/x86_64/jcsample-sse2.asm ++++ b/simd/x86_64/jcsample-sse2.asm +@@ -43,6 +43,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_downsample_sse2) + + EXTN(jsimd_h2v1_downsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -188,6 +189,7 @@ EXTN(jsimd_h2v1_downsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_downsample_sse2) + + EXTN(jsimd_h2v2_downsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jdcolext-avx2.asm b/simd/x86_64/jdcolext-avx2.asm +index 2370fda..406fc01 100644 +--- a/simd/x86_64/jdcolext-avx2.asm ++++ b/simd/x86_64/jdcolext-avx2.asm +@@ -41,6 +41,7 @@ + GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_avx2) + + EXTN(jsimd_ycc_rgb_convert_avx2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jdcolext-sse2.asm b/simd/x86_64/jdcolext-sse2.asm +index e07c8d7..84acb50 100644 +--- a/simd/x86_64/jdcolext-sse2.asm ++++ b/simd/x86_64/jdcolext-sse2.asm +@@ -40,6 +40,7 @@ + GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_sse2) + + EXTN(jsimd_ycc_rgb_convert_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jdmrgext-avx2.asm b/simd/x86_64/jdmrgext-avx2.asm +index 8b264b4..c42f395 100644 +--- a/simd/x86_64/jdmrgext-avx2.asm ++++ b/simd/x86_64/jdmrgext-avx2.asm +@@ -41,6 +41,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_avx2) + + EXTN(jsimd_h2v1_merged_upsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +@@ -505,6 +506,7 @@ EXTN(jsimd_h2v1_merged_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_avx2) + + EXTN(jsimd_h2v2_merged_upsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jdmrgext-sse2.asm b/simd/x86_64/jdmrgext-sse2.asm +index eb3ab9d..8347620 100644 +--- a/simd/x86_64/jdmrgext-sse2.asm ++++ b/simd/x86_64/jdmrgext-sse2.asm +@@ -40,6 +40,7 @@ + GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_sse2) + + EXTN(jsimd_h2v1_merged_upsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +@@ -447,6 +448,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_sse2) + + EXTN(jsimd_h2v2_merged_upsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jdsample-avx2.asm b/simd/x86_64/jdsample-avx2.asm +index 1e4979f..b80d607 100644 +--- a/simd/x86_64/jdsample-avx2.asm ++++ b/simd/x86_64/jdsample-avx2.asm +@@ -61,6 +61,7 @@ PW_EIGHT times 16 dw 8 + GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_avx2) + + EXTN(jsimd_h2v1_fancy_upsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -215,6 +216,7 @@ EXTN(jsimd_h2v1_fancy_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_avx2) + + EXTN(jsimd_h2v2_fancy_upsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +@@ -524,6 +526,7 @@ EXTN(jsimd_h2v2_fancy_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v1_upsample_avx2) + + EXTN(jsimd_h2v1_upsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -613,6 +616,7 @@ EXTN(jsimd_h2v1_upsample_avx2): + GLOBAL_FUNCTION(jsimd_h2v2_upsample_avx2) + + EXTN(jsimd_h2v2_upsample_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jdsample-sse2.asm b/simd/x86_64/jdsample-sse2.asm +index 38dbcee..6a1e012 100644 +--- a/simd/x86_64/jdsample-sse2.asm ++++ b/simd/x86_64/jdsample-sse2.asm +@@ -60,6 +60,7 @@ PW_EIGHT times 8 dw 8 + GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2) + + EXTN(jsimd_h2v1_fancy_upsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -202,6 +203,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2) + + EXTN(jsimd_h2v2_fancy_upsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +@@ -497,6 +499,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2) + + EXTN(jsimd_h2v1_upsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -584,6 +587,7 @@ EXTN(jsimd_h2v1_upsample_sse2): + GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2) + + EXTN(jsimd_h2v2_upsample_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jfdctflt-sse.asm b/simd/x86_64/jfdctflt-sse.asm +index ef27966..90d06eb 100644 +--- a/simd/x86_64/jfdctflt-sse.asm ++++ b/simd/x86_64/jfdctflt-sse.asm +@@ -65,6 +65,7 @@ PD_1_306 times 4 dd 1.306562964876376527856643 + GLOBAL_FUNCTION(jsimd_fdct_float_sse) + + EXTN(jsimd_fdct_float_sse): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jfdctfst-sse2.asm b/simd/x86_64/jfdctfst-sse2.asm +index 2e1bfe6..5a74aaf 100644 +--- a/simd/x86_64/jfdctfst-sse2.asm ++++ b/simd/x86_64/jfdctfst-sse2.asm +@@ -80,6 +80,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHIFT + GLOBAL_FUNCTION(jsimd_fdct_ifast_sse2) + + EXTN(jsimd_fdct_ifast_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jfdctint-avx2.asm b/simd/x86_64/jfdctint-avx2.asm +index e56258b..2ac6d4f 100644 +--- a/simd/x86_64/jfdctint-avx2.asm ++++ b/simd/x86_64/jfdctint-avx2.asm +@@ -260,6 +260,7 @@ PW_1_NEG1 times 8 dw 1 + GLOBAL_FUNCTION(jsimd_fdct_islow_avx2) + + EXTN(jsimd_fdct_islow_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jfdctint-sse2.asm b/simd/x86_64/jfdctint-sse2.asm +index ec1f383..0950825 100644 +--- a/simd/x86_64/jfdctint-sse2.asm ++++ b/simd/x86_64/jfdctint-sse2.asm +@@ -101,6 +101,7 @@ PW_DESCALE_P2X times 8 dw 1 << (PASS1_BITS - 1) + GLOBAL_FUNCTION(jsimd_fdct_islow_sse2) + + EXTN(jsimd_fdct_islow_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jidctflt-sse2.asm b/simd/x86_64/jidctflt-sse2.asm +index 60bf961..f04902a 100644 +--- a/simd/x86_64/jidctflt-sse2.asm ++++ b/simd/x86_64/jidctflt-sse2.asm +@@ -76,6 +76,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_float_sse2) + + EXTN(jsimd_idct_float_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jidctfst-sse2.asm b/simd/x86_64/jidctfst-sse2.asm +index cb97fdf..d004da9 100644 +--- a/simd/x86_64/jidctfst-sse2.asm ++++ b/simd/x86_64/jidctfst-sse2.asm +@@ -95,6 +95,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_ifast_sse2) + + EXTN(jsimd_idct_ifast_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jidctint-avx2.asm b/simd/x86_64/jidctint-avx2.asm +index ca7e317..5c65fa7 100644 +--- a/simd/x86_64/jidctint-avx2.asm ++++ b/simd/x86_64/jidctint-avx2.asm +@@ -282,6 +282,7 @@ PW_1_NEG1 times 8 dw 1 + GLOBAL_FUNCTION(jsimd_idct_islow_avx2) + + EXTN(jsimd_idct_islow_avx2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + mov rbp, rsp ; rbp = aligned rbp +diff --git a/simd/x86_64/jidctint-sse2.asm b/simd/x86_64/jidctint-sse2.asm +index 7aa869b..a428c9e 100644 +--- a/simd/x86_64/jidctint-sse2.asm ++++ b/simd/x86_64/jidctint-sse2.asm +@@ -108,6 +108,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_islow_sse2) + + EXTN(jsimd_idct_islow_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +diff --git a/simd/x86_64/jidctred-sse2.asm b/simd/x86_64/jidctred-sse2.asm +index 4ece9d8..5fac624 100644 +--- a/simd/x86_64/jidctred-sse2.asm ++++ b/simd/x86_64/jidctred-sse2.asm +@@ -116,6 +116,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE + GLOBAL_FUNCTION(jsimd_idct_4x4_sse2) + + EXTN(jsimd_idct_4x4_sse2): ++ _endbr64 + push rbp + mov rax, rsp ; rax = original rbp + sub rsp, byte 4 +@@ -414,6 +415,7 @@ EXTN(jsimd_idct_4x4_sse2): + GLOBAL_FUNCTION(jsimd_idct_2x2_sse2) + + EXTN(jsimd_idct_2x2_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jquantf-sse2.asm b/simd/x86_64/jquantf-sse2.asm +index ab2e395..a260e32 100644 +--- a/simd/x86_64/jquantf-sse2.asm ++++ b/simd/x86_64/jquantf-sse2.asm +@@ -37,6 +37,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_float_sse2) + + EXTN(jsimd_convsamp_float_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -110,6 +111,7 @@ EXTN(jsimd_convsamp_float_sse2): + GLOBAL_FUNCTION(jsimd_quantize_float_sse2) + + EXTN(jsimd_quantize_float_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jquanti-avx2.asm b/simd/x86_64/jquanti-avx2.asm +index 70fe811..c48c73f 100644 +--- a/simd/x86_64/jquanti-avx2.asm ++++ b/simd/x86_64/jquanti-avx2.asm +@@ -38,6 +38,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_avx2) + + EXTN(jsimd_convsamp_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -116,6 +117,7 @@ EXTN(jsimd_convsamp_avx2): + GLOBAL_FUNCTION(jsimd_quantize_avx2) + + EXTN(jsimd_quantize_avx2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +diff --git a/simd/x86_64/jquanti-sse2.asm b/simd/x86_64/jquanti-sse2.asm +index 3ee4420..fb1b4ae 100644 +--- a/simd/x86_64/jquanti-sse2.asm ++++ b/simd/x86_64/jquanti-sse2.asm +@@ -37,6 +37,7 @@ + GLOBAL_FUNCTION(jsimd_convsamp_sse2) + + EXTN(jsimd_convsamp_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +@@ -116,6 +117,7 @@ EXTN(jsimd_convsamp_sse2): + GLOBAL_FUNCTION(jsimd_quantize_sse2) + + EXTN(jsimd_quantize_sse2): ++ _endbr64 + push rbp + mov rax, rsp + mov rbp, rsp +-- +2.26.2 + diff --git a/SOURCES/libjpeg-turbo-CVE-2021-20205.patch b/SOURCES/libjpeg-turbo-CVE-2021-20205.patch new file mode 100644 index 0000000..19a06e2 --- /dev/null +++ b/SOURCES/libjpeg-turbo-CVE-2021-20205.patch @@ -0,0 +1,73 @@ +From 6bb9d7ea3fdc22a8a03b989e430d0f4953e59f03 Mon Sep 17 00:00:00 2001 +From: DRC +Date: Thu, 14 Jan 2021 18:35:15 -0600 +Subject: [PATCH] cjpeg: Fix FPE when compressing 0-width GIF + +--- + cderror.h | 5 ++++- + rdgif.c | 8 +++++++- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/cderror.h b/cderror.h +index a386b69..2844346 100644 +--- a/cderror.h ++++ b/cderror.h +@@ -1,9 +1,11 @@ + /* + * cderror.h + * ++ * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 2009-2017 by Guido Vollbeding. +- * This file is part of the Independent JPEG Group's software. ++ * libjpeg-turbo Modifications: ++ * Copyright (C) 2021, D. R. Commander. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * +@@ -60,6 +62,7 @@ JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") + JMESSAGE(JERR_GIF_BUG, "GIF output got confused") + JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") + JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") ++JMESSAGE(JERR_GIF_EMPTY, "Empty GIF image") + JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") + JMESSAGE(JERR_GIF_NOT, "Not a GIF file") + JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") +diff --git a/rdgif.c b/rdgif.c +index e1ea56c..8a379fe 100644 +--- a/rdgif.c ++++ b/rdgif.c +@@ -1,9 +1,11 @@ + /* + * rdgif.c + * ++ * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2019 by Guido Vollbeding. +- * This file is part of the Independent JPEG Group's software. ++ * libjpeg-turbo Modifications: ++ * Copyright (C) 2021, D. R. Commander. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * +@@ -404,6 +406,8 @@ start_input_gif(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) + ERREXIT(cinfo, JERR_INPUT_EOF); + width = LM_to_uint(hdrbuf, 0); + height = LM_to_uint(hdrbuf, 2); ++ if (width == 0 || height == 0) ++ ERREXIT(cinfo, JERR_GIF_EMPTY); + /* we ignore the color resolution, sort flag, and background color index */ + aspectRatio = UCH(hdrbuf[6]); + if (aspectRatio != 0 && aspectRatio != 49) +@@ -446,6 +450,8 @@ start_input_gif(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) + /* we ignore top/left position info, also sort flag */ + width = LM_to_uint(hdrbuf, 4); + height = LM_to_uint(hdrbuf, 6); ++ if (width == 0 || height == 0) ++ ERREXIT(cinfo, JERR_GIF_EMPTY); + source->is_interlaced = (BitSet(hdrbuf[8], INTERLACE) != 0); + + /* Read local colormap if header indicates it is present */ +-- +2.26.3 + diff --git a/SOURCES/libjpeg-turbo-CVE-2021-37972.patch b/SOURCES/libjpeg-turbo-CVE-2021-37972.patch new file mode 100644 index 0000000..df51ea2 --- /dev/null +++ b/SOURCES/libjpeg-turbo-CVE-2021-37972.patch @@ -0,0 +1,41 @@ +From 1057a4a2d00b7d30cd7e827f577ee2ee640f508a Mon Sep 17 00:00:00 2001 +From: DRC +Date: Fri, 6 Aug 2021 13:41:15 -0500 +Subject: [PATCH] SSE2/64-bit: Fix trans. segfault w/ malformed JPEG + +Attempting to losslessly transform certain malformed JPEG images can +cause the nbits table index in the Huffman encoder to exceed 32768, so +we need to pad the SSE2 implementation of that table to 65536 entries as +we do with the C implementation. + +Regression introduced by 087c29e07f7533ec82fd7eb1dafc84c29e7870ec + +Fixes #543 +--- + simd/x86_64/jchuff-sse2.asm | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/simd/x86_64/jchuff-sse2.asm b/simd/x86_64/jchuff-sse2.asm +index 1770a84..7e5ca30 100644 +--- a/simd/x86_64/jchuff-sse2.asm ++++ b/simd/x86_64/jchuff-sse2.asm +@@ -1,7 +1,7 @@ + ; + ; jchuff-sse2.asm - Huffman entropy encoding (64-bit SSE2) + ; +-; Copyright (C) 2009-2011, 2014-2016, 2019, D. R. Commander. ++; Copyright (C) 2009-2011, 2014-2016, 2019, 2021, D. R. Commander. + ; Copyright (C) 2015, Matthieu Darbois. + ; Copyright (C) 2018, Matthias Räncker. + ; +@@ -83,6 +83,7 @@ times 1 << 11 db 12 + times 1 << 12 db 13 + times 1 << 13 db 14 + times 1 << 14 db 15 ++times 1 << 15 db 16 + + alignz 32 + +-- +2.32.0 + diff --git a/SOURCES/libjpeg-turbo-cmake.patch b/SOURCES/libjpeg-turbo-cmake.patch new file mode 100644 index 0000000..18fa660 --- /dev/null +++ b/SOURCES/libjpeg-turbo-cmake.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73ebb10..a52a45e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1410,8 +1410,6 @@ if(WITH_TURBOJPEG) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- install(TARGETS tjbench +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND + CMAKE_C_LINKER_SUPPORTS_PDB) + install(FILES "$" +@@ -1422,15 +1420,6 @@ if(WITH_TURBOJPEG) + install(TARGETS turbojpeg-static EXPORT ${CMAKE_PROJECT_NAME}Targets + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- if(NOT ENABLE_SHARED) +- if(MSVC_IDE OR XCODE) +- set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") +- else() +- set(DIR ${CMAKE_CURRENT_BINARY_DIR}) +- endif() +- install(PROGRAMS ${DIR}/tjbench-static${EXE} +- DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE}) +- endif() + endif() + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -1457,18 +1446,6 @@ endif() + + install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg +- ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c +- ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-if(WITH_JAVA) +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java +- DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-endif() +- + if(UNIX OR MINGW) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cjpeg.1 + ${CMAKE_CURRENT_SOURCE_DIR}/djpeg.1 ${CMAKE_CURRENT_SOURCE_DIR}/jpegtran.1 +@@ -1489,7 +1466,7 @@ install(EXPORT ${CMAKE_PROJECT_NAME}Targets + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h +- ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h ${CMAKE_CURRENT_SOURCE_DIR}/jpegint.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + include(cmakescripts/BuildPackages.cmake) diff --git a/SPECS/libjpeg-turbo.spec b/SPECS/libjpeg-turbo.spec new file mode 100644 index 0000000..e149190 --- /dev/null +++ b/SPECS/libjpeg-turbo.spec @@ -0,0 +1,485 @@ +Name: libjpeg-turbo +Version: 2.0.90 +Release: 5%{?dist} +Summary: A MMX/SSE2/SIMD accelerated library for manipulating JPEG image files +License: IJG +URL: http://sourceforge.net/projects/libjpeg-turbo + +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: libjpeg-turbo-cmake.patch +Patch1: libjpeg-turbo-CET.patch +Patch3: libjpeg-turbo-CVE-2021-20205.patch +Patch4: libjpeg-turbo-CVE-2021-37972.patch + +BuildRequires: gcc +BuildRequires: cmake +BuildRequires: libtool +BuildRequires: nasm + +Obsoletes: libjpeg < 6b-47 +# add provides (even if it not needed) to workaround bad packages, like +# java-1.6.0-openjdk (#rh607554) -- atkac +Provides: libjpeg = 6b-47%{?dist} +%if "%{?_isa}" != "" +Provides: libjpeg%{_isa} = 6b-47%{?dist} +%endif + +%description +The libjpeg-turbo package contains a library of functions for manipulating JPEG +images. + +%package devel +Summary: Headers for the libjpeg-turbo library +Obsoletes: libjpeg-devel < 6b-47 +Provides: libjpeg-devel = 6b-47%{?dist} +%if "%{?_isa}" != "" +Provides: libjpeg-devel%{_isa} = 6b-47%{?dist} +%endif +Requires: libjpeg-turbo%{?_isa} = %{version}-%{release} +Obsoletes: libjpeg-turbo-static < 1.3.1 +Provides: libjpeg-turbo-static = 1.3.1%{?dist} + +%description devel +This package contains header files necessary for developing programs which will +manipulate JPEG files using the libjpeg-turbo library. + +%package utils +Summary: Utilities for manipulating JPEG images +Requires: libjpeg-turbo%{?_isa} = %{version}-%{release} + +%description utils +The libjpeg-turbo-utils package contains simple client programs for accessing +the libjpeg functions. It contains cjpeg, djpeg, jpegtran, rdjpgcom and +wrjpgcom. Cjpeg compresses an image file into JPEG format. Djpeg decompresses a +JPEG file into a regular image file. Jpegtran can perform various useful +transformations on JPEG files. Rdjpgcom displays any text comments included in a +JPEG file. Wrjpgcom inserts text comments into a JPEG file. + +%package -n turbojpeg +Summary: TurboJPEG library + +%description -n turbojpeg +The turbojpeg package contains the TurboJPEG shared library. + +%package -n turbojpeg-devel +Summary: Headers for the TurboJPEG library +Requires: turbojpeg%{?_isa} = %{version}-%{release} + +%description -n turbojpeg-devel +This package contains header files necessary for developing programs which will +manipulate JPEG files using the TurboJPEG library. + +%prep +%autosetup -p1 + +%build +# NASM object files are missing GNU Property note for Intel CET, +# force it on the resulting library +%ifarch %{ix86} x86_64 +export LDFLAGS="$RPM_LD_FLAGS -Wl,-z,ibt -Wl,-z,shstk" +%endif + +%{cmake} -DCMAKE_SKIP_RPATH:BOOL=YES \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ +%ifarch s390x + -DFLOATTEST:STRING="fp-contract" \ +%endif + -DENABLE_STATIC:BOOL=NO + +%cmake_build + +%install +%cmake_install +find %{buildroot} -name "*.la" -delete + +# Fix perms +chmod -x README.md + +# multilib header hack +# we only apply this to known Red Hat multilib arches, per bug #1264675 +case `uname -i` in + i386 | ppc | s390 | sparc ) + wordsize="32" + ;; + x86_64 | ppc64 | s390x | sparc64 ) + wordsize="64" + ;; + *) + wordsize="" + ;; +esac + +if test -n "$wordsize" +then + mv $RPM_BUILD_ROOT%{_includedir}/jconfig.h \ + $RPM_BUILD_ROOT%{_includedir}/jconfig-$wordsize.h + + cat >$RPM_BUILD_ROOT%{_includedir}/jconfig.h < + +#if __WORDSIZE == 32 +# include "jconfig-32.h" +#elif __WORDSIZE == 64 +# include "jconfig-64.h" +#else +# error "unexpected value for __WORDSIZE macro" +#endif + +#endif +EOF + +fi + +%check +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +%ctest + +%ldconfig_scriptlets +%ldconfig_scriptlets -n turbojpeg + +%files +%license LICENSE.md +%doc README.md README.ijg ChangeLog.md +%{_libdir}/libjpeg.so.62* + +%files devel +%doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.txt +%{_includedir}/jconfig*.h +%{_includedir}/jerror.h +%{_includedir}/jmorecfg.h +%{_includedir}/jpegint.h +%{_includedir}/jpeglib.h +%{_libdir}/libjpeg.so +%{_libdir}/pkgconfig/libjpeg.pc +%{_libdir}/cmake/%{name}/%{name}*.cmake + +%files utils +%doc usage.txt wizard.txt +%{_bindir}/cjpeg +%{_bindir}/djpeg +%{_bindir}/jpegtran +%{_bindir}/rdjpgcom +%{_bindir}/wrjpgcom +%{_mandir}/man1/cjpeg.1* +%{_mandir}/man1/djpeg.1* +%{_mandir}/man1/jpegtran.1* +%{_mandir}/man1/rdjpgcom.1* +%{_mandir}/man1/wrjpgcom.1* + +%files -n turbojpeg +%license LICENSE.md +%doc README.md README.ijg ChangeLog.md +%{_libdir}/libturbojpeg.so.0* + +%files -n turbojpeg-devel +%doc tjexample.c +%{_includedir}/turbojpeg.h +%{_libdir}/libturbojpeg.so +%{_libdir}/pkgconfig/libturbojpeg.pc + +%changelog +* Sat Sep 25 2021 Nikola Forró - 2.0.90-5 +- Fix CVE-2021-37972 (#2007679) + +* Mon Aug 09 2021 Mohan Boddu - 2.0.90-4 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 2.0.90-3 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Thu Mar 25 2021 Nikola Forró - 2.0.90-2 +- Fix CVE-2021-20205 (#1937387) + +* Thu Jan 28 2021 Nikola Forró - 2.0.90-1 +- New upstream release 2.0.90 (#1898427) + +* Tue Jan 26 2021 Fedora Release Engineering - 2.0.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Aug 04 2020 Nikola Forró - 2.0.5-5 +- Fix FTBFS (#1864007) + +* Sat Aug 01 2020 Fedora Release Engineering - 2.0.5-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Tom Stellard - 2.0.5-2 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Fri Jul 03 2020 Nikola Forró - 2.0.5-1 +- New upstream release 2.0.5 (#1850293) + +* Tue Jun 16 2020 Nikola Forró - 2.0.4-3 +- Fix CVE-2020-13790 (#1847159) + +* Wed Jan 29 2020 Fedora Release Engineering - 2.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 08 2020 Nikola Forró - 2.0.4-1 +- New upstream release 2.0.4 (#1787793) + +* Thu Sep 05 2019 Nikola Forró - 2.0.3-1 +- New upstream release 2.0.3 (#1749130) + +* Thu Jul 25 2019 Fedora Release Engineering - 2.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jun 04 2019 Nikola Forró - 2.0.2-3 +- Fix LDFLAGS + +* Mon Apr 29 2019 Nikola Forró - 2.0.2-2 +- Support running with Intel CET + +* Wed Feb 27 2019 Nikola Forró - 2.0.2-1 +- New upstream release 2.0.2 + +* Fri Feb 01 2019 Fedora Release Engineering - 2.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 11 2019 Nikola Forró - 2.0.0-3 +- Fix CVE-2018-19664 (#1656219) + +* Fri Jan 11 2019 Nikola Forró - 2.0.0-2 +- Fix CVE-2018-20330 (#1665224) + +* Mon Jul 30 2018 Nikola Forró - 2.0.0-1 +- New upstream release 2.0.0 (#1609439) + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.90-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 29 2018 Nikola Forró - 1.5.90-3 +- Fix CVE-2018-1152 (#1593555) + +* Fri Jun 15 2018 Nikola Forró - 1.5.90-2 +- Fix CVE-2018-11813 (#1588804) + +* Wed Mar 28 2018 Nikola Forró - 1.5.90-1 +- New upstream release 1.5.90 (#1560219) + +* Tue Feb 20 2018 Nikola Forró - 1.5.3-4 +- Add missing gcc build dependency + +* Wed Feb 07 2018 Fedora Release Engineering - 1.5.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1.5.3-2 +- Switch to %%ldconfig_scriptlets + +* Tue Dec 19 2017 Nikola Forró - 1.5.3-1 +- New upstream release 1.5.3 (#1468783) + +* Tue Dec 19 2017 Nikola Forró - 1.5.1-5 +- re-enable check on ppc64(le) + +* Thu Aug 03 2017 Fedora Release Engineering - 1.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu May 18 2017 Karsten Hopp - 1.5.1-2 +- disable check on ppc64(le) + +* Fri Feb 10 2017 Fedora Release Engineering - 1.5.1-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Oct 06 2016 Petr Hracek - 1.5.1-1 +- New upstream relelase 1.5.1 (#1377903) + +* Wed Sep 21 2016 Peter Robinson 1.5.0-4 +- Add upstream aarch64 NEON fix, re-enable SIMD on aarch64 + +* Mon Sep 19 2016 Peter Robinson 1.5.0-3 +- Temporarily disable SIMD on aarch64 until upstream #97 is fixed +- Add NEON fix for ARMv7 + +* Tue Sep 13 2016 Peter Robinson 1.5.0-2 +- Add upstream fix to fix SIMD crash on aarch64 (rhbz #1368569) + +* Tue Jun 21 2016 Petr Hracek - 1.5.0-1 +- New upstream release 1.5.0 (#1343786) + +* Thu Mar 10 2016 Petr Hracek - 1.4.90-1 +- New upstream release 1.4.90 (#1313111) + +* Thu Feb 04 2016 Fedora Release Engineering - 1.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 07 2015 Petr Hracek - 1.4.2-2 +- Fix problem with multilibs like jconfig.h (#1264675) + +* Wed Oct 07 2015 Petr Hracek - 1.4.2-1 +- New upstream release 1.4.2 (#1265034) + +* Tue Jun 16 2015 Peter Robinson 1.4.1-1 +- new upstream version 1.4.1 +- nasm available on all arches +- run tests with SMP + +* Tue Jan 20 2015 Petr Hracek - 1.4.0-1 +- new upstream version 1.4.0 (#1180442) + +* Wed Nov 26 2014 Petr Hracek - 1.3.90-3 +- libjpeg-turbo no longer defined macros like JPP (#1164815) + +* Wed Nov 19 2014 Petr Hracek - 1.3.90-2 +- Resolves #1161585 Add suport for secondary arches + +* Mon Oct 27 2014 Petr Hracek - 1.3.90-1 +- new upstream version 1.3.90 +Resolves #1135375 + +* Sun Aug 17 2014 Fedora Release Engineering - 1.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Apr 17 2014 Simone Caronni - 1.3.1-2 +- Re-add libjpeg-devel requirements for broken packages since Fedora 13. + +* Wed Apr 16 2014 Petr Hracek - 1.3.1-1 +- New upstream version +- Remove upstreamed patches, add missing jpegint.h +- Clean up SPEC file +- Disable --static subpackage +- Remove libjpeg obsolency, removed in Fedora 13 + +* Thu Dec 19 2013 Petr Hracek - 1.3.0-2 +- Apply fixes CVE-2013-6629, CVE-2013-6630 (#20131737) + +* Thu Jul 25 2013 Petr Hracek - 1.3.0-1 +- new upstream version +- no soname bump change + +* Tue Mar 26 2013 Adam Tkac - 1.2.90-2 +- rebuild for ARM64 support + +* Fri Feb 08 2013 Adam Tkac 1.2.90-1 +- update to 1.2.90 + +* Mon Feb 04 2013 Adam Tkac 1.2.90-0.1.20130204svn922 +- update to 1.2.80 snapshot (#854695) +- run `make test` during build + +* Fri Jan 18 2013 Adam Tkac 1.2.1-6 +- build with jpeg6 API/ABI (jpeg8-ABI feature was dropped) + +* Tue Dec 04 2012 Adam Tkac 1.2.1-5 +- change license to IJG (#877517) + +* Wed Oct 24 2012 Adam Tkac 1.2.1-4 +- build with jpeg8 API/ABI (#854695) + +* Thu Oct 18 2012 Adam Tkac 1.2.1-3 +- minor provides tuning (#863231) + +* Thu Jul 19 2012 Fedora Release Engineering - 1.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 16 2012 Adam Tkac 1.2.1-1 +- update to 1.2.1 + +* Thu Mar 08 2012 Adam Tkac 1.2.0-1 +- update to 1.2.0 + +* Fri Jan 13 2012 Fedora Release Engineering - 1.1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 21 2011 Orion Poplawski 1.1.1-3 +- Make turobojpeg-devel depend on turbojpeg + +* Fri Oct 7 2011 Orion Poplawski 1.1.1-2 +- Ship the turbojpeg library (#744258) + +* Mon Jul 11 2011 Adam Tkac 1.1.1-1 +- update to 1.1.1 + - ljt11-rh688712.patch merged + +* Tue Mar 22 2011 Adam Tkac 1.1.0-2 +- handle broken JPEGs better (#688712) + +* Tue Mar 01 2011 Adam Tkac 1.1.0-1 +- update to 1.1.0 + +* Tue Feb 08 2011 Fedora Release Engineering - 1.0.90-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 17 2011 Adam Tkac 1.0.90-1 +- update to 1.0.90 +- libjpeg-turbo10-rh639672.patch merged + +* Fri Oct 29 2010 Adam Tkac 1.0.1-3 +- add support for arithmetic coded files into decoder (#639672) + +* Wed Sep 29 2010 jkeating - 1.0.1-2 +- Rebuilt for gcc bug 634757 + +* Mon Sep 13 2010 Adam Tkac 1.0.1-1 +- update to 1.0.1 + - libjpeg-turbo10-rh617469.patch merged +- add -static subpkg (#632859) + +* Wed Aug 04 2010 Adam Tkac 1.0.0-3 +- fix huffman decoder to handle broken JPEGs well (#617469) + +* Fri Jul 02 2010 Adam Tkac 1.0.0-2 +- add libjpeg-devel%%{_isa} provides to -devel subpkg to satisfy imlib-devel + deps + +* Fri Jul 02 2010 Adam Tkac 1.0.0-1 +- update to 1.0.0 +- patches merged + - libjpeg-turbo-programs.patch + - libjpeg-turbo-nosimd.patch +- add libjpeg provides to the main package to workaround problems with broken + java-1.6.0-openjdk package + +* Fri Jul 02 2010 Adam Tkac 0.0.93-13 +- remove libjpeg provides from -utils subpkg + +* Wed Jun 30 2010 Rex Dieter 0.0.93-12 +- move Obsoletes: libjpeg to main pkg + +* Wed Jun 30 2010 Rex Dieter 0.0.93-11 +- -utils: Requires: %%name ... + +* Wed Jun 30 2010 Adam Tkac 0.0.93-10 +- add Provides = libjpeg to -utils subpackage + +* Mon Jun 28 2010 Adam Tkac 0.0.93-9 +- merge review related fixes (#600243) + +* Wed Jun 16 2010 Adam Tkac 0.0.93-8 +- merge review related fixes (#600243) + +* Mon Jun 14 2010 Adam Tkac 0.0.93-7 +- obsolete -static libjpeg subpackage (#600243) + +* Mon Jun 14 2010 Adam Tkac 0.0.93-6 +- improve package description a little (#600243) +- include example.c as %%doc in the -devel subpackage + +* Fri Jun 11 2010 Adam Tkac 0.0.93-5 +- don't use "fc12" disttag in obsoletes/provides (#600243) + +* Thu Jun 10 2010 Adam Tkac 0.0.93-4 +- fix compilation on platforms without MMX/SSE (#600243) + +* Thu Jun 10 2010 Adam Tkac 0.0.93-3 +- package review related fixes (#600243) + +* Wed Jun 09 2010 Adam Tkac 0.0.93-2 +- package review related fixes (#600243) + +* Fri Jun 04 2010 Adam Tkac 0.0.93-1 +- initial package