apply arch patch to libmad

custom
jacqueline 2 years ago
parent 42c387807f
commit b92ed7f34f
  1. 0
      lib/libmad/AUTHORS
  2. 0
      lib/libmad/ChangeLog
  3. 0
      lib/libmad/NEWS
  4. 29
      lib/libmad/aclocal.m4
  5. 68
      lib/libmad/configure
  6. 69
      lib/libmad/configure.ac
  7. 4
      src/codecs/CMakeLists.txt
  8. 29
      src/codecs/codec.hpp

@ -9813,35 +9813,6 @@ else
fi
])
# -*- Autoconf -*-
# Obsolete and "removed" macros, that must however still report explicit
# error messages when used, to smooth transition.
#
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([AM_CONFIG_HEADER],
[AC_DIAGNOSE([obsolete],
['$0': this macro is obsolete.
You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
AC_CONFIG_HEADERS($@)])
AC_DEFUN([AM_PROG_CC_STDC],
[AC_PROG_CC
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
AC_DIAGNOSE([obsolete],
['$0': this macro is obsolete.
You should simply use the 'AC][_PROG_CC' macro instead.
Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
but upon 'ac_cv_prog_cc_stdc'.])])
AC_DEFUN([AM_C_PROTOTYPES],
[AC_FATAL([automatic de-ANSI-fication support has been removed])])
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2021 Free Software Foundation, Inc.

@ -13076,71 +13076,7 @@ done
if test "$GCC" = yes
then
if test -z "$arch"
then
case "$host" in
i386-*) ;;
i?86-*) arch="-march=i486" ;;
arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
powerpc-*) ;;
mips*-agenda-*) arch="-mcpu=vr4100" ;;
mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
esac
fi
case "$optimize" in
-O|"-O "*)
optimize="-O"
optimize="$optimize -fforce-mem"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"
optimize="$optimize -fthread-jumps"
optimize="$optimize -fcse-follow-jumps"
optimize="$optimize -fcse-skip-blocks"
: #x optimize="$optimize -frerun-cse-after-loop"
: #x optimize="$optimize -frerun-loop-opt"
: #x optimize="$optimize -fgcse"
optimize="$optimize -fexpensive-optimizations"
optimize="$optimize -fregmove"
: #* optimize="$optimize -fdelayed-branch"
: #x optimize="$optimize -fschedule-insns"
optimize="$optimize -fschedule-insns2"
: #? optimize="$optimize -ffunction-sections"
: #? optimize="$optimize -fcaller-saves"
: #> optimize="$optimize -funroll-loops"
: #> optimize="$optimize -funroll-all-loops"
: #x optimize="$optimize -fmove-all-movables"
: #x optimize="$optimize -freduce-all-givs"
: #? optimize="$optimize -fstrict-aliasing"
: #* optimize="$optimize -fstructure-noalias"
case "$host" in
arm*-*)
optimize="$optimize -fstrength-reduce"
;;
mips*-*)
optimize="$optimize -fstrength-reduce"
optimize="$optimize -finline-functions"
;;
i?86-*)
optimize="$optimize -fstrength-reduce"
;;
powerpc-apple-*)
# this triggers an internal compiler error with gcc2
: #optimize="$optimize -fstrength-reduce"
# this is really only beneficial with gcc3
: #optimize="$optimize -finline-functions"
;;
*)
# this sometimes provokes bugs in gcc 2.95.2
: #optimize="$optimize -fstrength-reduce"
;;
esac
;;
esac
optimize="-O2"
fi
case "$host" in
@ -14011,6 +13947,7 @@ if test -z "$FPM" && test "$GCC" = yes
then
case "$host" in
i?86-*) FPM="INTEL" ;;
x86_64*) FPM="64BIT" ;;
arm*-*) FPM="ARM" ;;
mips*-*) FPM="MIPS" ;;
sparc*-*) FPM="SPARC" ;;
@ -14267,6 +14204,7 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'

@ -28,7 +28,7 @@ AC_CONFIG_SRCDIR([decoder.h])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
AC_CONFIG_HEADER([config.h])
dnl System type.
@ -124,71 +124,7 @@ done
if test "$GCC" = yes
then
if test -z "$arch"
then
case "$host" in
i386-*) ;;
i?86-*) arch="-march=i486" ;;
arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
powerpc-*) ;;
mips*-agenda-*) arch="-mcpu=vr4100" ;;
mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
esac
fi
case "$optimize" in
-O|"-O "*)
optimize="-O"
optimize="$optimize -fforce-mem"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"
optimize="$optimize -fthread-jumps"
optimize="$optimize -fcse-follow-jumps"
optimize="$optimize -fcse-skip-blocks"
: #x optimize="$optimize -frerun-cse-after-loop"
: #x optimize="$optimize -frerun-loop-opt"
: #x optimize="$optimize -fgcse"
optimize="$optimize -fexpensive-optimizations"
optimize="$optimize -fregmove"
: #* optimize="$optimize -fdelayed-branch"
: #x optimize="$optimize -fschedule-insns"
optimize="$optimize -fschedule-insns2"
: #? optimize="$optimize -ffunction-sections"
: #? optimize="$optimize -fcaller-saves"
: #> optimize="$optimize -funroll-loops"
: #> optimize="$optimize -funroll-all-loops"
: #x optimize="$optimize -fmove-all-movables"
: #x optimize="$optimize -freduce-all-givs"
: #? optimize="$optimize -fstrict-aliasing"
: #* optimize="$optimize -fstructure-noalias"
case "$host" in
arm*-*)
optimize="$optimize -fstrength-reduce"
;;
mips*-*)
optimize="$optimize -fstrength-reduce"
optimize="$optimize -finline-functions"
;;
i?86-*)
optimize="$optimize -fstrength-reduce"
;;
powerpc-apple-*)
# this triggers an internal compiler error with gcc2
: #optimize="$optimize -fstrength-reduce"
# this is really only beneficial with gcc3
: #optimize="$optimize -finline-functions"
;;
*)
# this sometimes provokes bugs in gcc 2.95.2
: #optimize="$optimize -fstrength-reduce"
;;
esac
;;
esac
optimize="-O2"
fi
case "$host" in
@ -297,6 +233,7 @@ if test -z "$FPM" && test "$GCC" = yes
then
case "$host" in
i?86-*) FPM="INTEL" ;;
x86_64*) FPM="64BIT" ;;
arm*-*) FPM="ARM" ;;
mips*-*) FPM="MIPS" ;;
sparc*-*) FPM="SPARC" ;;

@ -0,0 +1,4 @@
idf_component_register(INCLUDE_DIRS "include")
#target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS})
add_dependencies("${COMPONENT_LIB}" libmad)

@ -1,29 +0,0 @@
#pragma once
#include <cstddef>
#include <cstdint>
#include "result.hpp"
namespace codecs {
enum CreateCodecError {};
auto CreateCodecForExtension(std::string extension) -> cpp::result<std::unique_ptr<ICodec>, CreateCodecError>;
class ICodec {
public:
virtual ~ICodec() {}
virtual auto CanHandleExtension(std::string extension) -> bool = 0;
enum Error {};
virtual auto Process(
uint8_t *input,
std::size_t input_len,
uint8_t *output,
std::size_t output_length) -> cpp::result<size_t, Error> = 0;
};
} // namespace codecs
Loading…
Cancel
Save