mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-18 07:18:34 +00:00
[libvpx] Update to v1.12.0
This commit is contained in:
1 parent
287a71dc66
commit
b5046d2a76
572 files changed
+52900
-29493
No files matched your search
@@ -166,6 +166,9 @@ LOCAL_CFLAGS += \
|
||||
-I$(ASM_CNV_PATH)/libvpx
|
||||
|
||||
LOCAL_MODULE := libvpx
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../PATENTS
|
||||
|
||||
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
|
||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||
|
||||
@@ -147,6 +147,16 @@ $(BUILD_PFX)%_avx512.c.o: CFLAGS += -mavx512f -mavx512cd -mavx512bw -mavx512dq -
|
||||
$(BUILD_PFX)%_vsx.c.d: CFLAGS += -maltivec -mvsx
|
||||
$(BUILD_PFX)%_vsx.c.o: CFLAGS += -maltivec -mvsx
|
||||
|
||||
# MIPS
|
||||
$(BUILD_PFX)%_msa.c.d: CFLAGS += -mmsa
|
||||
$(BUILD_PFX)%_msa.c.o: CFLAGS += -mmsa
|
||||
|
||||
# LOONGARCH
|
||||
$(BUILD_PFX)%_lsx.c.d: CFLAGS += -mlsx
|
||||
$(BUILD_PFX)%_lsx.c.o: CFLAGS += -mlsx
|
||||
$(BUILD_PFX)%_lasx.c.d: CFLAGS += -mlasx
|
||||
$(BUILD_PFX)%_lasx.c.o: CFLAGS += -mlasx
|
||||
|
||||
$(BUILD_PFX)%.c.d: %.c
|
||||
$(if $(quiet),@echo " [DEP] $@")
|
||||
$(qexec)mkdir -p $(dir $@)
|
||||
@@ -430,10 +440,10 @@ ifneq ($(call enabled,DIST-SRCS),)
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_vcxproj.sh
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/msvs_common.sh
|
||||
DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/ads2armasm_ms.pl
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/thumb.pm
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/ads2gas.pl
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/ads2gas_apple.pl
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/ads2armasm_ms.pl
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/thumb.pm
|
||||
DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk
|
||||
endif
|
||||
INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS)
|
||||
|
||||
@@ -28,7 +28,7 @@ while (<STDIN>)
|
||||
s/qsubaddx/qsax/i;
|
||||
s/qaddsubx/qasx/i;
|
||||
|
||||
thumb::FixThumbInstructions($_, 1);
|
||||
thumb::FixThumbInstructions($_);
|
||||
|
||||
s/ldrneb/ldrbne/i;
|
||||
s/ldrneh/ldrhne/i;
|
||||
|
||||
@@ -32,7 +32,7 @@ foreach my $arg (@ARGV) {
|
||||
|
||||
print "@ This file was created from a .asm file\n";
|
||||
print "@ using the ads2gas.pl script.\n";
|
||||
print "\t.syntax unified\n";
|
||||
print ".syntax unified\n";
|
||||
if ($thumb) {
|
||||
print "\t.thumb\n";
|
||||
}
|
||||
@@ -42,39 +42,11 @@ if ($thumb) {
|
||||
|
||||
while (<STDIN>)
|
||||
{
|
||||
undef $comment;
|
||||
undef $line;
|
||||
$comment_char = ";";
|
||||
$comment_sub = "@";
|
||||
|
||||
# Handle comments.
|
||||
if (/$comment_char/)
|
||||
{
|
||||
$comment = "";
|
||||
($line, $comment) = /(.*?)$comment_char(.*)/;
|
||||
$_ = $line;
|
||||
}
|
||||
|
||||
# Load and store alignment
|
||||
s/@/,:/g;
|
||||
|
||||
# Hexadecimal constants prefaced by 0x
|
||||
s/#&/#0x/g;
|
||||
|
||||
# Convert :OR: to |
|
||||
s/:OR:/ | /g;
|
||||
|
||||
# Convert :AND: to &
|
||||
s/:AND:/ & /g;
|
||||
|
||||
# Convert :NOT: to ~
|
||||
s/:NOT:/ ~ /g;
|
||||
|
||||
# Convert :SHL: to <<
|
||||
s/:SHL:/ << /g;
|
||||
|
||||
# Convert :SHR: to >>
|
||||
s/:SHR:/ >> /g;
|
||||
# Comment character
|
||||
s/;/@/;
|
||||
|
||||
# Convert ELSE to .else
|
||||
s/\bELSE\b/.else/g;
|
||||
@@ -82,105 +54,51 @@ while (<STDIN>)
|
||||
# Convert ENDIF to .endif
|
||||
s/\bENDIF\b/.endif/g;
|
||||
|
||||
# Convert ELSEIF to .elseif
|
||||
s/\bELSEIF\b/.elseif/g;
|
||||
|
||||
# Convert LTORG to .ltorg
|
||||
s/\bLTORG\b/.ltorg/g;
|
||||
|
||||
# Convert endfunc to nothing.
|
||||
s/\bendfunc\b//ig;
|
||||
|
||||
# Convert FUNCTION to nothing.
|
||||
s/\bFUNCTION\b//g;
|
||||
s/\bfunction\b//g;
|
||||
|
||||
s/\bENTRY\b//g;
|
||||
s/\bMSARMASM\b/0/g;
|
||||
s/^\s+end\s+$//g;
|
||||
|
||||
# Convert IF :DEF:to .if
|
||||
# gcc doesn't have the ability to do a conditional
|
||||
# if defined variable that is set by IF :DEF: on
|
||||
# armasm, so convert it to a normal .if and then
|
||||
# make sure to define a value elesewhere
|
||||
if (s/\bIF :DEF:\b/.if /g)
|
||||
{
|
||||
s/=/==/g;
|
||||
}
|
||||
|
||||
# Convert IF to .if
|
||||
if (s/\bIF\b/.if/g)
|
||||
{
|
||||
if (s/\bIF\b/.if/g) {
|
||||
s/=+/==/g;
|
||||
}
|
||||
|
||||
# Convert INCLUDE to .INCLUDE "file"
|
||||
s/INCLUDE(\s*)(.*)$/.include $1\"$2\"/;
|
||||
|
||||
# Code directive (ARM vs Thumb)
|
||||
s/CODE([0-9][0-9])/.code $1/;
|
||||
s/INCLUDE\s?(.*)$/.include \"$1\"/;
|
||||
|
||||
# No AREA required
|
||||
# But ALIGNs in AREA must be obeyed
|
||||
s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
|
||||
s/^(\s*)\bAREA\b.*ALIGN=([0-9])$/$1.text\n$1.p2align $2/;
|
||||
# If no ALIGN, strip the AREA and align to 4 bytes
|
||||
s/^\s*AREA.*$/.text\n.p2align 2/;
|
||||
s/^(\s*)\bAREA\b.*$/$1.text\n$1.p2align 2/;
|
||||
|
||||
# DCD to .word
|
||||
# This one is for incoming symbols
|
||||
s/DCD\s+\|(\w*)\|/.long $1/;
|
||||
|
||||
# DCW to .short
|
||||
s/DCW\s+\|(\w*)\|/.short $1/;
|
||||
s/DCW(.*)/.short $1/;
|
||||
|
||||
# Constants defined in scope
|
||||
s/DCD(.*)/.long $1/;
|
||||
s/DCB(.*)/.byte $1/;
|
||||
|
||||
# Make function visible to linker, and make additional symbol with
|
||||
# prepended underscore
|
||||
# Make function visible to linker.
|
||||
if ($elf) {
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.global $1 \n\t.type $1, function/;
|
||||
s/(\s*)EXPORT\s+\|([\$\w]*)\|/$1.global $2\n$1.type $2, function/;
|
||||
} else {
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.global $1/;
|
||||
s/(\s*)EXPORT\s+\|([\$\w]*)\|/$1.global $2/;
|
||||
}
|
||||
s/IMPORT\s+\|([\$\w]*)\|/.global $1/;
|
||||
|
||||
s/EXPORT\s+([\$\w]*)/.global $1/;
|
||||
s/export\s+([\$\w]*)/.global $1/;
|
||||
|
||||
# No vertical bars required; make additional symbol with prepended
|
||||
# underscore
|
||||
s/^\|(\$?\w+)\|/_$1\n\t$1:/g;
|
||||
# No vertical bars on function names
|
||||
s/^\|(\$?\w+)\|/$1/g;
|
||||
|
||||
# Labels need trailing colon
|
||||
# s/^(\w+)/$1:/ if !/EQU/;
|
||||
# put the colon at the end of the line in the macro
|
||||
s/^([a-zA-Z_0-9\$]+)/$1:/ if !/EQU/;
|
||||
|
||||
# ALIGN directive
|
||||
s/\bALIGN\b/.balign/g;
|
||||
|
||||
if ($thumb) {
|
||||
# ARM code - we force everything to thumb with the declaration in the header
|
||||
s/\sARM//g;
|
||||
# ARM code - we force everything to thumb with the declaration in the
|
||||
# header
|
||||
s/\bARM\b//g;
|
||||
} else {
|
||||
# ARM code
|
||||
s/\sARM/.arm/g;
|
||||
s/\bARM\b/.arm/g;
|
||||
}
|
||||
|
||||
# push/pop
|
||||
s/(push\s+)(r\d+)/stmdb sp\!, \{$2\}/g;
|
||||
s/(pop\s+)(r\d+)/ldmia sp\!, \{$2\}/g;
|
||||
|
||||
# NEON code
|
||||
s/(vld1.\d+\s+)(q\d+)/$1\{$2\}/g;
|
||||
s/(vtbl.\d+\s+[^,]+),([^,]+)/$1,\{$2\}/g;
|
||||
|
||||
if ($thumb) {
|
||||
thumb::FixThumbInstructions($_, 0);
|
||||
thumb::FixThumbInstructions($_);
|
||||
}
|
||||
|
||||
# eabi_attributes numerical equivalents can be found in the
|
||||
@@ -188,31 +106,31 @@ while (<STDIN>)
|
||||
|
||||
if ($elf) {
|
||||
# REQUIRE8 Stack is required to be 8-byte aligned
|
||||
s/\sREQUIRE8/.eabi_attribute 24, 1 \@Tag_ABI_align_needed/g;
|
||||
s/\bREQUIRE8\b/.eabi_attribute 24, 1 \@Tag_ABI_align_needed/g;
|
||||
|
||||
# PRESERVE8 Stack 8-byte align is preserved
|
||||
s/\sPRESERVE8/.eabi_attribute 25, 1 \@Tag_ABI_align_preserved/g;
|
||||
s/\bPRESERVE8\b/.eabi_attribute 25, 1 \@Tag_ABI_align_preserved/g;
|
||||
} else {
|
||||
s/\sREQUIRE8//;
|
||||
s/\sPRESERVE8//;
|
||||
s/\bREQUIRE8\b//;
|
||||
s/\bPRESERVE8\b//;
|
||||
}
|
||||
|
||||
# Use PROC and ENDP to give the symbols a .size directive.
|
||||
# This makes them show up properly in debugging tools like gdb and valgrind.
|
||||
if (/\bPROC\b/)
|
||||
{
|
||||
if (/\bPROC\b/) {
|
||||
my $proc;
|
||||
/^_([\.0-9A-Z_a-z]\w+)\b/;
|
||||
# Match the function name so it can be stored in $proc
|
||||
/^([\.0-9A-Z_a-z]\w+)\b/;
|
||||
$proc = $1;
|
||||
push(@proc_stack, $proc) if ($proc);
|
||||
s/\bPROC\b/@ $&/;
|
||||
}
|
||||
if (/\bENDP\b/)
|
||||
{
|
||||
|
||||
if (/\bENDP\b/) {
|
||||
my $proc;
|
||||
s/\bENDP\b/@ $&/;
|
||||
$proc = pop(@proc_stack);
|
||||
$_ = "\t.size $proc, .-$proc".$_ if ($proc and $elf);
|
||||
$_ = ".size $proc, .-$proc".$_ if ($proc and $elf);
|
||||
}
|
||||
|
||||
# EQU directive
|
||||
@@ -220,19 +138,20 @@ while (<STDIN>)
|
||||
|
||||
# Begin macro definition
|
||||
if (/\bMACRO\b/) {
|
||||
# Process next line down, which will be the macro definition
|
||||
$_ = <STDIN>;
|
||||
s/^/.macro/;
|
||||
s/\$//g; # remove formal param reference
|
||||
s/;/@/g; # change comment characters
|
||||
s/\$//g; # Remove $ from the variables in the declaration
|
||||
}
|
||||
|
||||
# For macros, use \ to reference formal params
|
||||
s/\$/\\/g; # End macro definition
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
s/\$/\\/g; # Use \ to reference formal parameters
|
||||
# End macro definition
|
||||
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
next if /^\s*END\s*$/;
|
||||
s/[ \t]+$//;
|
||||
print;
|
||||
print "$comment_sub$comment\n" if defined $comment;
|
||||
}
|
||||
|
||||
# Mark that this object doesn't need an executable stack.
|
||||
printf ("\t.section\t.note.GNU-stack,\"\",\%\%progbits\n") if $elf;
|
||||
printf (" .section .note.GNU-stack,\"\",\%\%progbits\n") if $elf;
|
||||
@@ -20,17 +20,14 @@
|
||||
|
||||
print "@ This file was created from a .asm file\n";
|
||||
print "@ using the ads2gas_apple.pl script.\n\n";
|
||||
print "\t.syntax unified\n";
|
||||
print ".syntax unified\n";
|
||||
|
||||
my %register_aliases;
|
||||
my %macro_aliases;
|
||||
|
||||
my @mapping_list = ("\$0", "\$1", "\$2", "\$3", "\$4", "\$5", "\$6", "\$7", "\$8", "\$9");
|
||||
|
||||
my @incoming_array;
|
||||
|
||||
my @imported_functions;
|
||||
|
||||
# Perl trim function to remove whitespace from the start and end of the string
|
||||
sub trim($)
|
||||
{
|
||||
@@ -46,25 +43,7 @@ while (<STDIN>)
|
||||
s/@/,:/g;
|
||||
|
||||
# Comment character
|
||||
s/;/ @/g;
|
||||
|
||||
# Hexadecimal constants prefaced by 0x
|
||||
s/#&/#0x/g;
|
||||
|
||||
# Convert :OR: to |
|
||||
s/:OR:/ | /g;
|
||||
|
||||
# Convert :AND: to &
|
||||
s/:AND:/ & /g;
|
||||
|
||||
# Convert :NOT: to ~
|
||||
s/:NOT:/ ~ /g;
|
||||
|
||||
# Convert :SHL: to <<
|
||||
s/:SHL:/ << /g;
|
||||
|
||||
# Convert :SHR: to >>
|
||||
s/:SHR:/ >> /g;
|
||||
s/;/@/;
|
||||
|
||||
# Convert ELSE to .else
|
||||
s/\bELSE\b/.else/g;
|
||||
@@ -72,131 +51,64 @@ while (<STDIN>)
|
||||
# Convert ENDIF to .endif
|
||||
s/\bENDIF\b/.endif/g;
|
||||
|
||||
# Convert ELSEIF to .elseif
|
||||
s/\bELSEIF\b/.elseif/g;
|
||||
|
||||
# Convert LTORG to .ltorg
|
||||
s/\bLTORG\b/.ltorg/g;
|
||||
|
||||
# Convert IF :DEF:to .if
|
||||
# gcc doesn't have the ability to do a conditional
|
||||
# if defined variable that is set by IF :DEF: on
|
||||
# armasm, so convert it to a normal .if and then
|
||||
# make sure to define a value elesewhere
|
||||
if (s/\bIF :DEF:\b/.if /g)
|
||||
{
|
||||
s/=/==/g;
|
||||
}
|
||||
|
||||
# Convert IF to .if
|
||||
if (s/\bIF\b/.if/g)
|
||||
{
|
||||
s/=/==/g;
|
||||
if (s/\bIF\b/.if/g) {
|
||||
s/=+/==/g;
|
||||
}
|
||||
|
||||
# Convert INCLUDE to .INCLUDE "file"
|
||||
s/INCLUDE(\s*)(.*)$/.include $1\"$2\"/;
|
||||
|
||||
# Code directive (ARM vs Thumb)
|
||||
s/CODE([0-9][0-9])/.code $1/;
|
||||
s/INCLUDE\s?(.*)$/.include \"$1\"/;
|
||||
|
||||
# No AREA required
|
||||
# But ALIGNs in AREA must be obeyed
|
||||
s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
|
||||
s/^(\s*)\bAREA\b.*ALIGN=([0-9])$/$1.text\n$1.p2align $2/;
|
||||
# If no ALIGN, strip the AREA and align to 4 bytes
|
||||
s/^\s*AREA.*$/.text\n.p2align 2/;
|
||||
s/^(\s*)\bAREA\b.*$/$1.text\n$1.p2align 2/;
|
||||
|
||||
# DCD to .word
|
||||
# This one is for incoming symbols
|
||||
s/DCD\s+\|(\w*)\|/.long $1/;
|
||||
# Make function visible to linker.
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.globl _$1/;
|
||||
|
||||
# DCW to .short
|
||||
s/DCW\s+\|(\w*)\|/.short $1/;
|
||||
s/DCW(.*)/.short $1/;
|
||||
# No vertical bars on function names
|
||||
s/^\|(\$?\w+)\|/$1/g;
|
||||
|
||||
# Constants defined in scope
|
||||
s/DCD(.*)/.long $1/;
|
||||
s/DCB(.*)/.byte $1/;
|
||||
# Labels and functions need a leading underscore and trailing colon
|
||||
s/^([a-zA-Z_0-9\$]+)/_$1:/ if !/EQU/;
|
||||
|
||||
# Make function visible to linker, and make additional symbol with
|
||||
# prepended underscore
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.globl _$1\n\t.globl $1/;
|
||||
|
||||
# Prepend imported functions with _
|
||||
if (s/IMPORT\s+\|([\$\w]*)\|/.globl $1/)
|
||||
{
|
||||
$function = trim($1);
|
||||
push(@imported_functions, $function);
|
||||
}
|
||||
|
||||
foreach $function (@imported_functions)
|
||||
{
|
||||
s/$function/_$function/;
|
||||
}
|
||||
|
||||
# No vertical bars required; make additional symbol with prepended
|
||||
# underscore
|
||||
s/^\|(\$?\w+)\|/_$1\n\t$1:/g;
|
||||
|
||||
# Labels need trailing colon
|
||||
# s/^(\w+)/$1:/ if !/EQU/;
|
||||
# put the colon at the end of the line in the macro
|
||||
s/^([a-zA-Z_0-9\$]+)/$1:/ if !/EQU/;
|
||||
# Branches need to call the correct, underscored, function
|
||||
s/^(\s+b[egln]?[teq]?\s+)([a-zA-Z_0-9\$]+)/$1 _$2/ if !/EQU/;
|
||||
|
||||
# ALIGN directive
|
||||
s/\bALIGN\b/.balign/g;
|
||||
|
||||
# Strip ARM
|
||||
s/\sARM/@ ARM/g;
|
||||
s/\s+ARM//;
|
||||
|
||||
# Strip REQUIRE8
|
||||
#s/\sREQUIRE8/@ REQUIRE8/g;
|
||||
s/\sREQUIRE8/@ /g;
|
||||
s/\s+REQUIRE8//;
|
||||
|
||||
# Strip PRESERVE8
|
||||
s/\sPRESERVE8/@ PRESERVE8/g;
|
||||
s/\s+PRESERVE8//;
|
||||
|
||||
# Strip PROC and ENDPROC
|
||||
s/\bPROC\b/@/g;
|
||||
s/\bENDP\b/@/g;
|
||||
s/\bPROC\b//g;
|
||||
s/\bENDP\b//g;
|
||||
|
||||
# EQU directive
|
||||
s/(.*)EQU(.*)/.set $1, $2/;
|
||||
s/(\S+\s+)EQU(\s+\S+)/.equ $1, $2/;
|
||||
|
||||
# Begin macro definition
|
||||
if (/\bMACRO\b/)
|
||||
{
|
||||
if (/\bMACRO\b/) {
|
||||
# Process next line down, which will be the macro definition
|
||||
$_ = <STDIN>;
|
||||
|
||||
$trimmed = trim($_);
|
||||
|
||||
# remove commas that are separating list
|
||||
$trimmed =~ s/,//g;
|
||||
|
||||
# string to array
|
||||
@incoming_array = split(/\s+/, $trimmed);
|
||||
|
||||
print ".macro @incoming_array[0]\n";
|
||||
|
||||
# remove the first element, as that is the name of the macro
|
||||
shift (@incoming_array);
|
||||
|
||||
@macro_aliases{@incoming_array} = @mapping_list;
|
||||
|
||||
next;
|
||||
s/^/.macro/;
|
||||
s/\$//g; # Remove $ from the variables in the declaration
|
||||
}
|
||||
|
||||
while (($key, $value) = each(%macro_aliases))
|
||||
{
|
||||
$key =~ s/\$/\\\$/;
|
||||
s/$key\b/$value/g;
|
||||
}
|
||||
s/\$/\\/g; # Use \ to reference formal parameters
|
||||
# End macro definition
|
||||
|
||||
# For macros, use \ to reference formal params
|
||||
# s/\$/\\/g; # End macro definition
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
next if /^\s*END\s*$/;
|
||||
|
||||
s/[ \t]+$//;
|
||||
print;
|
||||
}
|
||||
@@ -262,6 +262,9 @@ if [ -z "$source_path" ] || [ "$source_path" = "." ]; then
|
||||
source_path="`pwd`"
|
||||
disable_feature source_path_used
|
||||
fi
|
||||
# Makefiles greedily process the '#' character as a comment, even if it is
|
||||
# inside quotes. So, this character must be escaped in all paths in Makefiles.
|
||||
source_path_mk=$(echo $source_path | sed -e 's;\#;\\\#;g')
|
||||
|
||||
if test ! -z "$TMPDIR" ; then
|
||||
TMPDIRx="${TMPDIR}"
|
||||
@@ -439,11 +442,24 @@ void f(void) {
|
||||
}
|
||||
EOF
|
||||
compile_result=$?
|
||||
if [ ${compile_result} -ne 0 ]; then
|
||||
log_echo " disabling avx512: not supported by compiler"
|
||||
disable_feature avx512
|
||||
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx512 "
|
||||
fi
|
||||
#
|
||||
# if [ ${compile_result} -ne 0 ]; then
|
||||
# log_echo " disabling avx512: not supported by compiler"
|
||||
# disable_feature avx512
|
||||
# RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx512 "
|
||||
# fi
|
||||
#*/
|
||||
}
|
||||
|
||||
check_inline_asm() {
|
||||
log check_inline_asm "$@"
|
||||
name="$1"
|
||||
code="$2"
|
||||
shift 2
|
||||
disable_feature $name
|
||||
check_cc "$@" <<EOF && enable_feature $name
|
||||
void foo(void) { __asm__ volatile($code); }
|
||||
EOF
|
||||
}
|
||||
|
||||
write_common_config_banner() {
|
||||
@@ -481,11 +497,11 @@ write_common_target_config_mk() {
|
||||
|
||||
cat >> $1 << EOF
|
||||
# This file automatically generated by configure. Do not edit!
|
||||
SRC_PATH="$source_path"
|
||||
SRC_PATH_BARE=$source_path
|
||||
SRC_PATH="$source_path_mk"
|
||||
SRC_PATH_BARE=$source_path_mk
|
||||
BUILD_PFX=${BUILD_PFX}
|
||||
TOOLCHAIN=${toolchain}
|
||||
ASM_CONVERSION=${asm_conversion_cmd:-${source_path}/build/make/ads2gas.pl}
|
||||
ASM_CONVERSION=${asm_conversion_cmd:-${source_path_mk}/build/make/ads2gas.pl}
|
||||
GEN_VCPROJ=${gen_vcproj_cmd}
|
||||
MSVS_ARCH_DIR=${msvs_arch_dir}
|
||||
|
||||
@@ -518,10 +534,10 @@ fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\${@:.d=.o} \$@;'
|
||||
EOF
|
||||
fi
|
||||
|
||||
print_config_mk ARCH "${1}" ${ARCH_LIST}
|
||||
print_config_mk HAVE "${1}" ${HAVE_LIST}
|
||||
print_config_mk CONFIG "${1}" ${CONFIG_LIST}
|
||||
print_config_mk HAVE "${1}" gnu_strip
|
||||
print_config_mk VPX_ARCH "${1}" ${ARCH_LIST}
|
||||
print_config_mk HAVE "${1}" ${HAVE_LIST}
|
||||
print_config_mk CONFIG "${1}" ${CONFIG_LIST}
|
||||
print_config_mk HAVE "${1}" gnu_strip
|
||||
|
||||
enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}"
|
||||
|
||||
@@ -538,10 +554,10 @@ write_common_target_config_h() {
|
||||
#define RESTRICT ${RESTRICT}
|
||||
#define INLINE ${INLINE}
|
||||
EOF
|
||||
print_config_h ARCH "${TMP_H}" ${ARCH_LIST}
|
||||
print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
|
||||
print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
|
||||
print_config_vars_h "${TMP_H}" ${VAR_LIST}
|
||||
print_config_h VPX_ARCH "${TMP_H}" ${ARCH_LIST}
|
||||
print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
|
||||
print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
|
||||
print_config_vars_h "${TMP_H}" ${VAR_LIST}
|
||||
echo "#endif /* VPX_CONFIG_H */" >> ${TMP_H}
|
||||
mkdir -p `dirname "$1"`
|
||||
cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
|
||||
@@ -763,17 +779,23 @@ process_common_toolchain() {
|
||||
*mips32el*)
|
||||
tgt_isa=mips32
|
||||
;;
|
||||
loongarch32*)
|
||||
tgt_isa=loongarch32
|
||||
;;
|
||||
loongarch64*)
|
||||
tgt_isa=loongarch64
|
||||
;;
|
||||
esac
|
||||
|
||||
# detect tgt_os
|
||||
case "$gcctarget" in
|
||||
arm64-apple-darwin*)
|
||||
tgt_isa=arm64
|
||||
tgt_os=darwin
|
||||
;;
|
||||
*darwin*)
|
||||
*darwin1[0-9]*)
|
||||
tgt_isa=x86_64
|
||||
tgt_os=darwin
|
||||
tgt_os=`echo $gcctarget | sed 's/.*\(darwin1[0-9]\).*/\1/'`
|
||||
;;
|
||||
*darwin2[0-1]*)
|
||||
tgt_isa=`uname -m`
|
||||
tgt_os=`echo $gcctarget | sed 's/.*\(darwin2[0-9]\).*/\1/'`
|
||||
;;
|
||||
x86_64*mingw32*)
|
||||
tgt_os=win64
|
||||
@@ -831,6 +853,11 @@ process_common_toolchain() {
|
||||
ppc*)
|
||||
enable_feature ppc
|
||||
;;
|
||||
loongarch*)
|
||||
soft_enable lsx
|
||||
soft_enable lasx
|
||||
enable_feature loongarch
|
||||
;;
|
||||
esac
|
||||
|
||||
# PIC is probably what we want when building shared libs
|
||||
@@ -849,7 +876,7 @@ process_common_toolchain() {
|
||||
# Handle darwin variants. Newer SDKs allow targeting older
|
||||
# platforms, so use the newest one available.
|
||||
case ${toolchain} in
|
||||
DISABLE-arm*-darwin*)
|
||||
arm*-darwin-*)
|
||||
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${iphoneos_sdk_dir}" ]; then
|
||||
@@ -857,7 +884,7 @@ process_common_toolchain() {
|
||||
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
|
||||
fi
|
||||
;;
|
||||
x86*-darwin*)
|
||||
*-darwin*)
|
||||
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
||||
if [ -d "${osx_sdk_dir}" ]; then
|
||||
add_cflags "-isysroot ${osx_sdk_dir}"
|
||||
@@ -867,15 +894,57 @@ process_common_toolchain() {
|
||||
esac
|
||||
|
||||
case ${toolchain} in
|
||||
*-darwin-*)
|
||||
mvmin=$(sw_vers -productVersion)
|
||||
if [[ $mvmin == 10.* ]]; then
|
||||
mvmin="-mmacosx-version-min=""${mvmin%.*}"
|
||||
else
|
||||
mvmin="-mmacosx-version-min=""${mvmin%%.*}"
|
||||
fi
|
||||
add_cflags $mvmin
|
||||
add_ldflags $mvmin
|
||||
*-darwin8-*)
|
||||
add_cflags "-mmacosx-version-min=10.4"
|
||||
add_ldflags "-mmacosx-version-min=10.4"
|
||||
;;
|
||||
*-darwin9-*)
|
||||
add_cflags "-mmacosx-version-min=10.5"
|
||||
add_ldflags "-mmacosx-version-min=10.5"
|
||||
;;
|
||||
*-darwin10-*)
|
||||
add_cflags "-mmacosx-version-min=10.6"
|
||||
add_ldflags "-mmacosx-version-min=10.6"
|
||||
;;
|
||||
*-darwin11-*)
|
||||
add_cflags "-mmacosx-version-min=10.7"
|
||||
add_ldflags "-mmacosx-version-min=10.7"
|
||||
;;
|
||||
*-darwin12-*)
|
||||
add_cflags "-mmacosx-version-min=10.8"
|
||||
add_ldflags "-mmacosx-version-min=10.8"
|
||||
;;
|
||||
*-darwin13-*)
|
||||
add_cflags "-mmacosx-version-min=10.9"
|
||||
add_ldflags "-mmacosx-version-min=10.9"
|
||||
;;
|
||||
*-darwin14-*)
|
||||
add_cflags "-mmacosx-version-min=10.10"
|
||||
add_ldflags "-mmacosx-version-min=10.10"
|
||||
;;
|
||||
*-darwin15-*)
|
||||
add_cflags "-mmacosx-version-min=10.11"
|
||||
add_ldflags "-mmacosx-version-min=10.11"
|
||||
;;
|
||||
*-darwin16-*)
|
||||
add_cflags "-mmacosx-version-min=10.12"
|
||||
add_ldflags "-mmacosx-version-min=10.12"
|
||||
;;
|
||||
*-darwin17-*)
|
||||
add_cflags "-mmacosx-version-min=10.13"
|
||||
add_ldflags "-mmacosx-version-min=10.13"
|
||||
;;
|
||||
*-darwin18-*)
|
||||
add_cflags "-mmacosx-version-min=10.14"
|
||||
add_ldflags "-mmacosx-version-min=10.14"
|
||||
;;
|
||||
*-darwin19-*)
|
||||
add_cflags "-mmacosx-version-min=10.15"
|
||||
add_ldflags "-mmacosx-version-min=10.15"
|
||||
;;
|
||||
*-darwin2[0-1]-*)
|
||||
add_cflags "-arch ${toolchain%%-*}"
|
||||
add_ldflags "-arch ${toolchain%%-*}"
|
||||
;;
|
||||
*-iphonesimulator-*)
|
||||
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||
@@ -950,7 +1019,7 @@ EOF
|
||||
fi
|
||||
|
||||
enabled debug && add_asflags -g
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2gas.pl"
|
||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2gas.pl"
|
||||
|
||||
case ${tgt_os} in
|
||||
win*)
|
||||
@@ -972,7 +1041,7 @@ EOF
|
||||
# respective SDKs' limitations. Fortunately, these are all 32-bit ABIs
|
||||
# and so can be selected as 'win32'.
|
||||
if [ ${tgt_os} = "win32" ]; then
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2armasm_ms.pl"
|
||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2armasm_ms.pl"
|
||||
AS_SFX=.S
|
||||
msvs_arch_dir=arm-msvs
|
||||
disable_feature multithread
|
||||
@@ -1050,62 +1119,64 @@ EOF
|
||||
soft_enable unit_tests
|
||||
;;
|
||||
|
||||
DISABLE-darwin*)
|
||||
XCRUN_FIND="xcrun --sdk iphoneos --find"
|
||||
CXX="$(${XCRUN_FIND} clang++)"
|
||||
CC="$(${XCRUN_FIND} clang)"
|
||||
AR="$(${XCRUN_FIND} ar)"
|
||||
AS="$(${XCRUN_FIND} as)"
|
||||
STRIP="$(${XCRUN_FIND} strip)"
|
||||
NM="$(${XCRUN_FIND} nm)"
|
||||
RANLIB="$(${XCRUN_FIND} ranlib)"
|
||||
AS_SFX=.S
|
||||
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
||||
darwin)
|
||||
if ! enabled external_build; then
|
||||
XCRUN_FIND="xcrun --sdk iphoneos --find"
|
||||
CXX="$(${XCRUN_FIND} clang++)"
|
||||
CC="$(${XCRUN_FIND} clang)"
|
||||
AR="$(${XCRUN_FIND} ar)"
|
||||
AS="$(${XCRUN_FIND} as)"
|
||||
STRIP="$(${XCRUN_FIND} strip)"
|
||||
NM="$(${XCRUN_FIND} nm)"
|
||||
RANLIB="$(${XCRUN_FIND} ranlib)"
|
||||
AS_SFX=.S
|
||||
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
||||
|
||||
# ASFLAGS is written here instead of using check_add_asflags
|
||||
# because we need to overwrite all of ASFLAGS and purge the
|
||||
# options that were put in above
|
||||
ASFLAGS="-arch ${tgt_isa} -g"
|
||||
# ASFLAGS is written here instead of using check_add_asflags
|
||||
# because we need to overwrite all of ASFLAGS and purge the
|
||||
# options that were put in above
|
||||
ASFLAGS="-arch ${tgt_isa} -g"
|
||||
|
||||
add_cflags -arch ${tgt_isa}
|
||||
add_ldflags -arch ${tgt_isa}
|
||||
add_cflags -arch ${tgt_isa}
|
||||
add_ldflags -arch ${tgt_isa}
|
||||
|
||||
alt_libc="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${alt_libc}" ]; then
|
||||
add_cflags -isysroot ${alt_libc}
|
||||
fi
|
||||
alt_libc="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${alt_libc}" ]; then
|
||||
add_cflags -isysroot ${alt_libc}
|
||||
fi
|
||||
|
||||
if [ "${LD}" = "${CXX}" ]; then
|
||||
add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
|
||||
else
|
||||
add_ldflags -ios_version_min "${IOS_VERSION_MIN}"
|
||||
fi
|
||||
if [ "${LD}" = "${CXX}" ]; then
|
||||
add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
|
||||
else
|
||||
add_ldflags -ios_version_min "${IOS_VERSION_MIN}"
|
||||
fi
|
||||
|
||||
for d in lib usr/lib usr/lib/system; do
|
||||
try_dir="${alt_libc}/${d}"
|
||||
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
|
||||
done
|
||||
for d in lib usr/lib usr/lib/system; do
|
||||
try_dir="${alt_libc}/${d}"
|
||||
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
|
||||
done
|
||||
|
||||
case ${tgt_isa} in
|
||||
armv7|armv7s|armv8|arm64)
|
||||
if enabled neon && ! check_xcode_minimum_version; then
|
||||
soft_disable neon
|
||||
log_echo " neon disabled: upgrade Xcode (need v6.3+)."
|
||||
if enabled neon_asm; then
|
||||
soft_disable neon_asm
|
||||
log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
|
||||
case ${tgt_isa} in
|
||||
armv7|armv7s|armv8|arm64)
|
||||
if enabled neon && ! check_xcode_minimum_version; then
|
||||
soft_disable neon
|
||||
log_echo " neon disabled: upgrade Xcode (need v6.3+)."
|
||||
if enabled neon_asm; then
|
||||
soft_disable neon_asm
|
||||
log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
|
||||
|
||||
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
|
||||
check_add_cflags -fembed-bitcode
|
||||
check_add_asflags -fembed-bitcode
|
||||
check_add_ldflags -fembed-bitcode
|
||||
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
|
||||
check_add_cflags -fembed-bitcode
|
||||
check_add_asflags -fembed-bitcode
|
||||
check_add_ldflags -fembed-bitcode
|
||||
fi
|
||||
fi
|
||||
|
||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2gas_apple.pl"
|
||||
;;
|
||||
|
||||
linux*)
|
||||
@@ -1159,25 +1230,27 @@ EOF
|
||||
check_add_asflags -mips64r6 -mabi=64 -mhard-float -mfp64
|
||||
check_add_ldflags -mips64r6 -mabi=64 -mfp64
|
||||
;;
|
||||
loongson3*)
|
||||
check_cflags -march=loongson3a && soft_enable mmi \
|
||||
|| disable_feature mmi
|
||||
check_cflags -mmsa && soft_enable msa \
|
||||
|| disable_feature msa
|
||||
tgt_isa=loongson3a
|
||||
;;
|
||||
esac
|
||||
|
||||
if enabled mmi || enabled msa; then
|
||||
soft_enable runtime_cpu_detect
|
||||
fi
|
||||
|
||||
if enabled msa; then
|
||||
# TODO(libyuv:793)
|
||||
# The new mips functions in libyuv do not build
|
||||
# with the toolchains we currently use for testing.
|
||||
soft_disable libyuv
|
||||
|
||||
add_cflags -mmsa
|
||||
add_asflags -mmsa
|
||||
add_ldflags -mmsa
|
||||
fi
|
||||
fi
|
||||
|
||||
if enabled mmi; then
|
||||
tgt_isa=loongson3a
|
||||
check_add_ldflags -march=loongson3a
|
||||
fi
|
||||
|
||||
check_add_cflags -march=${tgt_isa}
|
||||
check_add_asflags -march=${tgt_isa}
|
||||
check_add_asflags -KPIC
|
||||
@@ -1247,10 +1320,6 @@ EOF
|
||||
enabled optimizations && disabled gprof && check_add_cflags -fomit-frame-pointer
|
||||
;;
|
||||
vs*)
|
||||
# When building with Microsoft Visual Studio the assembler is
|
||||
# invoked directly. Checking at configure time is unnecessary.
|
||||
# Skip the check by setting AS arbitrarily
|
||||
AS=msvs
|
||||
msvs_arch_dir=x86-msvs
|
||||
case ${tgt_cc##vs} in
|
||||
14)
|
||||
@@ -1374,6 +1443,15 @@ EOF
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
loongarch*)
|
||||
link_with_cc=gcc
|
||||
setup_gnu_toolchain
|
||||
|
||||
enabled lsx && check_inline_asm lsx '"vadd.b $vr0, $vr1, $vr1"'
|
||||
enabled lsx && soft_enable runtime_cpu_detect
|
||||
enabled lasx && check_inline_asm lasx '"xvadd.b $xr0, $xr1, $xr1"'
|
||||
enabled lasx && soft_enable runtime_cpu_detect
|
||||
;;
|
||||
*-gcc|generic-gnu)
|
||||
link_with_cc=gcc
|
||||
enable_feature gcc
|
||||
@@ -1450,9 +1528,7 @@ EOF
|
||||
check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
void *thread_check (void *);
|
||||
void *thread_check (void *obj){ return obj;};
|
||||
int main(void) { pthread_t thread_id; return pthread_create(&thread_id, NULL, thread_check, NULL); }
|
||||
int main(void) { return pthread_create(NULL, NULL, NULL, NULL); }
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
@@ -1478,6 +1554,22 @@ EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
# only for LOONGARCH platforms
|
||||
case ${toolchain} in
|
||||
loongarch*)
|
||||
if enabled big_endian; then
|
||||
if enabled lsx; then
|
||||
echo "lsx optimizations are available only for little endian platforms"
|
||||
disable_feature lsx
|
||||
fi
|
||||
if enabled lasx; then
|
||||
echo "lasx optimizations are available only for little endian platforms"
|
||||
disable_feature lasx
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# glibc needs these
|
||||
if enabled linux; then
|
||||
add_cflags -D_LARGEFILE_SOURCE
|
||||
|
||||
@@ -25,7 +25,7 @@ files.
|
||||
Options:
|
||||
--help Print this message
|
||||
--out=outfile Redirect output to a file
|
||||
--ver=version Version (7,8,9,10,11,12,14,15) of visual studio to generate for
|
||||
--ver=version Version (14-17) of visual studio to generate for
|
||||
--target=isa-os-cc Target specifier
|
||||
EOF
|
||||
exit 1
|
||||
@@ -213,13 +213,15 @@ for opt in "$@"; do
|
||||
;;
|
||||
--dep=*) eval "${optval%%:*}_deps=\"\${${optval%%:*}_deps} ${optval##*:}\""
|
||||
;;
|
||||
--ver=*) vs_ver="$optval"
|
||||
case $optval in
|
||||
10|11|12|14|15)
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
esac
|
||||
--ver=*)
|
||||
vs_ver="$optval"
|
||||
case $optval in
|
||||
14) vs_year=2015 ;;
|
||||
15) vs_year=2017 ;;
|
||||
16) vs_year=2019 ;;
|
||||
17) vs_year=2022 ;;
|
||||
*) die Unrecognized Visual Studio Version in $opt ;;
|
||||
esac
|
||||
;;
|
||||
--target=*) target="${optval}"
|
||||
;;
|
||||
@@ -230,21 +232,11 @@ for opt in "$@"; do
|
||||
done
|
||||
outfile=${outfile:-/dev/stdout}
|
||||
mkoutfile=${mkoutfile:-/dev/stdout}
|
||||
case "${vs_ver:-10}" in
|
||||
10) sln_vers="11.00"
|
||||
sln_vers_str="Visual Studio 2010"
|
||||
;;
|
||||
11) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2012"
|
||||
;;
|
||||
12) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2013"
|
||||
;;
|
||||
14) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2015"
|
||||
;;
|
||||
15) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2017"
|
||||
case "${vs_ver}" in
|
||||
1[4-7])
|
||||
# VS has used Format Version 12.00 continuously since vs11.
|
||||
sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio ${vs_year}"
|
||||
;;
|
||||
esac
|
||||
sfx=vcxproj
|
||||
|
||||
@@ -34,7 +34,7 @@ Options:
|
||||
--name=project_name Name of the project (required)
|
||||
--proj-guid=GUID GUID to use for the project
|
||||
--module-def=filename File containing export definitions (for DLLs)
|
||||
--ver=version Version (10,11,12,14,15) of visual studio to generate for
|
||||
--ver=version Version (14-16) of visual studio to generate for
|
||||
--src-path-bare=dir Path to root of source tree
|
||||
-Ipath/to/include Additional include directories
|
||||
-DFLAG[=value] Preprocessor macros to define
|
||||
@@ -82,7 +82,7 @@ generate_filter() {
|
||||
| sed -e "s,$src_path_bare,," \
|
||||
-e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
|
||||
|
||||
if ([ "$pat" == "asm" ] || [ "$pat" == "s" ] || [ "$pat" == "S" ]) && $asm_use_custom_step; then
|
||||
if ([ "$pat" == "asm" ] || [ "$pat" == "s" ] || [ "$pat" == "S" ]) && $uses_asm; then
|
||||
# Avoid object file name collisions, i.e. vpx_config.c and
|
||||
# vpx_config.asm produce the same object file without
|
||||
# this additional suffix.
|
||||
@@ -157,6 +157,8 @@ for opt in "$@"; do
|
||||
;;
|
||||
--lib) proj_kind="lib"
|
||||
;;
|
||||
--as=*) as="${optval}"
|
||||
;;
|
||||
--src-path-bare=*)
|
||||
src_path_bare=$(fix_path "$optval")
|
||||
src_path_bare=${src_path_bare%/}
|
||||
@@ -168,7 +170,7 @@ for opt in "$@"; do
|
||||
--ver=*)
|
||||
vs_ver="$optval"
|
||||
case "$optval" in
|
||||
10|11|12|14|15)
|
||||
1[4-7])
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
@@ -215,13 +217,7 @@ fix_file_list file_list
|
||||
|
||||
outfile=${outfile:-/dev/stdout}
|
||||
guid=${guid:-`generate_uuid`}
|
||||
asm_use_custom_step=false
|
||||
uses_asm=${uses_asm:-false}
|
||||
case "${vs_ver:-11}" in
|
||||
10|11|12|14|15)
|
||||
asm_use_custom_step=$uses_asm
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$name" ] || die "Project name (--name) must be specified!"
|
||||
[ -n "$target" ] || die "Target (--target) must be specified!"
|
||||
@@ -253,13 +249,13 @@ libs=${libs// /;}
|
||||
case "$target" in
|
||||
x86_64*)
|
||||
platforms[0]="x64"
|
||||
asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} "%(FullPath)""
|
||||
asm_Debug_cmdline="${as} -Xvc -gcv8 -f win64 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="${as} -Xvc -f win64 ${yasmincs} "%(FullPath)""
|
||||
;;
|
||||
x86*)
|
||||
platforms[0]="Win32"
|
||||
asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} "%(FullPath)""
|
||||
asm_Debug_cmdline="${as} -Xvc -gcv8 -f win32 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="${as} -Xvc -f win32 ${yasmincs} "%(FullPath)""
|
||||
;;
|
||||
arm64*)
|
||||
platforms[0]="ARM64"
|
||||
@@ -339,32 +335,18 @@ generate_vcxproj() {
|
||||
else
|
||||
tag_content ConfigurationType StaticLibrary
|
||||
fi
|
||||
if [ "$vs_ver" = "11" ]; then
|
||||
if [ "$plat" = "ARM" ]; then
|
||||
# Setting the wp80 toolchain automatically sets the
|
||||
# WINAPI_FAMILY define, which is required for building
|
||||
# code for arm with the windows headers. Alternatively,
|
||||
# one could add AppContainerApplication=true in the Globals
|
||||
# section and add PrecompiledHeader=NotUsing and
|
||||
# CompileAsWinRT=false in ClCompile and SubSystem=Console
|
||||
# in Link.
|
||||
tag_content PlatformToolset v110_wp80
|
||||
else
|
||||
tag_content PlatformToolset v110
|
||||
fi
|
||||
fi
|
||||
if [ "$vs_ver" = "12" ]; then
|
||||
# Setting a PlatformToolset indicating windows phone isn't
|
||||
# enough to build code for arm with MSVC 2013, one strictly
|
||||
# has to enable AppContainerApplication as well.
|
||||
tag_content PlatformToolset v120
|
||||
fi
|
||||
if [ "$vs_ver" = "14" ]; then
|
||||
tag_content PlatformToolset v140
|
||||
fi
|
||||
if [ "$vs_ver" = "15" ]; then
|
||||
tag_content PlatformToolset v141
|
||||
fi
|
||||
if [ "$vs_ver" = "16" ]; then
|
||||
tag_content PlatformToolset v142
|
||||
fi
|
||||
if [ "$vs_ver" = "17" ]; then
|
||||
tag_content PlatformToolset v143
|
||||
fi
|
||||
tag_content CharacterSet Unicode
|
||||
if [ "$config" = "Release" ]; then
|
||||
tag_content WholeProgramOptimization true
|
||||
|
||||
@@ -35,8 +35,8 @@ ARM_TARGETS="arm64-darwin-gcc
|
||||
armv7s-darwin-gcc"
|
||||
SIM_TARGETS="x86-iphonesimulator-gcc
|
||||
x86_64-iphonesimulator-gcc"
|
||||
OSX_TARGETS="x86-darwin20-gcc
|
||||
x86_64-darwin20-gcc"
|
||||
OSX_TARGETS="x86-darwin16-gcc
|
||||
x86_64-darwin16-gcc"
|
||||
TARGETS="${ARM_TARGETS} ${SIM_TARGETS}"
|
||||
|
||||
# Configures for the target specified by $1, and invokes make with the dist
|
||||
@@ -272,7 +272,7 @@ cat << EOF
|
||||
--help: Display this message and exit.
|
||||
--enable-shared: Build a dynamic framework for use on iOS 8 or later.
|
||||
--extra-configure-args <args>: Extra args to pass when configuring libvpx.
|
||||
--macosx: Uses darwin20 targets instead of iphonesimulator targets for x86
|
||||
--macosx: Uses darwin16 targets instead of iphonesimulator targets for x86
|
||||
and x86_64. Allows linking to framework when builds target MacOSX
|
||||
instead of iOS.
|
||||
--preserve-build-output: Do not delete the build directory.
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \
|
||||
shell_name="$(uname -o 2>/dev/null)"
|
||||
if [[ "$shell_name" = "Cygwin" || "$shell_name" = "Msys" ]] \
|
||||
&& cygpath --help >/dev/null 2>&1; then
|
||||
FIXPATH='cygpath -m'
|
||||
else
|
||||
|
||||
@@ -315,14 +315,26 @@ EOF
|
||||
|
||||
sub mips() {
|
||||
determine_indirection("c", @ALL_ARCHS);
|
||||
|
||||
# Assign the helper variable for each enabled extension
|
||||
foreach my $opt (@ALL_ARCHS) {
|
||||
my $opt_uc = uc $opt;
|
||||
eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
|
||||
}
|
||||
|
||||
common_top;
|
||||
|
||||
print <<EOF;
|
||||
#include "vpx_config.h"
|
||||
|
||||
#ifdef RTCD_C
|
||||
#include "vpx_ports/mips.h"
|
||||
static void setup_rtcd_internal(void)
|
||||
{
|
||||
int flags = mips_cpu_caps();
|
||||
|
||||
(void)flags;
|
||||
|
||||
EOF
|
||||
|
||||
set_function_pointers("c", @ALL_ARCHS);
|
||||
@@ -375,6 +387,37 @@ EOF
|
||||
common_bottom;
|
||||
}
|
||||
|
||||
sub loongarch() {
|
||||
determine_indirection("c", @ALL_ARCHS);
|
||||
|
||||
# Assign the helper variable for each enabled extension
|
||||
foreach my $opt (@ALL_ARCHS) {
|
||||
my $opt_uc = uc $opt;
|
||||
eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
|
||||
}
|
||||
|
||||
common_top;
|
||||
print <<EOF;
|
||||
#include "vpx_config.h"
|
||||
|
||||
#ifdef RTCD_C
|
||||
#include "vpx_ports/loongarch.h"
|
||||
static void setup_rtcd_internal(void)
|
||||
{
|
||||
int flags = loongarch_cpu_caps();
|
||||
|
||||
(void)flags;
|
||||
EOF
|
||||
|
||||
set_function_pointers("c", @ALL_ARCHS);
|
||||
|
||||
print <<EOF;
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
common_bottom;
|
||||
}
|
||||
|
||||
sub unoptimized() {
|
||||
determine_indirection "c";
|
||||
common_top;
|
||||
@@ -410,24 +453,35 @@ if ($opts{arch} eq 'x86') {
|
||||
&require(@REQUIRES);
|
||||
x86;
|
||||
} elsif ($opts{arch} eq 'mips32' || $opts{arch} eq 'mips64') {
|
||||
my $have_dspr2 = 0;
|
||||
my $have_msa = 0;
|
||||
my $have_mmi = 0;
|
||||
@ALL_ARCHS = filter("$opts{arch}");
|
||||
open CONFIG_FILE, $opts{config} or
|
||||
die "Error opening config file '$opts{config}': $!\n";
|
||||
while (<CONFIG_FILE>) {
|
||||
if (/HAVE_DSPR2=yes/) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
|
||||
last;
|
||||
$have_dspr2 = 1;
|
||||
}
|
||||
if (/HAVE_MSA=yes/) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/msa/);
|
||||
last;
|
||||
$have_msa = 1;
|
||||
}
|
||||
if (/HAVE_MMI=yes/) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/mmi/);
|
||||
last;
|
||||
$have_mmi = 1;
|
||||
}
|
||||
}
|
||||
close CONFIG_FILE;
|
||||
if ($have_dspr2 == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
|
||||
} elsif ($have_msa == 1 && $have_mmi == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/mmi msa/);
|
||||
} elsif ($have_msa == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/msa/);
|
||||
} elsif ($have_mmi == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/mmi/);
|
||||
} else {
|
||||
unoptimized;
|
||||
}
|
||||
mips;
|
||||
} elsif ($opts{arch} =~ /armv7\w?/) {
|
||||
@ALL_ARCHS = filter(qw/neon_asm neon/);
|
||||
@@ -439,6 +493,9 @@ if ($opts{arch} eq 'x86') {
|
||||
} elsif ($opts{arch} =~ /^ppc/ ) {
|
||||
@ALL_ARCHS = filter(qw/vsx/);
|
||||
ppc;
|
||||
} elsif ($opts{arch} =~ /loongarch/ ) {
|
||||
@ALL_ARCHS = filter(qw/lsx lasx/);
|
||||
loongarch;
|
||||
} else {
|
||||
unoptimized;
|
||||
}
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
|
||||
package thumb;
|
||||
|
||||
sub FixThumbInstructions($$)
|
||||
sub FixThumbInstructions($)
|
||||
{
|
||||
my $short_branches = $_[1];
|
||||
my $branch_shift_offset = $short_branches ? 1 : 0;
|
||||
|
||||
# Write additions with shifts, such as "add r10, r11, lsl #8",
|
||||
# in three operand form, "add r10, r10, r11, lsl #8".
|
||||
s/(add\s+)(r\d+),\s*(r\d+),\s*(lsl #\d+)/$1$2, $2, $3, $4/g;
|
||||
|
||||
Reference in new issue
Block a user