diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2020-02-06 04:57:36 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2020-02-06 04:57:36 +0000 |
commit | de7c5d7cb4c490164a16beb53f2bd15249fe1b5c (patch) | |
tree | 8b0ede00b07fd91d975e9a20b94cade64fddce34 /multimedia | |
parent | 6048cc19e18d43484ecd2afd54bdd57b61c4107e (diff) |
My usage of -fuse-ld=lld has hidden a linking problem reported
by several people. Rework for the default linker to work as well.
Also, fix the build on i386, where use of assembler code needs
to be disabled for pixel-widths other than 8.
PR: 238773
Reported by: VVD, Alan Valentine, kib@, jbeich@
Notes
Notes:
svn path=/head/; revision=525362
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/x265/Makefile | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/multimedia/x265/Makefile b/multimedia/x265/Makefile index 02cd11ddf4a6..162dc373173c 100644 --- a/multimedia/x265/Makefile +++ b/multimedia/x265/Makefile @@ -70,10 +70,9 @@ CMAKE_ARGS+= -DMAIN12:BOOL=true .endif .if "${DEFAULT_DEPTH}" != "HI8P" -CMAKE_ARGS+= -DHIGH_BIT_DEPTH:BOOL=true +CMAKE_ARGS+= -DHIGH_BIT_DEPTH:BOOL=true .endif -CFLAGS+= ${OTHER_DEPTHS:C/HI([0-9]+)P/-DLINKED_\1BIT/} CMAKE_OTHER_ARGS=${CMAKE_ARGS:C/.*-D_END_CUSTOM_OPTIONS=1 +//W} .if ${PORT_OPTIONS:MDEBUG} @@ -81,26 +80,41 @@ CFLAGS:= ${CFLAGS:N-O*} -O0 -g .endif .for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/} -EXTRA_LINK_FLAGS+=${WRKSRC:H}/$bbit/libx265.a +EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit + +.if ${ARCH} == i386 && $b != 8 +ASSEMBLY=false +.else +ASSEMBLY=true +.endif + pre-build:: @${ECHO_MSG} "---> Building the $b-bit library ---" ${MKDIR} ${WRKSRC:H}/$bbit ${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \ ${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \ - -DMAIN$b:BOOL=true \ + -DMAIN$b:BOOL=true -DENABLE_ASSEMBLY:BOOL=${ASSEMBLY} \ -DEXPORT_C_API:BOOL=false -DENABLE_CLI=false ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS} + ${LN} ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a ${ECHO_MSG} "---> Built the $b-bit library ---" .endfor .if "${EXTRA_LINK_FLAGS}" -CMAKE_ARGS+= -DEXTRA_LINK_FLAGS=${EXTRA_LINK_FLAGS:Q} +CMAKE_ARGS+= -DEXTRA_LINK_FLAGS:STRING="${EXTRA_LINK_FLAGS}" +CMAKE_ARGS+= -DEXTRA_LIB="${OTHER_DEPTHS:C/HI([0-9]+)P/x265_\1bit/:C/ /;/gW}" +CMAKE_ARGS+= ${OTHER_DEPTHS:C/HI([0-9]+)P/-DLINKED_\1BIT:BOOL=true/} .endif -CMAKE_ARGS+= -D_END_CUSTOM_OPTIONS=1 CMAKE_ARGS+= -DENABLE_SHARED:BOOL=true +.if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" +CMAKE_ARGS+= -DENABLE_ASSEMBLY:BOOL=false +.else do-test: ${WRKDIR}/.build/test/TestBench +.endif + +CMAKE_ARGS+= -D_END_CUSTOM_OPTIONS=1 .include <bsd.port.mk> |