diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2019-01-04 23:12:18 +0100 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2019-06-07 10:15:44 -0400 |
commit | 430056babf09fcfbafa7ab3c6d224fa92df3fbdf (patch) | |
tree | f00b1421e9177b21721d84e94eafe4945ddeed5d /recipes-toolchain | |
parent | 72ffb64d8ad1759f5245a6f6e1c5c682b973d8cf (diff) |
Upgrade toolchain to GCC 8.2.0 MinGW v6.0.0
Diffstat (limited to 'recipes-toolchain')
20 files changed, 1616 insertions, 0 deletions
diff --git a/recipes-toolchain/binutils.recipe b/recipes-toolchain/binutils.recipe new file mode 100644 index 00000000..4484904a --- /dev/null +++ b/recipes-toolchain/binutils.recipe @@ -0,0 +1,87 @@ +import shutil + + +class Recipe(recipe.Recipe): + name = 'binutils' + version = '2.31.1' + licenses = [License.LGPLv2Plus] + licenses_bins = [License.GPLv2Plus] + url = 'https://ftpmirror.gnu.org/gnu/binutils/binutils-%(version)s.tar.bz2' + tarball_checksum = 'ffcc382695bf947da6135e7436b8ed52d991cf270db897190f19d6f9838564d0' + stype = SourceType.TARBALL + autoreconf = True + configure_options = '--enable-ld=yes ' \ + '--enable-gold=no ' \ + '--disable-sim ' \ + '--disable-gdb ' \ + '--disable-nls ' \ + '--enable-multilib ' + add_host_build_target = False + files_bins = ['addr2line', 'ar', 'as', 'c++filt', 'dlltool', 'dllwrap', + 'elfedit', 'gprof', 'ld', 'ld.bfd', 'nm', 'objcopy', + 'objdump', 'ranlib', 'readelf', 'size', 'strings', 'strip', + 'windmc', 'windres'] + files_binutils = ['%(host)s/bin/ar%(bext)s', + '%(host)s/bin/as%(bext)s', + '%(host)s/bin/dlltool%(bext)s', + '%(host)s/bin/ld%(bext)s', + '%(host)s/bin/ld.bfd%(bext)s', + '%(host)s/bin/nm%(bext)s', + '%(host)s/bin/objcopy%(bext)s', + '%(host)s/bin/objdump%(bext)s', + '%(host)s/bin/ranlib%(bext)s', + '%(host)s/bin/strip%(bext)s', + '%(host)s/lib/ldscripts/i386pe.x', + '%(host)s/lib/ldscripts/i386pe.xa', + '%(host)s/lib/ldscripts/i386pe.xbn', + '%(host)s/lib/ldscripts/i386pe.xn', + '%(host)s/lib/ldscripts/i386pe.xr', + '%(host)s/lib/ldscripts/i386pe.xu', + '%(host)s/lib32/ldscripts/i386pe.x', + '%(host)s/lib32/ldscripts/i386pe.xa', + '%(host)s/lib32/ldscripts/i386pe.xbn', + '%(host)s/lib32/ldscripts/i386pe.xn', + '%(host)s/lib32/ldscripts/i386pe.xr', + '%(host)s/lib32/ldscripts/i386pe.xu'] + files_lib = ['lib/libiberty.a'] + files_lang = ['bfd', 'binutils', 'gas', 'gprof', + 'ld', 'opcodes'] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + self.target = 'x86_64-w64-mingw32' + self.configure_options += ' --target=%s ' % self.target + self.configure_options += '--with-sysroot=$CERBERO_PREFIX/%s/sysroot ' % self.target + if self.config.target_platform == Platform.WINDOWS: + self.configure_options += ' --host=%s' % self.target + + # Append the host prefix to the binaries + self.files_bins = ['%s-%s' % (self.target, x) for x in self.files_bins] + # Replace host in files + files = [x % {'host': self.target, 'bext': '%(bext)s'} for x in + self.files_binutils] + # Add mingw symlink files + files.extend([x % {'host': 'mingw', 'bext': '%(bext)s'} for x in + self.files_binutils]) + self.files_binutils = files + + async def configure(self): + for d in ['bfd', 'opcodes', 'gas', 'binutils', 'gprof', 'ld']: + shell.call('autoreconf -ivf', os.path.join(self.build_dir, d)) + await super().configure() + + def post_install(self): + # Prefix binaries with the host triplet + if self.config.target_platform == Platform.WINDOWS: + for f in self.files_list_by_category('bins'): + f = os.path.join(self.config.prefix, f) + shutil.copy(f.replace(self.target + '-', ''), f) + # libtool m4 macros uses non-prefixed 'strings' command. + elif self.config.target_platform == Platform.LINUX: + bindir = os.path.join(self.config.prefix, 'bin') + strings = os.path.join(bindir, 'strings') + if os.path.exists(strings): + os.remove(strings) + shell.call('ln -s %s-strings strings' % self.target, bindir) + super().post_install() diff --git a/recipes-toolchain/gcc-bootstrap.recipe b/recipes-toolchain/gcc-bootstrap.recipe new file mode 100644 index 00000000..d1727553 --- /dev/null +++ b/recipes-toolchain/gcc-bootstrap.recipe @@ -0,0 +1,64 @@ +from cerbero.utils import shell + +# This recipe bootstraps an initial compiler that is used +# for the cross-toolchain to compile the CRT before the +# real final compiler. +class Recipe(recipe.Recipe): + name = 'gcc-bootstrap' + version = '8.2.0' + stype = SourceType.CUSTOM + licenses = [License.GPLv3Plus] + configure_options = '--with-newlib ' \ + '--disable-maintainer-mode ' \ + '--with-host-libstdcxx=\'-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm\' ' \ + '--disable-shared ' \ + '--disable-libgomp ' \ + '--disable-libquadmath ' \ + '--disable-libquadmath-support ' \ + '--disable-libmudflap ' \ + '--disable-libmpx ' \ + '--disable-libssp ' \ + '--disable-nls ' \ + '--enable-threads=no ' \ + '--enable-__cxa_atexit ' \ + '--enable-lto ' \ + '--enable-languages=c ' \ + '--enable-multiarch ' \ + '' + make = 'make configure-gcc configure-libcpp configure-build-libiberty &&' \ + 'make all-libcpp all-build-libiberty && '\ + 'make configure-libdecnumber && '\ + 'make -C libdecnumber libdecnumber.a && '\ + 'make configure-libbacktrace && '\ + 'make -C libbacktrace && '\ + 'make all-gcc all-target-libgcc' + make_install = 'make install-gcc install-target-libgcc' + use_system_libs = True + add_host_build_target = False + deps = ['gcc-sources', 'mingw-w64-headers', 'gmp', 'mpfr', 'mpc', 'isl'] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + self.set_env('CPP') + self._target = 'x86_64-w64-mingw32' + sysroot = os.path.join(self.config.prefix, self._target, 'sysroot') + self.configure_options += ' --with-sysroot=%s ' % sysroot + self.configure_options += ' --with-local-prefix=%s ' % sysroot + self.configure_options += ' --target=%s' % self._target + if self.config.target_platform == Platform.WINDOWS: + self.configure_options += ' --host=%s' % self._target + if self.config.target_platform == Platform.WINDOWS: + self.allow_parallel_build = False + self.build_dir = os.path.join(self.config.sources, + 'gcc-%s' % self.version) + self.make_dir = os.path.join(self.build_dir, 'gcc_build_core') + self.config_sh = os.path.join(self.config.sources, + 'gcc-%s' % self.version, 'configure') + + async def configure(self): + try: + os.mkdir(self.make_dir) + except: + pass + await super(Recipe, self).configure() diff --git a/recipes-toolchain/gcc-sources.recipe b/recipes-toolchain/gcc-sources.recipe new file mode 100644 index 00000000..e0715ca5 --- /dev/null +++ b/recipes-toolchain/gcc-sources.recipe @@ -0,0 +1,22 @@ +from cerbero.utils import shell + +# This recipes extracts and patches the gcc sources that +# will be used by gcc-bootstrap and gcc recipes +class Recipe(recipe.Recipe): + name = 'gcc-sources' + version = '8.2.0' + url = 'https://ftpmirror.gnu.org/gnu/gcc/gcc-8.2.0/gcc-%(version)s.tar.xz' + tarball_checksum = '196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080' + stype = SourceType.TARBALL + btype = BuildType.CUSTOM + licenses = [License.GPLv3Plus] + patches = ['gcc/0001-Fix-graphite-build-with-isl-0.20.patch', + 'gcc/0002-Disable-split-stack-for-non-thread-builds.patch', + 'gcc/0003-Force-SEH-SJLJ.patch', + ] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + self.build_dir = os.path.join(self.config.sources, + 'gcc-%s' % self.version) diff --git a/recipes-toolchain/gcc.recipe b/recipes-toolchain/gcc.recipe new file mode 100644 index 00000000..de616a9a --- /dev/null +++ b/recipes-toolchain/gcc.recipe @@ -0,0 +1,71 @@ +import shutil + +class Recipe(recipe.Recipe): + name = 'gcc' + version = '8.2.0' + licenses = [License.GPLv3Plus] + stype = SourceType.CUSTOM + make = 'make all' + make_install = 'make install-strip' + add_host_build_target = False + override_libtool = False + deps = ['gcc-sources', 'mingw-w64-crt', 'winpthreads', 'gmp', 'mpc', 'mpfr', + 'isl'] + + configure_options = '--with-host-libstdcxx=\'-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm\' ' \ + '--disable-maintainer-mode' \ + '--disable-shared ' \ + '--disable-libgomp ' \ + '--disable-libquadmath ' \ + '--disable-libquadmath-support ' \ + '--disable-libmudflap ' \ + '--disable-libmpx ' \ + '--disable-libssp ' \ + '--disable-nls ' \ + '--enable-threads=posix ' \ + '--enable-__cxa_atexit ' \ + '--enable-lto ' \ + '--enable-plugin ' \ + '--enable-multiarch ' \ + '--enable-languages=c,c++ ' \ + '--enable-long-long ' \ + '' + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + # The configure checks are failing on this function + # which ends in a double definition, so let's override it. + self.set_env ('ac_cv_func_powf', 'yes') + self.set_env ('CPP') + self._target = 'x86_64-w64-mingw32' + sysroot = os.path.join(self.config.prefix, self._target, 'sysroot') + self.configure_options += ' --with-sysroot=%s ' % sysroot + self.configure_options += ' --with-local-prefix=%s ' % sysroot + self.configure_options += ' --target=%s' % self._target + if self.config.target_platform == Platform.WINDOWS: + self.configure_options += ' --host=%s' % self._target + self.build_dir = os.path.join(self.config.sources, + 'gcc-%s' % self.version) + self.make_dir = os.path.join(self.build_dir, 'gcc_build_final') + self.config_sh = '../configure' + + async def configure(self): + try: + os.mkdir(self.make_dir) + except: + pass + await super(Recipe, self).configure() + + def post_install(self): + if self.config.target_platform == Platform.WINDOWS: + bindir = os.path.join(self.config.prefix, 'bin') + libdir = os.path.join(self.config.prefix, 'lib') + lib32dir = os.path.join(self.config.prefix, 'lib32') + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89044 + os.remove(os.path.join(bindir, 'libstdc++-6.dll')) + stdc64 = 'x86_64-w64-mingw32/libstdc++-v3/src/.libs/libstdc++-6.dll' + stdc32 = 'x86_64-w64-mingw32/32/libstdc++-v3/src/.libs/libstdc++-6.dll' + shutil.copy(os.path.join(self.make_dir, stdc64), libdir) + shutil.copy(os.path.join(self.make_dir, stdc32), lib32dir) + super().post_install() diff --git a/recipes-toolchain/gcc/0001-Fix-graphite-build-with-isl-0.20.patch b/recipes-toolchain/gcc/0001-Fix-graphite-build-with-isl-0.20.patch new file mode 100644 index 00000000..d182ed26 --- /dev/null +++ b/recipes-toolchain/gcc/0001-Fix-graphite-build-with-isl-0.20.patch @@ -0,0 +1,26 @@ +From f4be86ae6d774aa4df3666ff6f55232b92fbc475 Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Thu, 27 Dec 2018 23:51:16 +0100 +Subject: [PATCH] Fix graphite build with isl-0.20 + +--- + gcc/graphite.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/gcc/graphite.h b/gcc/graphite.h +index 4e0e58c..1398668 100644 +--- a/gcc/graphite.h ++++ b/gcc/graphite.h +@@ -37,6 +37,9 @@ along with GCC; see the file COPYING3. If not see + #include <isl/schedule.h> + #include <isl/ast_build.h> + #include <isl/schedule_node.h> ++#include <isl/id.h> ++#include <isl/space.h> ++ + + typedef struct poly_dr *poly_dr_p; + +-- +2.7.4 + diff --git a/recipes-toolchain/gcc/0002-Disable-split-stack-for-non-thread-builds.patch b/recipes-toolchain/gcc/0002-Disable-split-stack-for-non-thread-builds.patch new file mode 100644 index 00000000..59d5e4e1 --- /dev/null +++ b/recipes-toolchain/gcc/0002-Disable-split-stack-for-non-thread-builds.patch @@ -0,0 +1,23 @@ +From 1776d9054e428d1e6ab7aee79cb05474355fdbbf Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Fri, 4 Jan 2019 15:32:34 +0100 +Subject: [PATCH 2/2] Disable split-stack for non-thread builds + +--- + libgcc/config/t-stack | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libgcc/config/t-stack b/libgcc/config/t-stack +index cc0366b..f3f97e8 100644 +--- a/libgcc/config/t-stack ++++ b/libgcc/config/t-stack +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif +-- +2.7.4 + diff --git a/recipes-toolchain/gcc/0003-Force-SEH-SJLJ.patch b/recipes-toolchain/gcc/0003-Force-SEH-SJLJ.patch new file mode 100644 index 00000000..a261b3fc --- /dev/null +++ b/recipes-toolchain/gcc/0003-Force-SEH-SJLJ.patch @@ -0,0 +1,27 @@ +From aec9c53549c9a755890114ccaacf5f15ed978dd9 Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Wed, 9 Jan 2019 14:56:22 +0100 +Subject: [PATCH 3/3] Force SEH+SJLJ + +--- + libgcc/config.host | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/libgcc/config.host b/libgcc/config.host +index 11b4aca..c76712c 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -765,10 +765,6 @@ x86_64-*-mingw*) + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h + if test x$ac_cv_sjlj_exceptions = xyes; then + tmake_eh_file="i386/t-sjlj-eh" +- elif test "${host_address}" = 32; then +- # biarch -m32 with --disable-sjlj-exceptions +- tmake_eh_file="i386/t-dw2-eh" +- md_unwind_header=i386/w32-unwind.h + else + tmake_eh_file="i386/t-seh-eh" + fi +-- +2.7.4 + diff --git a/recipes-toolchain/gendef.recipe b/recipes-toolchain/gendef.recipe new file mode 100644 index 00000000..3ce54a39 --- /dev/null +++ b/recipes-toolchain/gendef.recipe @@ -0,0 +1,10 @@ +class Recipe(recipe.Recipe): + name = 'gendef' + version = 'v6.0.0' + licenses = [License.LGPLv2Plus] + stype = SourceType.CUSTOM + files_bin = ['bin/gendef.exe'] + + def prepare(self): + self.build_dir = self.config_src_dir = os.path.join(self.config.sources, 'mingw-w64-%s' % self.version) + self.make_dir = os.path.join(self.build_dir, 'mingw-w64-tools', 'gendef') diff --git a/recipes-toolchain/gmp.recipe b/recipes-toolchain/gmp.recipe new file mode 100644 index 00000000..f493b2f0 --- /dev/null +++ b/recipes-toolchain/gmp.recipe @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + + +class Recipe(recipe.Recipe): + name = 'gmp' + version = '6.1.2' + url = 'https://gmplib.org/download/gmp/gmp-%(version)s.tar.bz2' + tarball_dirname = 'gmp-%(version)s' + tarball_checksum = '5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2' + stype = SourceType.TARBALL + licenses = [License.LGPLv3Plus] + configure_options = "--disable-shared --enable-static" + + files_libs = ['libgmp'] + files_devel = ['include/gmp.h'] + + def gen_library_file(self, output_dir=None): + return diff --git a/recipes-toolchain/isl.recipe b/recipes-toolchain/isl.recipe new file mode 100644 index 00000000..460b5566 --- /dev/null +++ b/recipes-toolchain/isl.recipe @@ -0,0 +1,17 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + + +class Recipe(recipe.Recipe): + name = 'isl' + version = '0.20' + url = 'https://deb.debian.org/debian/pool/main/i/isl/isl_0.20.orig.tar.xz' + tarball_checksum = 'a5596a9fb8a5b365cb612e4b9628735d6e67e9178fae134a816ae195017e77aa' + stype = SourceType.TARBALL + licenses = [License.LGPLv3Plus] + configure_options = '--disable-shared '\ + '--enable-static ' \ + '--with-gmp=system '\ + '--with-clang=no '\ + '--with-sysroot=$CERBERO_PREFIX' + deps = ['gmp'] + diff --git a/recipes-toolchain/mingw-w64-crt.recipe b/recipes-toolchain/mingw-w64-crt.recipe new file mode 100644 index 00000000..93b04e4d --- /dev/null +++ b/recipes-toolchain/mingw-w64-crt.recipe @@ -0,0 +1,30 @@ +class Recipe(recipe.Recipe): + name = 'mingw-w64-crt' + version = 'v6.0.0' + licenses = [License.LGPLv2Plus] + stype = SourceType.CUSTOM + add_host_build_target = False + configure_options = ' --with-default-msvcrt=ucrtbase ' + deps = ['mingw-w64-sources', 'binutils'] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + if self.config.target_platform == Platform.LINUX: + self.deps.append('gcc-bootstrap') + # Since we are cross-compiling we have to reset all the env + # variables set by cerbero (eg: we don't want -m64 overriding + # a i386 build or gcc being used instead of x86_64-mingw32-w64-gcc) + for v in ['CC', 'LD', 'CPP', 'AS', 'RC', 'CXX','CFLAGS', 'LDFLAGS', + 'CXXFLAGS', 'CCASFLAGS']: + self.set_env(v) + self.host = 'x86_64-w64-mingw32' + sysroot = os.path.join(self.config.prefix, self.host, 'sysroot') + self.configure_options += ' --host=%s' % self.host + self.configure_options += ' --with-sysroot=%s ' % sysroot + self.make_install = 'make install DESTDIR=%s' % sysroot + self.build_dir = os.path.join(self.config.sources, + 'mingw-w64-%s' % self.version) + self.make_dir = os.path.join(self.build_dir, 'mingw-w64-crt') + self.configure_tpl = "%%(config-sh)s --prefix /usr/%(host)s "\ + "--libdir /usr/%(host)s/lib %%(options)s" % {'host': self.host} diff --git a/recipes-toolchain/mingw-w64-headers.recipe b/recipes-toolchain/mingw-w64-headers.recipe new file mode 100644 index 00000000..f32b1f47 --- /dev/null +++ b/recipes-toolchain/mingw-w64-headers.recipe @@ -0,0 +1,30 @@ +class Recipe(recipe.Recipe): + name = 'mingw-w64-headers' + version = 'v6.0.0' + licenses = [License.LGPLv2Plus] + stype = SourceType.CUSTOM + srcdir = 'mingw-w64-headers' + configure_options='--enable-sdk=all --enable-secure-api \ + --with-default-msvcrt=ucrtbase ' + add_host_build_target = False + deps = ['mingw-w64-sources'] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + self.host = 'x86_64-w64-mingw32' + self._sysroot = os.path.join(self.config.prefix, self.host, 'sysroot') + self.configure_options += ' --host=%s' % self.host + self.configure_options += ' --with-sysroot=%s ' % self._sysroot + self.make_install = 'make install DESTDIR=%s' % self._sysroot + self.build_dir = os.path.join(self.config.sources, + 'mingw-w64-%s' % self.version) + self.make_dir = os.path.join(self.build_dir, 'mingw-w64-headers') + self.configure_tpl = "%%(config-sh)s --prefix /usr/%(host)s "\ + "--libdir /usr/%(host)s %%(options)s" % {'host': self.host} + + def post_install(self): + if not os.path.exists(os.path.join(self._sysroot, 'mingw')): + shell.call('ln -s usr/%(host)s mingw' \ + % {'host': self.host}, self._sysroot) + super().post_install() diff --git a/recipes-toolchain/mingw-w64-sources.recipe b/recipes-toolchain/mingw-w64-sources.recipe new file mode 100644 index 00000000..d7a60b53 --- /dev/null +++ b/recipes-toolchain/mingw-w64-sources.recipe @@ -0,0 +1,19 @@ +class Recipe(recipe.Recipe): + name = 'mingw-w64-sources' + version = 'v6.0.0' + licenses = [License.LGPLv2Plus] + url = 'https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-%(version)s.tar.bz2' + tarball_checksum = '805e11101e26d7897fce7d49cbb140d7bac15f3e085a91e0001e80b2adaf48f0' + stype = SourceType.TARBALL + btype = BuildType.CUSTOM + patches = [ + 'mingw-w64/0001-timeb.h-declare-_ftime32-function-define-_ftime-acco.patch', + 'mingw-w64/0002-Add-_ftime-aliases-for-all-msvcr-versions.patch', + 'mingw-w64/0003-move-_fseeki64-and-_ftelli64-functions-from-libmingw.patch', + ] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + self.build_dir = os.path.join(self.config.sources, + 'mingw-w64-%s' % self.version) diff --git a/recipes-toolchain/mingw-w64/0001-timeb.h-declare-_ftime32-function-define-_ftime-acco.patch b/recipes-toolchain/mingw-w64/0001-timeb.h-declare-_ftime32-function-define-_ftime-acco.patch new file mode 100644 index 00000000..1c78fc8e --- /dev/null +++ b/recipes-toolchain/mingw-w64/0001-timeb.h-declare-_ftime32-function-define-_ftime-acco.patch @@ -0,0 +1,83 @@ +From f1537152d336cd072fa4fe00ffe775e45d4df8d9 Mon Sep 17 00:00:00 2001 +From: Mateusz <mateuszb@poczta.onet.pl> +Date: Sun, 4 Nov 2018 17:39:10 +0100 +Subject: [PATCH 1/3] timeb.h: declare _ftime32 function, define _ftime + according to _USE_32BIT_TIME_T + +Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl> +Signed-off-by: Liu Hao <lh_mouse@126.com> +(cherry picked from commit 38496499910a580ddc449a7d09f3bc0302767f31) +Signed-off-by: Jonathan Yong <10walls@gmail.com> +--- + mingw-w64-crt/lib-common/msvcrt.def.in | 3 ++- + mingw-w64-headers/crt/sec_api/sys/timeb_s.h | 4 +++- + mingw-w64-headers/crt/sys/timeb.h | 9 +++++---- + 3 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in +index 1a1db2b4..13115412 100644 +--- a/mingw-w64-crt/lib-common/msvcrt.def.in ++++ b/mingw-w64-crt/lib-common/msvcrt.def.in +@@ -532,7 +532,8 @@ _fstat64 + _fstati64 + F64(_fstat64i32 == _fstat) + _ftime +-F_ARM_ANY(_ftime32) ++F_I386(_ftime32 == _ftime) ++F_NON_I386(_ftime32) + _ftime32_s + _ftime64 + _ftime64_s +diff --git a/mingw-w64-headers/crt/sec_api/sys/timeb_s.h b/mingw-w64-headers/crt/sec_api/sys/timeb_s.h +index f635d32b..ed92946e 100644 +--- a/mingw-w64-headers/crt/sec_api/sys/timeb_s.h ++++ b/mingw-w64-headers/crt/sec_api/sys/timeb_s.h +@@ -15,11 +15,13 @@ extern "C" { + + #if defined(MINGW_HAS_SECURE_API) + +- _CRTIMP errno_t __cdecl _ftime_s(struct __timeb32 *_Time); ++ _CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time); + _CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time); + + #ifndef _USE_32BIT_TIME_T + #define _ftime_s _ftime64_s ++#else ++#define _ftime_s _ftime32_s + #endif + #endif + +diff --git a/mingw-w64-headers/crt/sys/timeb.h b/mingw-w64-headers/crt/sys/timeb.h +index c92c8e01..7bfe98e0 100644 +--- a/mingw-w64-headers/crt/sys/timeb.h ++++ b/mingw-w64-headers/crt/sys/timeb.h +@@ -76,13 +76,14 @@ extern "C" { + #endif + + _CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time); ++ _CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time); + +-#ifdef _WIN64 ++#ifndef _USE_32BIT_TIME_T + #define _timeb __timeb64 +- _CRTIMP void __cdecl _ftime(struct __timeb64 *); ++#define _ftime _ftime64 + #else + #define _timeb __timeb32 +- _CRTIMP void __cdecl _ftime(struct __timeb32 *); ++#define _ftime _ftime32 + #endif + + #ifndef _TIMESPEC_DEFINED +@@ -109,7 +110,7 @@ struct itimerspec { + } + #else + __CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) { +- _ftime((struct __timeb32 *)_Tmb); ++ _ftime32((struct __timeb32 *)_Tmb); + } + #endif /* _USE_32BIT_TIME_T */ + #endif /* !__CRT__NO_INLINE */ +-- +2.14.1 + diff --git a/recipes-toolchain/mingw-w64/0002-Add-_ftime-aliases-for-all-msvcr-versions.patch b/recipes-toolchain/mingw-w64/0002-Add-_ftime-aliases-for-all-msvcr-versions.patch new file mode 100644 index 00000000..a4ce33c4 --- /dev/null +++ b/recipes-toolchain/mingw-w64/0002-Add-_ftime-aliases-for-all-msvcr-versions.patch @@ -0,0 +1,223 @@ +From ade3f5ad8ec5686d0acdff3986619e0469434104 Mon Sep 17 00:00:00 2001 +From: Johannes Pfau <johannespfau@gmail.com> +Date: Wed, 2 Jan 2019 14:10:59 +0100 +Subject: [PATCH 2/3] Add _ftime aliases for all msvcr versions. + +Signed-off-by: Johannes Pfau <johannespfau@gmail.com> +Signed-off-by: Jacek Caban <jacek@codeweavers.com> +(cherry picked from commit 6a5c1535fb22d94797dcc75a4b4b9109d8360058) +Signed-off-by: Jonathan Yong <10walls@gmail.com> +--- + mingw-w64-crt/lib32/msvcr100.def.in | 1 + + mingw-w64-crt/lib32/msvcr110.def.in | 1 + + mingw-w64-crt/lib32/msvcr120.def.in | 1 + + mingw-w64-crt/lib32/msvcr120_app.def.in | 1 + + mingw-w64-crt/lib32/msvcr120d.def.in | 1 + + mingw-w64-crt/lib32/msvcr90.def.in | 1 + + mingw-w64-crt/lib32/msvcr90d.def.in | 1 + + mingw-w64-crt/lib64/msvcr100.def.in | 1 + + mingw-w64-crt/lib64/msvcr110.def.in | 1 + + mingw-w64-crt/lib64/msvcr120.def.in | 1 + + mingw-w64-crt/lib64/msvcr120_app.def.in | 1 + + mingw-w64-crt/lib64/msvcr120d.def.in | 1 + + mingw-w64-crt/lib64/msvcr90.def.in | 1 + + mingw-w64-crt/lib64/msvcr90d.def.in | 1 + + mingw-w64-crt/libarm32/msvcr110.def | 1 + + mingw-w64-crt/libarm32/msvcr120_clr0400.def | 1 + + 16 files changed, 16 insertions(+) + +diff --git a/mingw-w64-crt/lib32/msvcr100.def.in b/mingw-w64-crt/lib32/msvcr100.def.in +index d103a2b0..53ccd37b 100644 +--- a/mingw-w64-crt/lib32/msvcr100.def.in ++++ b/mingw-w64-crt/lib32/msvcr100.def.in +@@ -896,6 +896,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _futime32 +diff --git a/mingw-w64-crt/lib32/msvcr110.def.in b/mingw-w64-crt/lib32/msvcr110.def.in +index 7296955b..920677bc 100644 +--- a/mingw-w64-crt/lib32/msvcr110.def.in ++++ b/mingw-w64-crt/lib32/msvcr110.def.in +@@ -1019,6 +1019,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _futime32 +diff --git a/mingw-w64-crt/lib32/msvcr120.def.in b/mingw-w64-crt/lib32/msvcr120.def.in +index 57122cbf..c1e2af84 100644 +--- a/mingw-w64-crt/lib32/msvcr120.def.in ++++ b/mingw-w64-crt/lib32/msvcr120.def.in +@@ -1042,6 +1042,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _futime32 +diff --git a/mingw-w64-crt/lib32/msvcr120_app.def.in b/mingw-w64-crt/lib32/msvcr120_app.def.in +index 0c5aaff9..b13d9a66 100644 +--- a/mingw-w64-crt/lib32/msvcr120_app.def.in ++++ b/mingw-w64-crt/lib32/msvcr120_app.def.in +@@ -654,6 +654,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _futime32 +diff --git a/mingw-w64-crt/lib32/msvcr120d.def.in b/mingw-w64-crt/lib32/msvcr120d.def.in +index 194a0d24..385d4913 100644 +--- a/mingw-w64-crt/lib32/msvcr120d.def.in ++++ b/mingw-w64-crt/lib32/msvcr120d.def.in +@@ -1098,6 +1098,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _fullpath_dbg +diff --git a/mingw-w64-crt/lib32/msvcr90.def.in b/mingw-w64-crt/lib32/msvcr90.def.in +index 861ce56c..69765e53 100644 +--- a/mingw-w64-crt/lib32/msvcr90.def.in ++++ b/mingw-w64-crt/lib32/msvcr90.def.in +@@ -523,6 +523,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _futime32 +diff --git a/mingw-w64-crt/lib32/msvcr90d.def.in b/mingw-w64-crt/lib32/msvcr90d.def.in +index 419c65ce..2fe211dd 100644 +--- a/mingw-w64-crt/lib32/msvcr90d.def.in ++++ b/mingw-w64-crt/lib32/msvcr90d.def.in +@@ -583,6 +583,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _ftol + _fullpath + _fullpath_dbg +diff --git a/mingw-w64-crt/lib64/msvcr100.def.in b/mingw-w64-crt/lib64/msvcr100.def.in +index b3be3024..b1e3e073 100644 +--- a/mingw-w64-crt/lib64/msvcr100.def.in ++++ b/mingw-w64-crt/lib64/msvcr100.def.in +@@ -853,6 +853,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _futime32 + _futime64 +diff --git a/mingw-w64-crt/lib64/msvcr110.def.in b/mingw-w64-crt/lib64/msvcr110.def.in +index 59868920..a4129975 100644 +--- a/mingw-w64-crt/lib64/msvcr110.def.in ++++ b/mingw-w64-crt/lib64/msvcr110.def.in +@@ -978,6 +978,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _futime32 + _futime64 +diff --git a/mingw-w64-crt/lib64/msvcr120.def.in b/mingw-w64-crt/lib64/msvcr120.def.in +index 0ec1dc48..38d5af29 100644 +--- a/mingw-w64-crt/lib64/msvcr120.def.in ++++ b/mingw-w64-crt/lib64/msvcr120.def.in +@@ -998,6 +998,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _futime32 + _futime64 +diff --git a/mingw-w64-crt/lib64/msvcr120_app.def.in b/mingw-w64-crt/lib64/msvcr120_app.def.in +index b829b841..a5f6f777 100644 +--- a/mingw-w64-crt/lib64/msvcr120_app.def.in ++++ b/mingw-w64-crt/lib64/msvcr120_app.def.in +@@ -611,6 +611,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _futime32 + _futime64 +diff --git a/mingw-w64-crt/lib64/msvcr120d.def.in b/mingw-w64-crt/lib64/msvcr120d.def.in +index f5304d45..df0425af 100644 +--- a/mingw-w64-crt/lib64/msvcr120d.def.in ++++ b/mingw-w64-crt/lib64/msvcr120d.def.in +@@ -1052,6 +1052,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _fullpath_dbg + _futime32 +diff --git a/mingw-w64-crt/lib64/msvcr90.def.in b/mingw-w64-crt/lib64/msvcr90.def.in +index f18166aa..72f30700 100644 +--- a/mingw-w64-crt/lib64/msvcr90.def.in ++++ b/mingw-w64-crt/lib64/msvcr90.def.in +@@ -470,6 +470,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _futime32 + _futime64 +diff --git a/mingw-w64-crt/lib64/msvcr90d.def.in b/mingw-w64-crt/lib64/msvcr90d.def.in +index 07755389..99b167ee 100644 +--- a/mingw-w64-crt/lib64/msvcr90d.def.in ++++ b/mingw-w64-crt/lib64/msvcr90d.def.in +@@ -524,6 +524,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime64 + _fullpath + _fullpath_dbg + _futime32 +diff --git a/mingw-w64-crt/libarm32/msvcr110.def b/mingw-w64-crt/libarm32/msvcr110.def +index 40a40937..9ce6a8ac 100644 +--- a/mingw-w64-crt/libarm32/msvcr110.def ++++ b/mingw-w64-crt/libarm32/msvcr110.def +@@ -635,6 +635,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _fullpath + _futime32 + _futime64 +diff --git a/mingw-w64-crt/libarm32/msvcr120_clr0400.def b/mingw-w64-crt/libarm32/msvcr120_clr0400.def +index 32d7965f..84f768a5 100644 +--- a/mingw-w64-crt/libarm32/msvcr120_clr0400.def ++++ b/mingw-w64-crt/libarm32/msvcr120_clr0400.def +@@ -634,6 +634,7 @@ _ftime32 + _ftime32_s + _ftime64 + _ftime64_s ++_ftime == _ftime32 + _fullpath + _futime32 + _futime64 +-- +2.14.1 + diff --git a/recipes-toolchain/mingw-w64/0003-move-_fseeki64-and-_ftelli64-functions-from-libmingw.patch b/recipes-toolchain/mingw-w64/0003-move-_fseeki64-and-_ftelli64-functions-from-libmingw.patch new file mode 100644 index 00000000..9a10b1d2 --- /dev/null +++ b/recipes-toolchain/mingw-w64/0003-move-_fseeki64-and-_ftelli64-functions-from-libmingw.patch @@ -0,0 +1,733 @@ +From 71276530be885bd3558d5f351a7bd0fb3bcb88d6 Mon Sep 17 00:00:00 2001 +From: Mateusz Brzostek <mateuszb@poczta.onet.pl> +Date: Tue, 27 Nov 2018 09:21:36 +0100 +Subject: [PATCH 3/3] move _fseeki64 and _ftelli64 functions from libmingwex to + libmsvcrt + +_fseeki64 and _ftelli64 functions are already in libmsvcr90 and newer, +so we need to provide these functions only for libmsvcrt. In addition, +_ftelli64 function implementation is not compatible with ucrt. + +Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl> +Signed-off-by: Jacek Caban <jacek@codeweavers.com> +--- + mingw-w64-crt/Makefile.am | 1 + + mingw-w64-crt/Makefile.in | 96 ++++++++++++++++--- + mingw-w64-crt/lib32/msvcr100.def.in | 4 +- + mingw-w64-crt/lib32/msvcr90.def.in | 4 +- + mingw-w64-crt/lib64/msvcr100.def.in | 4 +- + mingw-w64-crt/lib64/msvcr90.def.in | 4 +- + mingw-w64-crt/stdio/fseeki64.c | 177 ++++++++++++++++++++++++++++++++++++ + mingw-w64-crt/stdio/fseeko64.c | 131 -------------------------- + mingw-w64-headers/crt/stdio.h | 5 +- + 9 files changed, 272 insertions(+), 154 deletions(-) + create mode 100644 mingw-w64-crt/stdio/fseeki64.c + +diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am +index 30f9f7fc..c4b19beb 100644 +--- a/mingw-w64-crt/Makefile.am ++++ b/mingw-w64-crt/Makefile.am +@@ -210,6 +210,7 @@ src_msvcrt=\ + secapi/vsprintf_s.c \ + secapi/wmemcpy_s.c \ + secapi/wmemmove_s.c \ ++ stdio/fseeki64.c \ + stdio/mingw_lock.c + + src_ucrtbase=\ +diff --git a/mingw-w64-crt/Makefile.in b/mingw-w64-crt/Makefile.in +index 4952edde..aea778a5 100644 +--- a/mingw-w64-crt/Makefile.in ++++ b/mingw-w64-crt/Makefile.in +@@ -1341,8 +1341,9 @@ am__lib32_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \ + secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \ + secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \ + secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \ +- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \ +- misc/lc_locale_func.c lib-common/msvcrt.def.in ++ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \ ++ stdio/mingw_lock.c misc/lc_locale_func.c \ ++ lib-common/msvcrt.def.in + am__objects_33 = misc/lib32_libmsvcrt_os_a-onexit_table.$(OBJEXT) \ + misc/lib32_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \ + stdio/lib32_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT) +@@ -1395,6 +1396,7 @@ am__objects_34 = $(am__objects_33) \ + secapi/lib32_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \ + secapi/lib32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \ + secapi/lib32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \ ++ stdio/lib32_libmsvcrt_os_a-fseeki64.$(OBJEXT) \ + stdio/lib32_libmsvcrt_os_a-mingw_lock.$(OBJEXT) + am__objects_35 = $(am__objects_34) \ + misc/lib32_libmsvcrt_os_a-lc_locale_func.$(OBJEXT) +@@ -2669,9 +2671,9 @@ am__lib64_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \ + secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \ + secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \ + secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \ +- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \ +- misc/__p___argv.c misc/__p__acmdln.c misc/__p__fmode.c \ +- misc/__p__wcmdln.c lib-common/msvcrt.def.in ++ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \ ++ stdio/mingw_lock.c misc/__p___argv.c misc/__p__acmdln.c \ ++ misc/__p__fmode.c misc/__p__wcmdln.c lib-common/msvcrt.def.in + am__objects_84 = misc/lib64_libmsvcrt_os_a-onexit_table.$(OBJEXT) \ + misc/lib64_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \ + stdio/lib64_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT) +@@ -2724,6 +2726,7 @@ am__objects_85 = $(am__objects_84) \ + secapi/lib64_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \ + secapi/lib64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \ + secapi/lib64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \ ++ stdio/lib64_libmsvcrt_os_a-fseeki64.$(OBJEXT) \ + stdio/lib64_libmsvcrt_os_a-mingw_lock.$(OBJEXT) + am__objects_86 = $(am__objects_85) \ + misc/lib64_libmsvcrt_os_a-__p___argv.$(OBJEXT) \ +@@ -3863,9 +3866,9 @@ am__libarm32_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \ + secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \ + secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \ + secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \ +- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \ +- misc/__p___argv.c misc/__p__acmdln.c misc/__p__fmode.c \ +- misc/__p__wcmdln.c lib-common/msvcrt.def.in ++ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \ ++ stdio/mingw_lock.c misc/__p___argv.c misc/__p__acmdln.c \ ++ misc/__p__fmode.c misc/__p__wcmdln.c lib-common/msvcrt.def.in + am__objects_124 = misc/libarm32_libmsvcrt_os_a-onexit_table.$(OBJEXT) \ + misc/libarm32_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \ + stdio/libarm32_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT) +@@ -3918,6 +3921,7 @@ am__objects_125 = $(am__objects_124) \ + secapi/libarm32_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \ + secapi/libarm32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \ + secapi/libarm32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \ ++ stdio/libarm32_libmsvcrt_os_a-fseeki64.$(OBJEXT) \ + stdio/libarm32_libmsvcrt_os_a-mingw_lock.$(OBJEXT) + am__objects_126 = $(am__objects_125) \ + misc/libarm32_libmsvcrt_os_a-__p___argv.$(OBJEXT) \ +@@ -4948,9 +4952,9 @@ am__libarm64_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \ + secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \ + secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \ + secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \ +- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \ +- misc/__p___argv.c misc/__p__acmdln.c misc/__p__fmode.c \ +- misc/__p__wcmdln.c lib-common/msvcrt.def.in ++ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \ ++ stdio/mingw_lock.c misc/__p___argv.c misc/__p__acmdln.c \ ++ misc/__p__fmode.c misc/__p__wcmdln.c lib-common/msvcrt.def.in + am__objects_160 = misc/libarm64_libmsvcrt_os_a-onexit_table.$(OBJEXT) \ + misc/libarm64_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \ + stdio/libarm64_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT) +@@ -5003,6 +5007,7 @@ am__objects_161 = $(am__objects_160) \ + secapi/libarm64_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \ + secapi/libarm64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \ + secapi/libarm64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \ ++ stdio/libarm64_libmsvcrt_os_a-fseeki64.$(OBJEXT) \ + stdio/libarm64_libmsvcrt_os_a-mingw_lock.$(OBJEXT) + am__objects_162 = $(am__objects_161) \ + misc/libarm64_libmsvcrt_os_a-__p___argv.$(OBJEXT) \ +@@ -6925,6 +6930,7 @@ src_msvcrt = \ + secapi/vsprintf_s.c \ + secapi/wmemcpy_s.c \ + secapi/wmemmove_s.c \ ++ stdio/fseeki64.c \ + stdio/mingw_lock.c + + src_ucrtbase = \ +@@ -11079,6 +11085,8 @@ secapi/lib32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) + secapi/lib32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) ++stdio/lib32_libmsvcrt_os_a-fseeki64.$(OBJEXT): stdio/$(am__dirstamp) \ ++ stdio/$(DEPDIR)/$(am__dirstamp) + stdio/lib32_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \ + stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp) + misc/lib32_libmsvcrt_os_a-lc_locale_func.$(OBJEXT): \ +@@ -12926,6 +12934,8 @@ secapi/lib64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) + secapi/lib64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) ++stdio/lib64_libmsvcrt_os_a-fseeki64.$(OBJEXT): stdio/$(am__dirstamp) \ ++ stdio/$(DEPDIR)/$(am__dirstamp) + stdio/lib64_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \ + stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp) + misc/lib64_libmsvcrt_os_a-__p___argv.$(OBJEXT): misc/$(am__dirstamp) \ +@@ -14664,6 +14674,8 @@ secapi/libarm32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) + secapi/libarm32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) ++stdio/libarm32_libmsvcrt_os_a-fseeki64.$(OBJEXT): \ ++ stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp) + stdio/libarm32_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \ + stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp) + misc/libarm32_libmsvcrt_os_a-__p___argv.$(OBJEXT): \ +@@ -16183,6 +16195,8 @@ secapi/libarm64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) + secapi/libarm64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \ + secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp) ++stdio/libarm64_libmsvcrt_os_a-fseeki64.$(OBJEXT): \ ++ stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp) + stdio/libarm64_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \ + stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp) + misc/libarm64_libmsvcrt_os_a-__p___argv.$(OBJEXT): \ +@@ -20029,6 +20043,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcr90_a-acrt_iob_func.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcr90d_a-acrt_iob_func.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@ +@@ -20141,6 +20156,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcr90_a-acrt_iob_func.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcr90d_a-acrt_iob_func.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@ +@@ -20245,6 +20261,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmingwex_a-wtoll.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcr110_a-acrt_iob_func.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@ +@@ -20348,6 +20365,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmingwex_a-vwscanf2.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmingwex_a-wtoll.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@ +@@ -30851,6 +30869,20 @@ secapi/lib32_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/lib32_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi` + ++stdio/lib32_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib32_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib32_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++ ++stdio/lib32_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib32_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib32_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++ + stdio/lib32_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib32_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/lib32_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Po +@@ -41099,6 +41131,20 @@ secapi/lib64_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/lib64_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi` + ++stdio/lib64_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib64_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib64_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++ ++stdio/lib64_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib64_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib64_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++ + stdio/lib64_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib64_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/lib64_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Po +@@ -50871,6 +50917,20 @@ secapi/libarm32_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/libarm32_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi` + ++stdio/libarm32_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm32_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm32_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++ ++stdio/libarm32_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm32_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm32_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++ + stdio/libarm32_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm32_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/libarm32_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Po +@@ -59565,6 +59625,20 @@ secapi/libarm64_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/libarm64_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi` + ++stdio/libarm64_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm64_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm64_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c ++ ++stdio/libarm64_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm64_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm64_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi` ++ + stdio/libarm64_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm64_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/libarm64_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Po +diff --git a/mingw-w64-crt/lib32/msvcr100.def.in b/mingw-w64-crt/lib32/msvcr100.def.in +index 53ccd37b..1c6ae3dc 100644 +--- a/mingw-w64-crt/lib32/msvcr100.def.in ++++ b/mingw-w64-crt/lib32/msvcr100.def.in +@@ -880,7 +880,7 @@ _freefls@4 + _fscanf_l + _fscanf_s_l + _fseek_nolock +-_fseeki64 DATA ++_fseeki64 + _fseeki64_nolock + _fsopen + _fstat32 +@@ -890,7 +890,7 @@ _fstat32i64 + _fstat64 + _fstat64i32 + _ftell_nolock +-_ftelli64 DATA ++_ftelli64 + _ftelli64_nolock + _ftime32 + _ftime32_s +diff --git a/mingw-w64-crt/lib32/msvcr90.def.in b/mingw-w64-crt/lib32/msvcr90.def.in +index 69765e53..fd4ef944 100644 +--- a/mingw-w64-crt/lib32/msvcr90.def.in ++++ b/mingw-w64-crt/lib32/msvcr90.def.in +@@ -507,7 +507,7 @@ _freefls@4 + _fscanf_l + _fscanf_s_l + _fseek_nolock +-_fseeki64 DATA ++_fseeki64 + _fseeki64_nolock + _fsopen + _fstat32 +@@ -517,7 +517,7 @@ _fstat32i64 + _fstat64 + _fstat64i32 + _ftell_nolock +-_ftelli64 DATA ++_ftelli64 + _ftelli64_nolock + _ftime32 + _ftime32_s +diff --git a/mingw-w64-crt/lib64/msvcr100.def.in b/mingw-w64-crt/lib64/msvcr100.def.in +index b1e3e073..68c09d6c 100644 +--- a/mingw-w64-crt/lib64/msvcr100.def.in ++++ b/mingw-w64-crt/lib64/msvcr100.def.in +@@ -837,7 +837,7 @@ _freefls + _fscanf_l + _fscanf_s_l + _fseek_nolock +-_fseeki64 DATA ++_fseeki64 + _fseeki64_nolock + _fsopen + _fstat32 +@@ -847,7 +847,7 @@ _fstat32i64 + _fstat64 + _fstat64i32 + _ftell_nolock +-_ftelli64 DATA ++_ftelli64 + _ftelli64_nolock + _ftime32 + _ftime32_s +diff --git a/mingw-w64-crt/lib64/msvcr90.def.in b/mingw-w64-crt/lib64/msvcr90.def.in +index 72f30700..49b57010 100644 +--- a/mingw-w64-crt/lib64/msvcr90.def.in ++++ b/mingw-w64-crt/lib64/msvcr90.def.in +@@ -454,7 +454,7 @@ _freefls + _fscanf_l + _fscanf_s_l + _fseek_nolock +-_fseeki64 DATA ++_fseeki64 + _fseeki64_nolock + _fsopen + _fstat32 +@@ -464,7 +464,7 @@ _fstat32i64 + _fstat64 + _fstat64i32 + _ftell_nolock +-_ftelli64 DATA ++_ftelli64 + _ftelli64_nolock + _ftime32 + _ftime32_s +diff --git a/mingw-w64-crt/stdio/fseeki64.c b/mingw-w64-crt/stdio/fseeki64.c +new file mode 100644 +index 00000000..fdb8f1c1 +--- /dev/null ++++ b/mingw-w64-crt/stdio/fseeki64.c +@@ -0,0 +1,177 @@ ++/** ++ * This file has no copyright assigned and is placed in the Public Domain. ++ * This file is part of the mingw-w64 runtime package. ++ * No warranty is given; refer to the file DISCLAIMER.PD within this package. ++ */ ++#include <stdio.h> ++#include <io.h> ++#include <errno.h> ++#include <internal.h> ++ ++#define _IOYOURBUF 0x0100 ++#define _IOSETVBUF 0x0400 ++#define _IOFEOF 0x0800 ++#define _IOFLRTN 0x1000 ++#define _IOCTRLZ 0x2000 ++#define _IOCOMMIT 0x4000 ++ ++/* General use macros */ ++ ++#define inuse(s) ((s)->_flag & (_IOREAD|_IOWRT|_IORW)) ++#define mbuf(s) ((s)->_flag & _IOMYBUF) ++#define nbuf(s) ((s)->_flag & _IONBF) ++#define ybuf(s) ((s)->_flag & _IOYOURBUF) ++#define bigbuf(s) ((s)->_flag & (_IOMYBUF|_IOYOURBUF)) ++#define anybuf(s) ((s)->_flag & (_IOMYBUF|_IONBF|_IOYOURBUF)) ++ ++#define _INTERNAL_BUFSIZ 4096 ++#define _SMALL_BUFSIZ 512 ++ ++#define FOPEN 0x01 /* file handle open */ ++#define FEOFLAG 0x02 /* end of file has been encountered */ ++#define FCRLF 0x04 /* CR-LF across read buffer (in text mode) */ ++#define FPIPE 0x08 /* file handle refers to a pipe */ ++#define FNOINHERIT 0x10 /* file handle opened _O_NOINHERIT */ ++#define FAPPEND 0x20 /* file handle opened O_APPEND */ ++#define FDEV 0x40 /* file handle refers to device */ ++#define FTEXT 0x80 /* file handle is in text mode */ ++ ++_CRTIMP __int64 __cdecl _lseeki64(int fh,__int64 pos,int mthd); ++__int64 __cdecl _ftelli64(FILE *str); ++ ++#if !defined(__arm__) && !defined(__aarch64__) /* we have F_ARM_ANY(_fseeki64) in msvcrt.def.in */ ++int __cdecl _flush (FILE *str); ++ ++int __cdecl _flush (FILE *str) ++{ ++ FILE *stream; ++ int rc = 0; /* assume good return */ ++ __int64 nchar; ++ ++ stream = str; ++ if ((stream->_flag & (_IOREAD | _IOWRT)) == _IOWRT && bigbuf(stream) ++ && (nchar = (__int64) (stream->_ptr - stream->_base)) > 0ll) ++ { ++ if ( _write(_fileno(stream), stream->_base, nchar) == nchar) { ++ if (_IORW & stream->_flag) ++ stream->_flag &= ~_IOWRT; ++ } else { ++ stream->_flag |= _IOERR; ++ rc = EOF; ++ } ++ } ++ stream->_ptr = stream->_base; ++ stream->_cnt = 0ll; ++ return rc; ++} ++ ++int __cdecl _fseeki64(FILE *str,__int64 offset,int whence) ++{ ++ FILE *stream; ++ /* Init stream pointer */ ++ stream = str; ++ errno=0; ++ if(!stream || ((whence != SEEK_SET) && (whence != SEEK_CUR) && (whence != SEEK_END))) ++ { ++ errno=EINVAL; ++ return -1; ++ } ++ /* Clear EOF flag */ ++ stream->_flag &= ~_IOEOF; ++ ++ if (whence == SEEK_CUR) { ++ offset += _ftelli64(stream); ++ whence = SEEK_SET; ++ } ++ /* Flush buffer as necessary */ ++ _flush(stream); ++ ++ /* If file opened for read/write, clear flags since we don't know ++ what the user is going to do next. If the file was opened for ++ read access only, decrease _bufsiz so that the next _filbuf ++ won't cost quite so much */ ++ ++ if (stream->_flag & _IORW) ++ stream->_flag &= ~(_IOWRT|_IOREAD); ++ else if ( (stream->_flag & _IOREAD) && (stream->_flag & _IOMYBUF) && ++ !(stream->_flag & _IOSETVBUF) ) ++ stream->_bufsiz = _SMALL_BUFSIZ; ++ ++ /* Seek to the desired locale and return. */ ++ ++ return (_lseeki64(_fileno(stream), offset, whence) == -1ll ? -1 : 0); ++} ++ ++int __cdecl (*__MINGW_IMP_SYMBOL(_fseeki64))(FILE *, __int64, int) = _fseeki64; ++#endif /* !defined(__arm__) && !defined(__aarch64__) */ ++ ++__int64 __cdecl _ftelli64(FILE *str) ++{ ++ FILE *stream; ++ size_t offset; ++ __int64 filepos; ++ register char *p; ++ char *max; ++ int fd; ++ size_t rdcnt = 0; ++ ++ errno=0; ++ stream = str; ++ fd = _fileno(stream); ++ if (stream->_cnt < 0ll) stream->_cnt = 0ll; ++ if ((filepos = _lseeki64(fd, 0ll, SEEK_CUR)) < 0L) ++ return -1ll; ++ ++ if (!bigbuf(stream)) /* _IONBF or no buffering designated */ ++ return (filepos - (__int64) stream->_cnt); ++ ++ offset = (size_t)(stream->_ptr - stream->_base); ++ ++ if (stream->_flag & (_IOWRT|_IOREAD)) ++ { ++ if (_osfile(fd) & FTEXT) ++ for (p = stream->_base; p < stream->_ptr; p++) ++ if (*p == '\n') /* adjust for '\r' */ ++ offset++; ++ } ++ else if (!(stream->_flag & _IORW)) { ++ errno=EINVAL; ++ return -1ll; ++ } ++ if (filepos == 0ll) ++ return ((__int64)offset); ++ ++ if (stream->_flag & _IOREAD) /* go to preceding sector */ ++ { ++ if (stream->_cnt == 0ll) /* filepos holds correct location */ ++ offset = 0ll; ++ else ++ { ++ rdcnt = ((size_t) stream->_cnt) + ((size_t) (size_t)(stream->_ptr - stream->_base)); ++ if (_osfile(fd) & FTEXT) { ++ if (_lseeki64(fd, 0ll, SEEK_END) == filepos) { ++ max = stream->_base + rdcnt; ++ for (p = stream->_base; p < max; p++) ++ if (*p == '\n') /* adjust for '\r' */ ++ rdcnt++; ++ if (stream->_flag & _IOCTRLZ) ++ ++rdcnt; ++ } else { ++ _lseeki64(fd, filepos, SEEK_SET); ++ if ( (rdcnt <= _SMALL_BUFSIZ) && (stream->_flag & _IOMYBUF) && ++ !(stream->_flag & _IOSETVBUF)) ++ rdcnt = _SMALL_BUFSIZ; ++ else ++ rdcnt = stream->_bufsiz; ++ if (_osfile(fd) & FCRLF) ++ ++rdcnt; ++ } ++ } /* end if FTEXT */ ++ } ++ filepos -= (__int64)rdcnt; ++ } /* end else stream->_cnt != 0 */ ++ return (filepos + (__int64)offset); ++} ++ ++__int64 __cdecl (*__MINGW_IMP_SYMBOL(_ftelli64))(FILE *) = _ftelli64; ++ +diff --git a/mingw-w64-crt/stdio/fseeko64.c b/mingw-w64-crt/stdio/fseeko64.c +index 5905aa22..99a54f77 100644 +--- a/mingw-w64-crt/stdio/fseeko64.c ++++ b/mingw-w64-crt/stdio/fseeko64.c +@@ -76,33 +76,7 @@ static struct oserr_map local_errtab[] = { + { ERROR_NOT_ENOUGH_QUOTA, ENOMEM }, { 0, -1 } + }; + +-_CRTIMP __int64 __cdecl _lseeki64(int fh,__int64 pos,int mthd); +-__int64 __cdecl _ftelli64(FILE *str); + void mingw_dosmaperr (unsigned long oserrno); +-int __cdecl _flush (FILE *str); +- +-int __cdecl _flush (FILE *str) +-{ +- FILE *stream; +- int rc = 0; /* assume good return */ +- __int64 nchar; +- +- stream = str; +- if ((stream->_flag & (_IOREAD | _IOWRT)) == _IOWRT && bigbuf(stream) +- && (nchar = (__int64) (stream->_ptr - stream->_base)) > 0ll) +- { +- if ( _write(_fileno(stream), stream->_base, nchar) == nchar) { +- if (_IORW & stream->_flag) +- stream->_flag &= ~_IOWRT; +- } else { +- stream->_flag |= _IOERR; +- rc = EOF; +- } +- } +- stream->_ptr = stream->_base; +- stream->_cnt = 0ll; +- return rc; +-} + + int fseeko64 (FILE* stream, _off64_t offset, int whence) + { +@@ -130,111 +104,6 @@ int fseeko64 (FILE* stream, _off64_t offset, int whence) + return fsetpos (stream, &pos); + } + +-int __cdecl _fseeki64(FILE *str,__int64 offset,int whence) +-{ +- FILE *stream; +- /* Init stream pointer */ +- stream = str; +- errno=0; +- if(!stream || ((whence != SEEK_SET) && (whence != SEEK_CUR) && (whence != SEEK_END))) +- { +- errno=EINVAL; +- return -1; +- } +- /* Clear EOF flag */ +- stream->_flag &= ~_IOEOF; +- +- if (whence == SEEK_CUR) { +- offset += _ftelli64(stream); +- whence = SEEK_SET; +- } +- /* Flush buffer as necessary */ +- _flush(stream); +- +- /* If file opened for read/write, clear flags since we don't know +- what the user is going to do next. If the file was opened for +- read access only, decrease _bufsiz so that the next _filbuf +- won't cost quite so much */ +- +- if (stream->_flag & _IORW) +- stream->_flag &= ~(_IOWRT|_IOREAD); +- else if ( (stream->_flag & _IOREAD) && (stream->_flag & _IOMYBUF) && +- !(stream->_flag & _IOSETVBUF) ) +- stream->_bufsiz = _SMALL_BUFSIZ; +- +- /* Seek to the desired locale and return. */ +- +- return (_lseeki64(_fileno(stream), offset, whence) == -1ll ? -1 : 0); +-} +- +-__int64 __cdecl _ftelli64(FILE *str) +-{ +- FILE *stream; +- size_t offset; +- __int64 filepos; +- register char *p; +- char *max; +- int fd; +- size_t rdcnt = 0; +- +- errno=0; +- stream = str; +- fd = _fileno(stream); +- if (stream->_cnt < 0ll) stream->_cnt = 0ll; +- if ((filepos = _lseeki64(fd, 0ll, SEEK_CUR)) < 0L) +- return -1ll; +- +- if (!bigbuf(stream)) /* _IONBF or no buffering designated */ +- return (filepos - (__int64) stream->_cnt); +- +- offset = (size_t)(stream->_ptr - stream->_base); +- +- if (stream->_flag & (_IOWRT|_IOREAD)) +- { +- if (_osfile(fd) & FTEXT) +- for (p = stream->_base; p < stream->_ptr; p++) +- if (*p == '\n') /* adjust for '\r' */ +- offset++; +- } +- else if (!(stream->_flag & _IORW)) { +- errno=EINVAL; +- return -1ll; +- } +- if (filepos == 0ll) +- return ((__int64)offset); +- +- if (stream->_flag & _IOREAD) /* go to preceding sector */ +- { +- if (stream->_cnt == 0ll) /* filepos holds correct location */ +- offset = 0ll; +- else +- { +- rdcnt = ((size_t) stream->_cnt) + ((size_t) (size_t)(stream->_ptr - stream->_base)); +- if (_osfile(fd) & FTEXT) { +- if (_lseeki64(fd, 0ll, SEEK_END) == filepos) { +- max = stream->_base + rdcnt; +- for (p = stream->_base; p < max; p++) +- if (*p == '\n') /* adjust for '\r' */ +- rdcnt++; +- if (stream->_flag & _IOCTRLZ) +- ++rdcnt; +- } else { +- _lseeki64(fd, filepos, SEEK_SET); +- if ( (rdcnt <= _SMALL_BUFSIZ) && (stream->_flag & _IOMYBUF) && +- !(stream->_flag & _IOSETVBUF)) +- rdcnt = _SMALL_BUFSIZ; +- else +- rdcnt = stream->_bufsiz; +- if (_osfile(fd) & FCRLF) +- ++rdcnt; +- } +- } /* end if FTEXT */ +- } +- filepos -= (__int64)rdcnt; +- } /* end else stream->_cnt != 0 */ +- return (filepos + (__int64)offset); +-} +- + void mingw_dosmaperr (unsigned long oserrno) + { + size_t i; +diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h +index d981f701..0ee6789d 100644 +--- a/mingw-w64-headers/crt/stdio.h ++++ b/mingw-w64-headers/crt/stdio.h +@@ -611,10 +611,9 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li + + /* Shouldn't be any fseeko32 in glibc, 32bit to 64bit casting should be fine */ + /* int fseeko32(FILE* stream, _off_t offset, int whence);*/ /* fseeko32 redirects to fseeko64 */ +-#if __MSVCRT_VERSION__ >= 0x1400 +- // Mark these as _CRTIMP to avoid trying to link in the mingwex versions. + _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); + _CRTIMP __int64 __cdecl _ftelli64(FILE *_File); ++#if __MSVCRT_VERSION__ >= 0x1400 + __mingw_static_ovr int fseeko(FILE *_File, _off_t _Offset, int _Origin) { + return fseek(_File, _Offset, _Origin); + } +@@ -628,8 +627,6 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li + return _ftelli64(_File); + } + #else +- __MINGW_EXTENSION int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); +- __MINGW_EXTENSION __int64 __cdecl _ftelli64(FILE *_File); + int fseeko64(FILE* stream, _off64_t offset, int whence); + int fseeko(FILE* stream, _off_t offset, int whence); + /* Returns truncated 64bit off_t */ +-- +2.14.1 + diff --git a/recipes-toolchain/mpc.recipe b/recipes-toolchain/mpc.recipe new file mode 100644 index 00000000..3cabc488 --- /dev/null +++ b/recipes-toolchain/mpc.recipe @@ -0,0 +1,17 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + +class Recipe(recipe.Recipe): + name = 'mpc' + version = '1.1.0' + url = 'https://ftp.gnu.org/gnu/mpc/mpc-%(version)s.tar.gz' + tarball_checksum = '6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e' + stype = SourceType.TARBALL + licenses = [License.LGPLv2_1Plus] + configure_options = "--disable-shared --enable-static" + deps = ['mpfr'] + + async def configure(self): + shell.call('chmod +w config.guess', self.build_dir) + shell.call('chmod +w config.sub', self.build_dir) + shell.call('chmod +w ltmain.sh', self.build_dir) + await super(Recipe, self).configure() diff --git a/recipes-toolchain/mpfr.recipe b/recipes-toolchain/mpfr.recipe new file mode 100644 index 00000000..5104b508 --- /dev/null +++ b/recipes-toolchain/mpfr.recipe @@ -0,0 +1,11 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + +class Recipe(recipe.Recipe): + name = 'mpfr' + version = '4.0.1' + stype = SourceType.TARBALL + url = 'https://ftpmirror.gnu.org/gnu/mpfr/mpfr-%(version)s.tar.bz2' + tarball_checksum = 'a4d97610ba8579d380b384b225187c250ef88cfe1d5e7226b89519374209b86b' + licenses = [License.LGPLv3Plus] + configure_options = "--disable-shared --enable-static" + deps = ['gmp'] diff --git a/recipes-toolchain/toolchain.recipe b/recipes-toolchain/toolchain.recipe new file mode 100644 index 00000000..138c03d2 --- /dev/null +++ b/recipes-toolchain/toolchain.recipe @@ -0,0 +1,6 @@ +class Recipe(recipe.Recipe): + name = 'toolchain' + version = '8.2.0' + stype = SourceType.CUSTOM + btype = BuildType.CUSTOM + deps = ['gcc', 'gendef'] diff --git a/recipes-toolchain/winpthreads.recipe b/recipes-toolchain/winpthreads.recipe new file mode 100644 index 00000000..885f502a --- /dev/null +++ b/recipes-toolchain/winpthreads.recipe @@ -0,0 +1,99 @@ +import shutil +from cerbero.build.build import modify_environment + + +class Recipe(recipe.Recipe): + name = 'winpthreads' + version = 'v6.0.0' + licenses = [License.LGPLv2_1Plus] + configure_options = '--enable-shared --enable-static' + add_host_build_target = False + autoreconf = True + allow_parallel_build = False + stype = SourceType.CUSTOM + deps = ['mingw-w64-headers'] + files_all = [ + 'bin/libwinpthread-1.dll', + 'lib/libpthread.a', + 'lib/libpthread.dll.a', + 'lib/libwinpthread.a', + 'lib/libwinpthread.dll.a', + 'lib/libwinpthread.la', + 'include/pthread.h', + 'include/pthread_compat.h', + 'include/pthread_time.h', + 'include/pthread_unistd.h', + 'include/sched.h', + 'include/semaphore.h', + ] + + def prepare(self): + if self.config.target_arch == Architecture.X86: + raise InvalidRecipeError(self) + # Since we are cross-compiling we have to reset all the env + # variables set by cerbero (eg: we don't want -m64 overriding + # a i386 build or gcc being used instead of x86_64-mingw32-w64-gcc) + for v in ['CC', 'LD', 'CPP', 'AS', 'RC', 'CXX','CFLAGS', 'LDFLAGS', + 'CXXFLAGS', 'CCASFLAGS']: + self.set_env(v) + self.host = 'x86_64-w64-mingw32' + self.sysroot = os.path.join(self.config.prefix, self.host, 'sysroot') + self.configure_options += ' --with-sysroot=%s ' % self.sysroot + self.make_install = 'make install DESTDIR=%s' % self.sysroot + self.build_dir = os.path.join(self.config.sources, + 'mingw-w64-%s' % self.version) + self.make_dir = os.path.join(self.config.sources, + 'mingw-w64-%s/mingw-w64-libraries/winpthreads' % self.version) + self.configure_tpl = "%%(config-sh)s --prefix /usr/%(host)s "\ + "--libdir /usr/%(host)s %%(options)s" % {'host': self.host} + self.build_dir_32 = os.path.join(self.make_dir, 'winpthread_build_32') + self.build_dir_64 = os.path.join(self.make_dir, 'winpthread_build_64') + + @modify_environment + def configure(self): + # Since the toolchain is built with multilib support + # this recipe builds winpthreads for both x86_64 and x86 + try: + os.mkdir(self.build_dir_32) + except: + pass + flags = "CC=x86_64-w64-mingw32-gcc RC=x86_64-w64-mingw32-windres " \ + "LD=x86_64-w64-mingw32-ld LDFLAGS=' -m32' CFLAGS=' -m32' CXXFLAGS=' -m32' " \ + "RCFLAGS='-F pe-i386' DLLTOOLFLAGS='-m i386'" + host = 'i386-w64-mingw32' + libdir = "/usr/%s/lib32" % self.host + shell.call('%s ../configure --bindir=%s --libdir=%s --prefix=/usr/%s --host=%s %s' %\ + (flags, libdir, libdir, host, host, self.configure_options), + self.build_dir_32) + + try: + os.mkdir(self.build_dir_64) + except: + pass + flags = "CC=x86_64-w64-mingw32-gcc RC=x86_64-w64-mingw32-windres " \ + "LD=x86_64-w64-mingw32-ld LDFLAGS=' -m64' CFLAGS=' -m64' CXXFLAGS=' -m64' " + host = 'x86_64-w64-mingw32' + libdir = "/usr/%s/lib" % self.host + shell.call('%s ../configure --bindir=%s --libdir=%s --prefix=/usr/%s --host=%s %s' %\ + (flags, libdir, libdir, host, host, self.configure_options), + self.build_dir_64) + + def compile(self): + shell.call(self.make, self.build_dir_32) + shell.call(self.make, self.build_dir_64) + + def install(self): + src_winpthread_dll = "%s/usr/%s/bin/libwinpthread-1.dll" % \ + (self.sysroot, self.host) + libdir = "%s/usr/%s/lib32/" % (self.sysroot, self.host) + dest_winpthread_dll = os.path.join(libdir, "libwinpthread-1.dll") + shell.call(self.make_install, self.build_dir_32) + if os.path.exists(dest_winpthread_dll): + os.remove(dest_winpthread_dll) + shutil.move(src_winpthread_dll, dest_winpthread_dll) + shell.call(self.make_install, self.build_dir_64) + libdir = "%s/usr/%s/lib/" % (self.sysroot, self.host) + dest_winpthread_dll = os.path.join(libdir, "libwinpthread-1.dll") + if os.path.exists(dest_winpthread_dll): + os.remove(dest_winpthread_dll) + shutil.move(src_winpthread_dll, libdir) |