[csw-maintainers] Using an architecture-specific includes in GAR

John Ellson ellson at opencsw.org
Sat Aug 6 06:10:45 CEST 2011


Maciej,

On Fedora, /usr/include/gmp.h is just a wrapper, ... it starts with this 
comment which explains:

/*
* This gmp.h is a wrapper include file for the original gmp.h, which has 
been
* renamed to gmp-<arch>.h. There are conflicts for the original gmp.h on
* multilib systems, which result from arch-specific configuration options.
* Please do not use the arch-specific file directly.
*
* Copyright (C) 2006 Red Hat, Inc.
* Thomas Woerner <twoerner at redhat.com>
*/

#ifdef gmp_wrapper_h
#error "gmp_wrapper_h should not be defined!"
#endif
#define gmp_wrapper_h

#if defined(__arm__)
#include "gmp-arm.h"
#elif defined(__i386__)
#include "gmp-i386.h"
#elif defined(__ia64__)
#include "gmp-ia64.h"
#elif defined(__powerpc64__)
#include "gmp-ppc64.h"
#elif defined(__powerpc__)
#include "gmp-ppc.h"
#elif defined(__s390x__)
#include "gmp-s390x.h"
#elif defined(__s390__)
#include "gmp-s390.h"
#elif defined(__x86_64__)
#include "gmp-x86_64.h"
#elif defined(__alpha__)
#include "gmp-alpha.h"
#elif defined(__sh__)
#include "gmp-sh.h"
#elif defined(__sparc__) && defined (__arch64__)
#include "gmp-sparc64.h"
#elif defined(__sparc__)
#include "gmp-sparc.h"
#else
#error "The gmp-devel package is not usable with the architecture."
#endif

#undef gmp_wrapper_h


------------------------------------------------------------------------

John


On 08/05/2011 03:15 AM, Maciej Bliziński wrote:
> Hello maintainers,
>
> Suppose I have a package which has different headers for different
> architectures (e.g. libgmp).  What's the best place for the headers?
> Is the following sane?
>
> /opt/csw/include/amd64 d none 0755 root bin CSWlibgmp-dev
> /opt/csw/include/amd64/gmp.h f none 0644 root bin 86215 39079
> 1312523810 CSWlibgmp-dev
> /opt/csw/include/gmp.h f none 0644 root bin 86204 38065 1312523796 CSWlibgmp-dev
> /opt/csw/include/pentium d none 0755 root bin CSWlibgmp-dev
> /opt/csw/include/pentium/gmp.h f none 0644 root bin 86208 38680
> 1312523801 CSWlibgmp-dev
>
> Second question: Is there an idiom in GAR that automatically pick the
> right include file? For example, when I'm building for amd64, I want
> the /opt/csw/include/amd64 directory to be first in the include search
> path. I know I can fiddle with EXTRA_INC in my build description, but
> perhaps there's already something in the GAR code to handle this case.
>
> Maciej
> _______________________________________________
> maintainers mailing list
> maintainers at lists.opencsw.org
> https://lists.opencsw.org/mailman/listinfo/maintainers
> .:: This mailing list's archive is public. ::.
>



More information about the maintainers mailing list