Created attachment 43059 [details] [review] augment headers-standalone to work with additional compilers x86_64-sun-solaris2.10, Solaris 10u6 (not OpenSolaris) with the commercial, no-cost Sun Workshop compilers. When executing "gmake check" against cairo-1.10.2, the headers-standalone target fails in the src directory, with messages like the following: CHECK cairo-svg.h ld: fatal: file ./cairo-svg.h: unknown file type ld: fatal: File processing errors. No output written to /dev/null CHECK cairoint.h ld: fatal: file ./cairoint.h: unknown file type ld: fatal: File processing errors. No output written to /dev/null I'm presuming that gcc permits you to specify a header file as your source file AND link and generate an executable from just that file. The Solaris compiler, however, will not. Luckily, it's pretty easy to make the target more portable. The fix involves generating a tiny C source file that includes the header file. I'm attaching a patch that does that. With that patch, headers-standalone completes successfully for me.
Looks good. How about this minor variation: - $(COMPILE) -o /dev/null $(srcdir)/$$f || status=false; \ + echo "#include \"$(srcdir)/$$f\"" > conftest-headers.c; \ + echo "int main(int argc, char * argv[]) {}" >> conftest-headers.c; \ + $(COMPILE) -o /dev/null headers-standalone-tmp.c || status=false; \ + $(RM) headers-standalone-tmp.c; \
Lines 1 & 2 of your patch still uses conftest-headers.c for the filename, but lines 3 & 4 use headers-standalone-tmp.c. I didn't understand how that could work, so I changed all the lines to headers-standalone-tmp.c and made your suggested change for how the include is handled, and those changes appears to work well. Updated patch will be added momentarily.
Created attachment 43273 [details] [review] updated patch that uses a different tmp filename and doesn't use -I $(srcdir) for includes
(In reply to comment #3) > Created an attachment (id=43273) [details] > updated patch that uses a different tmp filename and doesn't use -I $(srcdir) > for includes Looks good. Thanks.
Committed to master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.