libvpx: Update to 1.14.0 Changelog: 2024-01-02 v1.14.0 "Venetian Duck" This release drops support for old C compilers, such as Visual Studio 2012 and older, that disallow mixing variable declarations and statements (a C99 feature). It adds support for run-time CPU feature detection for Arm platforms, as well as support for darwin23 (macOS 14). - Upgrading: This release is ABI incompatible with the previous release. Various new features for rate control library for real-time: SVC parallel encoding, loopfilter level, support for frame dropping, and screen content. New callback function send_tpl_gop_stats for vp9 external rate control library, which can be used to transmit TPL stats for a group of pictures. A public header vpx_tpl.h is added for the definition of TPL stats used in this callback. libwebm is upgraded to libwebm-1.0.0.29-9-g1930e3c. - Enhancement: Improvements on Neon optimizations: VoD: 12-35% speed up for bitdepth 8, 68%-151% speed up for high bitdepth. Improvements on AVX2 and SSE optimizations. Improvements on LSX optimizations for LoongArch. 42-49% speedup on speed 0 VoD encoding. Android API level predicates. - Bug fixes: Fix to missing prototypes from the rtcd header. Fix to segfault when total size is enlarged but width is smaller. Fix to the build for arm64ec using MSVC. Fix to copy BLOCK_8X8's mi to PICK_MODE_CONTEXT::mic. Fix to -Wshadow warnings. Fix to heap overflow in vpx_get4x4sse_cs_neon. Fix to buffer overrun in highbd Neon subpel variance filters. Added bitexact encode test script. Fix to -Wl,-z,defs with Clang's sanitizers. Fix to decoder stability after error & continued decoding. Fix to mismatch of VP9 encode with NEON intrinsics with C only version. Fix to Arm64 MSVC compile vpx_highbd_fdct4x4_neon. Fix to fragments count before use. Fix to a case where target bandwidth is 0 for SVC. Fix mask in vp9_quantize_avx2,highbd_get_max_lane_eob. Fix to int overflow in vp9_calc_pframe_target_size_one_pass_cbr. Fix to integer overflow in vp8,ratectrl.c. Fix to integer overflow in vp9 svc. Fix to avg_frame_bandwidth overflow. Fix to per frame qp for temporal layers. Fix to unsigned integer overflow in sse computation. Fix to uninitialized mesh feature for BEST mode. Fix to overflow in highbd temporal_filter. Fix to unaligned loads w/w==4 in vpx_convolve_copy_neon. Skip arm64_neon.h workaround w/VS >= 2019. Fix to c vs avx mismatch of diamond_search_sad(). Fix to c vs intrinsic mismatch of vpx_hadamard_32x32() function. Fix to a bug in vpx_hadamard_32x32_neon(). Fix to Clang -Wunreachable-code-aggressive warnings. Fix to a bug in vpx_highbd_hadamard_32x32_neon(). Fix to -Wunreachable-code in mfqe_partition. Force mode search on 64x64 if no mode is selected. Fix to ubsan failure caused by left shift of negative. Fix to integer overflow in calc_pframe_target_size. Fix to float-cast-overflow in vp8_change_config(). Fix to a null ptr before use. Conditionally skip using inter frames in speed features. Remove invalid reference frames. Disable intra mode search speed features conditionally. Set nonrd keyframe under dynamic change of deadline for rtc. Fix to scaled reference offsets. Set skip_recode=0 in nonrd_pick_sb_modes. Fix to an edge case when downsizing to one. Fix to a bug in frame scaling. Fix to pred buffer stride. Fix to a bug in simple motion search. Update frame size in actual encoding.diff -r1.102 -r1.103 pkgsrc/multimedia/libvpx/Makefile
(ryoon)
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.102 2023/11/09 16:48:03 nia Exp $ | 1 | # $NetBSD: Makefile,v 1.103 2024/01/22 13:09:26 ryoon Exp $ | |
2 | 2 | |||
3 | DISTNAME= libvpx-1.13.1 | 3 | DISTNAME= libvpx-1.14.0 | |
4 | CATEGORIES= multimedia | 4 | CATEGORIES= multimedia | |
5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/} | 5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/} | |
6 | GITHUB_TAG= v${PKGVERSION_NOREV} | 6 | GITHUB_TAG= v${PKGVERSION_NOREV} | |
7 | 7 | |||
8 | MAINTAINER= ryoon@NetBSD.org | 8 | MAINTAINER= ryoon@NetBSD.org | |
9 | HOMEPAGE= https://chromium.googlesource.com/webm/libvpx | 9 | HOMEPAGE= https://chromium.googlesource.com/webm/libvpx | |
10 | COMMENT= On2 VP8/VP9 video codec library from Google | 10 | COMMENT= On2 VP8/VP9 video codec library from Google | |
11 | LICENSE= modified-bsd | 11 | LICENSE= modified-bsd | |
12 | 12 | |||
13 | USE_LANGUAGES= c c++ | 13 | USE_LANGUAGES= c c++ | |
14 | USE_CXX_FEATURES+= c++11 | 14 | USE_CXX_FEATURES+= c++11 | |
15 | USE_LIBTOOL= yes | 15 | USE_LIBTOOL= yes | |
16 | USE_TOOLS+= gmake bash:build perl:build | 16 | USE_TOOLS+= gmake bash:build perl:build |
@@ -1,15 +1,16 @@ | @@ -1,15 +1,16 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.7 2021/04/14 07:02:49 adam Exp $ | 1 | @comment $NetBSD: PLIST,v 1.8 2024/01/22 13:09:26 ryoon Exp $ | |
2 | bin/vpxdec | 2 | bin/vpxdec | |
3 | bin/vpxenc | 3 | bin/vpxenc | |
4 | include/vpx/vp8.h | 4 | include/vpx/vp8.h | |
5 | include/vpx/vp8cx.h | 5 | include/vpx/vp8cx.h | |
6 | include/vpx/vp8dx.h | 6 | include/vpx/vp8dx.h | |
7 | include/vpx/vpx_codec.h | 7 | include/vpx/vpx_codec.h | |
8 | include/vpx/vpx_decoder.h | 8 | include/vpx/vpx_decoder.h | |
9 | include/vpx/vpx_encoder.h | 9 | include/vpx/vpx_encoder.h | |
10 | include/vpx/vpx_ext_ratectrl.h | 10 | include/vpx/vpx_ext_ratectrl.h | |
11 | include/vpx/vpx_frame_buffer.h | 11 | include/vpx/vpx_frame_buffer.h | |
12 | include/vpx/vpx_image.h | 12 | include/vpx/vpx_image.h | |
13 | include/vpx/vpx_integer.h | 13 | include/vpx/vpx_integer.h | |
14 | include/vpx/vpx_tpl.h | |||
14 | lib/libvpx.la | 15 | lib/libvpx.la | |
15 | lib/pkgconfig/vpx.pc | 16 | lib/pkgconfig/vpx.pc |
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: buildlink3.mk,v 1.9 2023/07/18 18:34:31 nia Exp $ | 1 | # $NetBSD: buildlink3.mk,v 1.10 2024/01/22 13:09:26 ryoon Exp $ | |
2 | 2 | |||
3 | BUILDLINK_TREE+= libvpx | 3 | BUILDLINK_TREE+= libvpx | |
4 | 4 | |||
5 | .if !defined(LIBVPX_BUILDLINK3_MK) | 5 | .if !defined(LIBVPX_BUILDLINK3_MK) | |
6 | LIBVPX_BUILDLINK3_MK:= | 6 | LIBVPX_BUILDLINK3_MK:= | |
7 | 7 | |||
8 | BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.6.0 | 8 | BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.14.0 | |
9 | BUILDLINK_ABI_DEPENDS.libvpx+= libvpx>=1.11.0nb1 | 9 | BUILDLINK_ABI_DEPENDS.libvpx+= libvpx>=1.14.0 | |
10 | BUILDLINK_PKGSRCDIR.libvpx?= ../../multimedia/libvpx | 10 | BUILDLINK_PKGSRCDIR.libvpx?= ../../multimedia/libvpx | |
11 | 11 | |||
12 | USE_CXX_FEATURES+= c++11 | 12 | USE_CXX_FEATURES+= c++11 | |
13 | 13 | |||
14 | .include "../../mk/pthread.buildlink3.mk" | 14 | .include "../../mk/pthread.buildlink3.mk" | |
15 | .endif # LIBVPX_BUILDLINK3_MK | 15 | .endif # LIBVPX_BUILDLINK3_MK | |
16 | 16 | |||
17 | BUILDLINK_TREE+= -libvpx | 17 | BUILDLINK_TREE+= -libvpx |
@@ -1,10 +1,10 @@ | @@ -1,10 +1,10 @@ | |||
1 | $NetBSD: distinfo,v 1.49 2023/10/01 08:20:19 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.50 2024/01/22 13:09:26 ryoon Exp $ | |
2 | 2 | |||
3 | BLAKE2s (libvpx-1.13.1.tar.gz) = 43dd93abcb6ca410aab9393ae5dd408ac2736aeba0f54f681acdc8e416769e79 | 3 | BLAKE2s (libvpx-1.14.0.tar.gz) = 3a33d153ec455c2cb72951ca89ef04fdb1caf9d72f2f5e61bf3652950f61d51b | |
4 | SHA512 (libvpx-1.13.1.tar.gz) = 49706838563c92fab7334376848d0f374efcbc1729ef511e967c908fd2ecd40e8d197f1d85da6553b3a7026bdbc17e5a76595319858af26ce58cb9a4c3854897 | 4 | SHA512 (libvpx-1.14.0.tar.gz) = 724150c5cafa934e0a8dd9aebbab8afd25aa4f584734e0de37837ec2e8bdcbd9390acd7f883665be7ecdc27af93afda737a4dea7e3bd7531abffcc5bb7c2c7d2 | |
5 | Size (libvpx-1.13.1.tar.gz) = 5515662 bytes | 5 | Size (libvpx-1.14.0.tar.gz) = 5606471 bytes | |
6 | SHA1 (patch-build_make_Makefile) = 908b1abc8c5eed56e920f442f8f1f80c49838a6f | 6 | SHA1 (patch-build_make_Makefile) = f36e7addd3e26536e80f806e1bf759a9a72b4ce8 | |
7 | SHA1 (patch-build_make_configure.sh) = 018bb2333f1de509a81ae4c7b390076043f18118 | 7 | SHA1 (patch-build_make_configure.sh) = ef4247ed3712ed81654f465f813160685dc09e8b | |
8 | SHA1 (patch-configure) = aeb5bfd9d58b06b4f2fdbdb8c73b03339de313e7 | 8 | SHA1 (patch-configure) = aeb5bfd9d58b06b4f2fdbdb8c73b03339de313e7 | |
9 | SHA1 (patch-examples.mk) = 17410f43ff9952d616be3211ca697f37c107610a | 9 | SHA1 (patch-examples.mk) = 17410f43ff9952d616be3211ca697f37c107610a | |
10 | SHA1 (patch-libs.mk) = 9ddc9cb6c09c9eefce59072c2a657bc5b7e1d295 | 10 | SHA1 (patch-libs.mk) = 9ddc9cb6c09c9eefce59072c2a657bc5b7e1d295 |
@@ -1,130 +1,130 @@ | @@ -1,130 +1,130 @@ | |||
1 | $NetBSD: patch-build_make_Makefile,v 1.2 2020/01/28 19:20:09 adam Exp $ | 1 | $NetBSD: patch-build_make_Makefile,v 1.3 2024/01/22 13:09:26 ryoon Exp $ | |
2 | 2 | |||
3 | --- build/make/Makefile.orig 2017-01-12 20:27:27.000000000 +0000 | 3 | --- build/make/Makefile.orig 2024-01-09 21:12:22.000000000 +0000 | |
4 | +++ build/make/Makefile | 4 | +++ build/make/Makefile | |
5 | @@ -147,7 +147,7 @@ $(BUILD_PFX)%.c.d: %.c | 5 | @@ -173,7 +173,7 @@ $(BUILD_PFX)%.c.d: %.c | |
6 | $(BUILD_PFX)%.c.o: %.c | 6 | $(BUILD_PFX)%.c.o: %.c | |
7 | $(if $(quiet),@echo " [CC] $@") | 7 | $(if $(quiet),@echo " [CC] $@") | |
8 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | 8 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | |
9 | - $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< | 9 | - $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< | |
10 | + $(qexec)${LIBTOOL} --mode=compile $(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< | 10 | + $(qexec)${LIBTOOL} --mode=compile $(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< | |
11 | 11 | |||
12 | $(BUILD_PFX)%.cc.d: %.cc | 12 | $(BUILD_PFX)%.cc.d: %.cc | |
13 | $(if $(quiet),@echo " [DEP] $@") | 13 | $(if $(quiet),@echo " [DEP] $@") | |
14 | @@ -157,7 +157,7 @@ $(BUILD_PFX)%.cc.d: %.cc | 14 | @@ -183,7 +183,7 @@ $(BUILD_PFX)%.cc.d: %.cc | |
15 | $(BUILD_PFX)%.cc.o: %.cc | 15 | $(BUILD_PFX)%.cc.o: %.cc | |
16 | $(if $(quiet),@echo " [CXX] $@") | 16 | $(if $(quiet),@echo " [CXX] $@") | |
17 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | 17 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | |
18 | - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | 18 | - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | |
19 | + $(qexec)${LIBTOOL} --mode=compile $(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | 19 | + $(qexec)${LIBTOOL} --mode=compile $(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | |
20 | 20 | |||
21 | $(BUILD_PFX)%.cpp.d: %.cpp | 21 | $(BUILD_PFX)%.cpp.d: %.cpp | |
22 | $(if $(quiet),@echo " [DEP] $@") | 22 | $(if $(quiet),@echo " [DEP] $@") | |
23 | @@ -167,7 +167,7 @@ $(BUILD_PFX)%.cpp.d: %.cpp | 23 | @@ -193,7 +193,7 @@ $(BUILD_PFX)%.cpp.d: %.cpp | |
24 | $(BUILD_PFX)%.cpp.o: %.cpp | 24 | $(BUILD_PFX)%.cpp.o: %.cpp | |
25 | $(if $(quiet),@echo " [CXX] $@") | 25 | $(if $(quiet),@echo " [CXX] $@") | |
26 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | 26 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | |
27 | - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | 27 | - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | |
28 | + $(qexec)${LIBTOOL} --mode=compile $(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | 28 | + $(qexec)${LIBTOOL} --mode=compile $(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< | |
29 | 29 | |||
30 | $(BUILD_PFX)%.asm.d: %.asm | 30 | $(BUILD_PFX)%.asm.d: %.asm | |
31 | $(if $(quiet),@echo " [DEP] $@") | 31 | $(if $(quiet),@echo " [DEP] $@") | |
32 | @@ -178,7 +178,8 @@ $(BUILD_PFX)%.asm.d: %.asm | 32 | @@ -204,7 +204,8 @@ $(BUILD_PFX)%.asm.d: %.asm | |
33 | $(BUILD_PFX)%.asm.o: %.asm | 33 | $(BUILD_PFX)%.asm.o: %.asm | |
34 | $(if $(quiet),@echo " [AS] $@") | 34 | $(if $(quiet),@echo " [AS] $@") | |
35 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | 35 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | |
36 | - $(qexec)$(AS) $(ASFLAGS) -o $@ $< | 36 | - $(qexec)$(AS) $(ASFLAGS) -o $@ $< | |
37 | + $(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \ | 37 | + $(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \ | |
38 | + $(AS) $(ASFLAGS) -o $@ $< | 38 | + $(AS) $(ASFLAGS) -o $@ $< | |
39 | 39 | |||
40 | $(BUILD_PFX)%.S.d: %.S | 40 | $(BUILD_PFX)%.S.d: %.S | |
41 | $(if $(quiet),@echo " [DEP] $@") | 41 | $(if $(quiet),@echo " [DEP] $@") | |
42 | @@ -189,7 +190,8 @@ $(BUILD_PFX)%.S.d: %.S | 42 | @@ -215,7 +216,8 @@ $(BUILD_PFX)%.S.d: %.S | |
43 | $(BUILD_PFX)%.S.o: %.S | 43 | $(BUILD_PFX)%.S.o: %.S | |
44 | $(if $(quiet),@echo " [AS] $@") | 44 | $(if $(quiet),@echo " [AS] $@") | |
45 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | 45 | $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) | |
46 | - $(qexec)$(AS) $(ASFLAGS) -o $@ $< | 46 | - $(qexec)$(AS) $(ASFLAGS) -o $@ $< | |
47 | + $(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \ | 47 | + $(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \ | |
48 | + $(AS) $(ASFLAGS) -o $@ $< | 48 | + $(AS) $(ASFLAGS) -o $@ $< | |
49 | 49 | |||
50 | .PRECIOUS: %.c.S | 50 | .PRECIOUS: %.c.S | |
51 | %.c.S: CFLAGS += -DINLINE_ASM | 51 | %.c.S: CFLAGS += -DINLINE_ASM | |
52 | @@ -254,13 +256,15 @@ define linker_template | 52 | @@ -280,13 +282,15 @@ define linker_template | |
53 | $(1): $(filter-out -%,$(2)) | 53 | $(1): $(filter-out -%,$(2)) | |
54 | $(1): | 54 | $(1): | |
55 | $(if $(quiet),@echo " [LD] $$@") | 55 | $(if $(quiet),@echo " [LD] $$@") | |
56 | - $(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) | 56 | - $(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) | |
57 | + $(qexec)${LIBTOOL} --mode=link $(CXX) $(LDFLAGS) -o $$@ \ | 57 | + $(qexec)${LIBTOOL} --mode=link $(CXX) $(LDFLAGS) -o $$@ \ | |
58 | + $$(filter-out -lvpx,$(2)) libvpx.la $$(extralibs) | 58 | + $$(filter-out -lvpx,$(2)) libvpx.la $$(extralibs) | |
59 | endef | 59 | endef | |
60 | define linkerxx_template | 60 | define linkerxx_template | |
61 | $(1): $(filter-out -%,$(2)) | 61 | $(1): $(filter-out -%,$(2)) | |
62 | $(1): | 62 | $(1): | |
63 | $(if $(quiet),@echo " [LD] $$@") | 63 | $(if $(quiet),@echo " [LD] $$@") | |
64 | - $(qexec)$$(CXX) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) | 64 | - $(qexec)$$(CXX) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) | |
65 | + $(qexec)${LIBTOOL} --mode=link ${CXX} $(LDFLAGS) -o $$@ \ | 65 | + $(qexec)${LIBTOOL} --mode=link ${CXX} $(LDFLAGS) -o $$@ \ | |
66 | + $$(filter-out -lvpx,$(2)) libvpx.la $$(extralibs) | 66 | + $$(filter-out -lvpx,$(2)) libvpx.la $$(extralibs) | |
67 | endef | 67 | endef | |
68 | # make-3.80 has a bug with expanding large input strings to the eval function, | 68 | # make-3.80 has a bug with expanding large input strings to the eval function, | |
69 | # which was triggered in some cases by the following component of | 69 | # which was triggered in some cases by the following component of | |
70 | @@ -273,8 +277,12 @@ endef | 70 | @@ -299,8 +303,12 @@ endef | |
71 | define install_map_template | 71 | define install_map_template | |
72 | $(DIST_DIR)/$(1): $(2) | 72 | $(DIST_DIR)/$(1): $(2) | |
73 | $(if $(quiet),@echo " [INSTALL] $$@") | 73 | $(if $(quiet),@echo " [INSTALL] $$@") | |
74 | - $(qexec)mkdir -p $$(dir $$@) | 74 | - $(qexec)mkdir -p $$(dir $$@) | |
75 | - $(qexec)cp -p $$< $$@ | 75 | - $(qexec)cp -p $$< $$@ | |
76 | + $(qexec)${BSD_INSTALL_DATA} -d -m 755 $$(dir $$@) | 76 | + $(qexec)${BSD_INSTALL_DATA} -d -m 755 $$(dir $$@) | |
77 | + $$(if $$(filter %.a,$$<), \ | 77 | + $$(if $$(filter %.a,$$<), \ | |
78 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c $$(patsubst %.a,%.la,$$<) $$(dir $$@), \ | 78 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c $$(patsubst %.a,%.la,$$<) $$(dir $$@), \ | |
79 | + $$(if $$(filter %.h %.pc,$$<), \ | 79 | + $$(if $$(filter %.h %.pc,$$<), \ | |
80 | + ${BSD_INSTALL_DATA} -c -m 644 $$< $$(dir $$@), \ | 80 | + ${BSD_INSTALL_DATA} -c -m 644 $$< $$(dir $$@), \ | |
81 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c -s $$< $$(dir $$@))) | 81 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c -s $$< $$(dir $$@))) | |
82 | endef | 82 | endef | |
83 | 83 | |||
84 | define archive_template | 84 | define archive_template | |
85 | @@ -283,7 +291,9 @@ define archive_template | 85 | @@ -309,7 +317,9 @@ define archive_template | |
86 | # for creating them. | 86 | # for creating them. | |
87 | $(1): | 87 | $(1): | |
88 | $(if $(quiet),@echo " [AR] $$@") | 88 | $(if $(quiet),@echo " [AR] $$@") | |
89 | - $(qexec)$$(AR) $$(ARFLAGS) $$@ $$^ | 89 | - $(qexec)$$(AR) $$(ARFLAGS) $$@ $$^ | |
90 | + $(qexec)${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -Wl,-Bsymbolic -o $$(patsubst %.a,%.la,$$@) \ | 90 | + $(qexec)${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -Wl,-Bsymbolic -o $$(patsubst %.a,%.la,$$@) \ | |
91 | + $$(patsubst %.o,%.lo,$$?) -rpath $(PREFIX)/lib $$(extralibs) \ | 91 | + $$(patsubst %.o,%.lo,$$?) -rpath $(PREFIX)/lib $$(extralibs) \ | |
92 | + -version-info $(VERSION_MAJOR):$(VERSION_MINOR) | 92 | + -version-info $(VERSION_MAJOR):$(VERSION_MINOR) | |
93 | endef | 93 | endef | |
94 | 94 | |||
95 | define so_template | 95 | # Don't use -Wl,-z,defs with Clang's sanitizers. | |
96 | @@ -377,9 +387,9 @@ clean:: | 96 | @@ -417,9 +427,9 @@ clean:: | |
97 | rm -f .bins .install-bins $(BINS) | 97 | rm -f .bins .install-bins $(BINS) | |
98 | 98 | |||
99 | LIBS=$(call enabled,LIBS) | 99 | LIBS=$(call enabled,LIBS) | |
100 | -.libs: $(LIBS) | 100 | -.libs: $(LIBS) | |
101 | +dot.libs: $(LIBS) | 101 | +dot.libs: $(LIBS) | |
102 | @touch $@ | 102 | @touch $@ | |
103 | -$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) | 103 | -$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) | |
104 | +$(foreach lib,$(filter %.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) | 104 | +$(foreach lib,$(filter %.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) | |
105 | $(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) | 105 | $(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) | |
106 | $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) | 106 | $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) | |
107 | $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib)))) | 107 | $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib)))) | |
108 | @@ -388,11 +398,11 @@ INSTALL-LIBS=$(call cond_enabled,CONFIG_ | 108 | @@ -428,11 +438,11 @@ INSTALL-LIBS=$(call cond_enabled,CONFIG_ | |
109 | ifeq ($(MAKECMDGOALS),dist) | 109 | ifeq ($(MAKECMDGOALS),dist) | |
110 | INSTALL-LIBS+=$(call cond_enabled,CONFIG_INSTALL_LIBS,DIST-LIBS) | 110 | INSTALL-LIBS+=$(call cond_enabled,CONFIG_INSTALL_LIBS,DIST-LIBS) | |
111 | endif | 111 | endif | |
112 | -.install-libs: .libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS)) | 112 | -.install-libs: .libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS)) | |
113 | +.install-libs: dot.libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS)) | 113 | +.install-libs: dot.libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS)) | |
114 | @touch $@ | 114 | @touch $@ | |
115 | 115 | |||
116 | clean:: | 116 | clean:: | |
117 | - rm -f .libs .install-libs $(LIBS) | 117 | - rm -f .libs .install-libs $(LIBS) | |
118 | + rm -f dot.libs .install-libs $(LIBS) | 118 | + rm -f dot.libs .install-libs $(LIBS) | |
119 | 119 | |||
120 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | 120 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | |
121 | PROJECTS=$(call enabled,PROJECTS) | 121 | PROJECTS=$(call enabled,PROJECTS) | |
122 | @@ -442,7 +452,7 @@ ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | 122 | @@ -482,7 +492,7 @@ ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | |
123 | BUILD_TARGETS += .projects | 123 | BUILD_TARGETS += .projects | |
124 | INSTALL_TARGETS += .install-projects | 124 | INSTALL_TARGETS += .install-projects | |
125 | endif | 125 | endif | |
126 | -BUILD_TARGETS += .docs .libs .bins | 126 | -BUILD_TARGETS += .docs .libs .bins | |
127 | +BUILD_TARGETS += .docs dot.libs .bins | 127 | +BUILD_TARGETS += .docs dot.libs .bins | |
128 | INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins | 128 | INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins | |
129 | all: $(BUILD_TARGETS) | 129 | all: $(BUILD_TARGETS) | |
130 | install:: $(INSTALL_TARGETS) | 130 | install:: $(INSTALL_TARGETS) |
@@ -1,66 +1,66 @@ | @@ -1,66 +1,66 @@ | |||
1 | $NetBSD: patch-build_make_configure.sh,v 1.3 2022/07/15 11:04:33 adam Exp $ | 1 | $NetBSD: patch-build_make_configure.sh,v 1.4 2024/01/22 13:09:26 ryoon Exp $ | |
2 | 2 | |||
3 | *BSD and qnx are identified as linux. | 3 | *BSD and qnx are identified as linux. | |
4 | Add another SDK path on Mac OS X. | 4 | Add another SDK path on Mac OS X. | |
5 | All sparc cpus can not do unaligned access. | 5 | All sparc cpus can not do unaligned access. | |
6 | Detect NetBSD ARMv7 hardfloat toolchain. | 6 | Detect NetBSD ARMv7 hardfloat toolchain. | |
7 | Recognize powerpc as a target ISA, so we don't end up with generic-gnu | 7 | Recognize powerpc as a target ISA, so we don't end up with generic-gnu | |
8 | 8 | |||
9 | --- build/make/configure.sh.orig 2022-06-28 19:00:48.000000000 +0000 | 9 | --- build/make/configure.sh.orig 2024-01-09 21:12:22.000000000 +0000 | |
10 | +++ build/make/configure.sh | 10 | +++ build/make/configure.sh | |
11 | @@ -751,7 +751,7 @@ process_common_toolchain() { | 11 | @@ -752,7 +752,7 @@ process_common_toolchain() { | |
12 | aarch64*) | 12 | aarch64*) | |
13 | tgt_isa=arm64 | 13 | tgt_isa=arm64 | |
14 | ;; | 14 | ;; | |
15 | - armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf) | 15 | - armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf) | |
16 | + armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf | armv7*-netbsd*-*hf) | 16 | + armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf | armv7*-netbsd*-*hf) | |
17 | tgt_isa=armv7 | 17 | tgt_isa=armv7 | |
18 | float_abi=hard | 18 | float_abi=hard | |
19 | ;; | 19 | ;; | |
20 | @@ -783,6 +783,9 @@ process_common_toolchain() { | 20 | @@ -784,6 +784,9 @@ process_common_toolchain() { | |
21 | loongarch64*) | 21 | loongarch64*) | |
22 | tgt_isa=loongarch64 | 22 | tgt_isa=loongarch64 | |
23 | ;; | 23 | ;; | |
24 | + *powerpc*) | 24 | + *powerpc*) | |
25 | + tgt_isa=powerpc | 25 | + tgt_isa=powerpc | |
26 | + ;; | 26 | + ;; | |
27 | esac | 27 | esac | |
28 | 28 | |||
29 | # detect tgt_os | 29 | # detect tgt_os | |
30 | @@ -805,7 +808,7 @@ process_common_toolchain() { | 30 | @@ -806,7 +809,7 @@ process_common_toolchain() { | |
31 | [ -z "$tgt_isa" ] && tgt_isa=x86 | 31 | [ -z "$tgt_isa" ] && tgt_isa=x86 | |
32 | tgt_os=win32 | 32 | tgt_os=win32 | |
33 | ;; | 33 | ;; | |
34 | - *linux*|*bsd*) | 34 | - *linux*|*bsd*) | |
35 | + *linux*|*bsd*|*qnx6*) | 35 | + *linux*|*bsd*|*qnx6*) | |
36 | tgt_os=linux | 36 | tgt_os=linux | |
37 | ;; | 37 | ;; | |
38 | *solaris2.10) | 38 | *solaris2.10) | |
39 | @@ -856,6 +859,9 @@ process_common_toolchain() { | 39 | @@ -861,6 +864,9 @@ process_common_toolchain() { | |
40 | soft_enable lasx | 40 | soft_enable lasx | |
41 | enable_feature loongarch | 41 | enable_feature loongarch | |
42 | ;; | 42 | ;; | |
43 | + sparc*) | 43 | + sparc*) | |
44 | + disable_feature fast_unaligned | 44 | + disable_feature fast_unaligned | |
45 | + ;; | 45 | + ;; | |
46 | esac | 46 | esac | |
47 | 47 | |||
48 | # PIC is probably what we want when building shared libs | 48 | # Position independent code (PIC) is probably what we want when building | |
49 | @@ -1506,7 +1512,7 @@ EOF | 49 | @@ -1533,7 +1539,7 @@ EOF | |
50 | check_cc <<EOF | 50 | check_cc <<EOF | |
51 | unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E'; | 51 | unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E'; | |
52 | EOF | 52 | EOF | |
53 | - [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' | | 53 | - [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' | | |
54 | + [ -f "${TMP_O}" ] && od -t x1 "${TMP_O}" | tr -d '\n' | | 54 | + [ -f "${TMP_O}" ] && od -t x1 "${TMP_O}" | tr -d '\n' | | |
55 | grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian | 55 | grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian | |
56 | 56 | |||
57 | # Try to find which inline keywords are supported | 57 | # Try to find which inline keywords are supported | |
58 | @@ -1523,7 +1529,7 @@ EOF | 58 | @@ -1550,7 +1556,7 @@ EOF | |
59 | # bionic includes basic pthread functionality, obviating -lpthread. | 59 | # bionic includes basic pthread functionality, obviating -lpthread. | |
60 | ;; | 60 | ;; | |
61 | *) | 61 | *) | |
62 | - check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h | 62 | - check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h | |
63 | + check_header pthread.h && check_lib ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} <<EOF && add_extralibs ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} || disable_feature pthread_h | 63 | + check_header pthread.h && check_lib ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} <<EOF && add_extralibs ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} || disable_feature pthread_h | |
64 | #include <pthread.h> | 64 | #include <pthread.h> | |
65 | #include <stddef.h> | 65 | #include <stddef.h> | |
66 | int main(void) { return pthread_create(NULL, NULL, NULL, NULL); } | 66 | int main(void) { return pthread_create(NULL, NULL, NULL, NULL); } |