Re: Xine-lib 1.2.9 fails to build on i386

Torsten Jager <[email protected]> Wed, 14 Feb 2018 19:25:04 +0100
Newsgroups gmane.comp.video.xine.devel
Message-ID <[email protected]>
Hello,

> Updating the OpenBSD port/package to 1.2.9 we found that Xine-lib
> now fails to build on i386 with...
>
> https://marc.info/?l=openbsd-ports-cvs&m=151843968129893&w=2

Try
   - build with gcc, or
   - configure / build with CPPFLAGS -U__ILP32__
     (just for i386, not generally), or
   - apply attachment (also uploaded to hg.debian.org).

Torsten

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
xine-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-devel
194_02_x32_clang.diff (text/x-patch, 853 B)
Attempt to fix x32 build with clang.
--- xine-lib-1.2/include/config.h	2017-11-28 17:55:30.000000000 +0100
+++ xine-lib-1.2/include/config.h	2018-02-13 14:39:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2017 the xine project
+ * Copyright (C) 2007-2018 the xine project
  *
  * This file is part of xine, a free video player.
  *
@@ -24,9 +24,11 @@
 /* Ugly build time sanity guard.
  * ./configure might mistake X32 mode as plain 64bit,
  * but compiler itself sets __ILP32__ when in x32.
+ * Even worse: clang sets this in 32 mode as well,
+ * so also test __i386__ here.
  */
 #ifdef ARCH_X86
-#  if defined(__ILP32__) && !defined(ARCH_X86_X32)
+#  if defined(__ILP32__) && !defined(__i386) && !defined(__i386__) && !defined(ARCH_X86_X32)
 #    ifdef ARCH_WARN
 #        warning "configure did not detect ARCH_X86_X32!"
 #    endif