[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

multiarch header file wrappers and ARM



Hi,

A number of packages have multilib header file wrappers such as
this one (blkid_types.h from e2fsprogs):

	/* This file is here to prevent a file conflict on multiarch systems. A
	 * conflict will occur because blkid_types.h has arch-specific definitions.
	 *
	 * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

	#if defined(__i386__)
	#include "blkid_types-i386.h"
	#elif defined(__ia64__)
	#include "blkid_types-ia64.h"
	#elif defined(__powerpc64__)
	#include "blkid_types-ppc64.h"
	#elif defined(__powerpc__)
	#include "blkid_types-ppc.h"
	#elif defined(__s390x__)
	#include "blkid_types-s390x.h"
	#elif defined(__s390__)
	#include "blkid_types-s390.h"
	#elif defined(__x86_64__)
	#include "blkid_types-x86_64.h"
	#elif defined(__alpha__)
	#include "blkid_types-alpha.h"
	#else
	#error "This e2fsprogs-devel package does not work your architecture?"
	#endif

It seems that most of such header files are (directly or indirectly)
copied from some original example that didn't test for ARM, and so,
a couple of examples in the distro right now lack the proper definitions
for ARM, causing ARM to end up with unusable -devel packages.

On ARM, the preprocessor symbol __arm__ is defined, and %{_arch} is
set to 'arm', so something like this will work:

	 #if defined(__i386__)
	 #include "blkid_types-i386.h"
	+#elif defined(__arm__)
	+#include "blkid_types-arm.h"
	 #elif defined(__ia64__)
	 #include "blkid_types-ia64.h"
	 #elif defined(__powerpc64__)

If you have such a construct in your package, please consider adding
the relevant __arm__ bits.


thanks,
Lennert


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]