[FFmpeg-devel] [PATCH 1/2] configure: build fix for mips cpu p5600
Michael Niedermayer
michael at niedermayer.cc
Thu Mar 3 18:36:09 CET 2016
On Thu, Mar 03, 2016 at 07:26:56PM +0530, shivraj.patil at imgtec.com wrote:
> From: Shivraj Patil <shivraj.patil at imgtec.com>
>
> Signed-off-by: Shivraj Patil <shivraj.patil at imgtec.com>
> ---
> configure | 217 ++++++++++++++++++++++++++++---------------------------------
> 1 file changed, 101 insertions(+), 116 deletions(-)
[...]
> + if [ "$cpu" == "generic" ]; then
../configure: 4188: [: generic: unexpected operator
> + # the unwanted features.
> + echo 'generic CPU selected'
> + else
> + disable mipsfpu
> + disable mips32r2
> + disable mips32r5
> + disable mips64r2
> + disable mips32r6
> + disable mips64r6
> + disable mipsdsp
> + disable mipsdspr2
> + disable msa
> + disable loongson2
> + disable loongson3
> + disable mmi
> +
> + case $cpu in
> + 24kc)
> + enable mips32r2
> + ;;
> + 24kf*)
> + enable mips32r2
> + enable mipsfpu
> + ;;
> + 24kec|34kc|1004kc)
> + enable mips32r2
> + enable mipsdsp
> + ;;
> + 24kef*|34kf*|1004kf*)
> + enable mips32r2
> + enable mipsfpu
> + enable mipsdsp
> + ;;
> + 74kc)
> + enable mips32r2
> + enable mipsdsp
> + enable mipsdspr2
> + ;;
> + 74kf)
> + enable mips32r2
> + enable mipsfpu
> + enable mipsdsp
> + enable mipsdspr2
breaks --cpu=74kf --disable-mipsfpu
also is this (from configure) correct?
mipsfpu_deps="mips"
mipsdsp_deps="mips"
mipsdspr2_deps="mips"
mips32r2_deps="mips"
mips32r6_deps="mips"
mips64r2_deps="mips"
mips64r6_deps="mips"
msa_deps="mips"
mmi_deps="mips"
there is no dependancy betwen features ?
so a cpu can have mips32r6 without mips32r2 ?
if that is not possible then the dependancies should be corrected
if mips32r6 would depend on mips32r2 then only disabling the later
would be sufficient
That assumes no code uses mips32r6 and has sideefects before the
dependancy solver is run (thats quite plausibly not true atm)
also the feature checks look hackish
for example:
if enabled msa; then
check_ldflags "-mfp64 -mmsa" &&
add_cflags "-mfp64 -mmsa" &&
add_asflags "-mfp64 -mmsa" &&
check_inline_asm msa '"addvi.b $w0, $w1, 1"' &&
check_header msa.h ||
disable msa
fi
else
this adds all kinds of flags and _AFTER_ that tests the instruction
if it isnt supported msa is disabled but all the flags are left in
there
the outcome should either be msa on and needed flags in OR
msa off and no flags added IIUC
the same issue exists with other mips features too
if check_inline_asm doesnt work for mips then maybe a
check_inline_asm_flags or something could be added that tests
asm with flags and does the whole on / off atomically without
poluting the various flags in the failure case
quite possibly there are other solutions/options ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160303/2862e2ce/attachment.sig>
More information about the ffmpeg-devel
mailing list