Remove support for building for mingw32ce

Message ID 20170830191323.39283-1-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö Aug. 30, 2017, 7:13 p.m.
The toolchain for this target is unmaintained since many years.

While it has been continuously build tested on fate, it hasn't
actually been tested at runtime since many, many years (and back
then, only a few codecs in libavcodec were tested).

So far, keeping support for it has been mostly effortless, but
the compiler does seem to have issues with dllimported data symbols,
ending up as internal compiler errors in some cases. Instead of
jumping through further hoops to work around that, just remove the
target.
---
The build-only fate instances for this (both on normal fate and
on oracle) have been decommissioned.
---
 configure                  | 8 +-------
 libavformat/os_support.h   | 8 +++-----
 libavutil/file_open.c      | 2 +-
 libavutil/wchar_filename.h | 2 +-
 tools/qt-faststart.c       | 5 +----
 5 files changed, 7 insertions(+), 18 deletions(-)

Comments

Martin Storsjö Aug. 30, 2017, 7:20 p.m. | #1
On Wed, 30 Aug 2017, Martin Storsjö wrote:

> The toolchain for this target is unmaintained since many years.
>
> While it has been continuously build tested on fate, it hasn't
> actually been tested at runtime since many, many years (and back
> then, only a few codecs in libavcodec were tested).
>
> So far, keeping support for it has been mostly effortless, but
> the compiler does seem to have issues with dllimported data symbols,
> ending up as internal compiler errors in some cases. Instead of
> jumping through further hoops to work around that, just remove the
> target.
> ---
> The build-only fate instances for this (both on normal fate and
> on oracle) have been decommissioned.
> ---
> configure                  | 8 +-------
> libavformat/os_support.h   | 8 +++-----
> libavutil/file_open.c      | 2 +-
> libavutil/wchar_filename.h | 2 +-
> tools/qt-faststart.c       | 5 +----
> 5 files changed, 7 insertions(+), 18 deletions(-)

I amended the commit message subject line locally to include "Windows CE" 
to make it clear what this is about.

// Martin
Luca Barbato Aug. 31, 2017, 7:01 a.m. | #2
On 30/08/2017 21:20, Martin Storsjö wrote:
> On Wed, 30 Aug 2017, Martin Storsjö wrote:
> 
>> The toolchain for this target is unmaintained since many years.
>>
>> While it has been continuously build tested on fate, it hasn't
>> actually been tested at runtime since many, many years (and back
>> then, only a few codecs in libavcodec were tested).
>>
>> So far, keeping support for it has been mostly effortless, but
>> the compiler does seem to have issues with dllimported data symbols,
>> ending up as internal compiler errors in some cases. Instead of
>> jumping through further hoops to work around that, just remove the
>> target.
>> ---
>> The build-only fate instances for this (both on normal fate and
>> on oracle) have been decommissioned.
>> ---
>> configure                  | 8 +-------
>> libavformat/os_support.h   | 8 +++-----
>> libavutil/file_open.c      | 2 +-
>> libavutil/wchar_filename.h | 2 +-
>> tools/qt-faststart.c       | 5 +----
>> 5 files changed, 7 insertions(+), 18 deletions(-)
> 
> I amended the commit message subject line locally to include "Windows 
> CE" to make it clear what this is about.
> 
> // Martin
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel

Fine for me.

Patch

diff --git a/configure b/configure
index 6bbde1e743..b995235708 100755
--- a/configure
+++ b/configure
@@ -4021,16 +4021,10 @@  case $target_os in
         die "Native MSYS builds are discouraged, please use the MINGW environment."
         ;;
     mingw32*|mingw64*)
-        if test $target_os = "mingw32ce"; then
-            disable network
-        else
-            target_os=mingw32
-        fi
+        target_os=mingw32
         LIBTARGET=i386
         if enabled x86_64; then
             LIBTARGET="i386:x86-64"
-        elif enabled arm; then
-            LIBTARGET=arm-wince
         fi
         check_ldflags -Wl,--nxcompat
         check_ldflags -Wl,--dynamicbase
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index 55c2fdb1f1..75a12960f3 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -40,7 +40,7 @@ 
 #endif
 #endif
 
-#if defined(_WIN32) && !defined(__MINGW32CE__)
+#ifdef _WIN32
 #  include <fcntl.h>
 #  undef lseek
 #  define lseek(f,p,w) _lseeki64((f), (p), (w))
@@ -48,7 +48,7 @@ 
 #  define stat _stati64
 #  undef fstat
 #  define fstat(f,s) _fstati64((f), (s))
-#endif /* defined(_WIN32) && !defined(__MINGW32CE__) */
+#endif /* defined(_WIN32) */
 
 static inline int is_dos_path(const char *path)
 {
@@ -122,9 +122,7 @@  int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout);
 #endif /* HAVE_POLL_H */
 #endif /* CONFIG_NETWORK */
 
-#if defined(__MINGW32CE__)
-#define mkdir(a, b) _mkdir(a)
-#elif defined(_WIN32)
+#ifdef _WIN32
 #include <stdio.h>
 #include <windows.h>
 #include "libavutil/wchar_filename.h"
diff --git a/libavutil/file_open.c b/libavutil/file_open.c
index f14ea70862..dc666fe742 100644
--- a/libavutil/file_open.c
+++ b/libavutil/file_open.c
@@ -29,7 +29,7 @@ 
 #include <io.h>
 #endif
 
-#if defined(_WIN32) && !defined(__MINGW32CE__)
+#ifdef _WIN32
 #undef open
 #undef lseek
 #undef stat
diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h
index 2781773dee..da1a0224ba 100644
--- a/libavutil/wchar_filename.h
+++ b/libavutil/wchar_filename.h
@@ -19,7 +19,7 @@ 
 #ifndef AVUTIL_WCHAR_FILENAME_H
 #define AVUTIL_WCHAR_FILENAME_H
 
-#if defined(_WIN32) && !defined(__MINGW32CE__)
+#ifdef _WIN32
 #include <windows.h>
 #include "mem.h"
 
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index b798ccd4bf..9d820ded8e 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -29,10 +29,7 @@ 
 #include <inttypes.h>
 #include <string.h>
 
-#ifdef __MINGW32CE__
-#define fseeko(x, y, z) fseek(x, y, z)
-#define ftello(x)       ftell(x)
-#elif defined(__MINGW32__)
+#if defined(__MINGW32__)
 #undef fseeko
 #define fseeko(x, y, z) fseeko64(x, y, z)
 #undef ftello