Hi folks, Am 05.08.2011 um 09:15 schrieb Maciej Bliziński: > 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.
(I'll get back on monday, just a quick heads up for now, haven't checked any other emails) The includes can usually be branched by compile-specific flags for the ISA to compile. One notable example for this is curlbuild.h which contains isa-specific definitions of different wide types when compiled on 32 and 64 bits. Traditionally, this has been done by a rename of isa-specific headers and a meta-header with the branch: http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/curl/tags/curl-7.20.0%2CREV%3D2010.02.15/Makefile#L72 http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/curl/tags/curl-7.20.0%2CREV%3D2010.02.15/files/curlbuild.h After that I found out that there is a specific diff-mode which can generate define-shielded diffs in C header format to make just one unified diff: http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/libcurl4/trunk/Makefile#L157 (this was "lend" from some recipe from the OpenSolaris contrib tools tree). I plan to introduce that automatically in GAR to always diff like this between isa-default-32 and isa-default-64 headers which will usually yield in just the 32 bit default headers being the same without any branching. Best regards -- Dago -- "You don't become great by trying to be great, you become great by wanting to do something, and then doing it so hard that you become great in the process." - xkcd #896 _______________________________________________ maintainers mailing list [email protected] https://lists.opencsw.org/mailman/listinfo/maintainers .:: This mailing list's archive is public. ::.
