From mboxrd@z Thu Jan 1 00:00:00 1970 From: karuottu@freenet.hut.fi (Kai Ruottu) To: help-gcc@gnu.org Subject: Re: gcc on SOLARIS 7 ('__builtin_va_alist' and info files) Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <3860d5c7.3961426@news.nettilinja.fi> References: <3860785B.DEA9B783@cps.com.au> X-SW-Source: 1999-12n/msg00310.html Message-ID: <19991231222400.fBUNvyvy-4wZTlIeNY-Ltjfq7n2AQZ6QJOiNm9Jg5AQ@z> On Wed, 22 Dec 1999 18:06:03 +1100, Bryan Lovquist wrote: >Hello > >I recently downloaded gcc 2.8.1 and am attempting to compile some programs under SOLARIS 7. >I am getting the following error; > >aim.c:514: '__builtin_va_alist' undeclared (... > >I have looked in the supplied '*.h' files that came with the release and cannot find a >declaration anywhere. Does anybody have any ideas? The definition '#define va_start __builtin_va_alist-something' etc. are for the native Sun compiler, and are used in the native headers 'stdarg.h' and 'varargs.h'. GCC should try first its 'fixed' headers at : /usr/local/lib/gcc-lib/sparc-solaris2.7/2.8.1/include and if not found there, to try the unfixed native headers at: /usr/include Your 'prefix' may be another than the default '/usr/local' (like /opt/gnu ?), the target name may be other than 'sparc-solaris2.7', so the directory names here are just examples... But as I found with gcc-2.95.2, it tries first the unfixed headers and only after that the fixed and the GCC-specific ones... This is just a serious bug. You can see if this is the case with gcc-2.8.1 by using the '-v' option in the GCC command line and looking at what cpp says about the include directories and their use order... When using GCC we could expect the GCC-ones being the right ones and renaming the Sun's 'stdarg.h', 'varargs.h', 'stddef.h' etc. as 'stdarg.h.sun' etc. could be a solution, then GCC doesn't find them there.... Another solution could be to add a -I/usr/local/lib/gcc-lib/sparc-solaris2.7/2.8.1/include into the CPP_SPEC (*cpp:) in the GCC 'specs'-file, which would forge GCC to search its own headers first. >Also could somebody give me a hint as what tools I need to read the >documentation. There are a number of '*.info' files that came with >the release. Don't know about any info-readers... An alternative could be to use the 'industry standard' PDF or HTML formats for the GNU docs. Then you could use the freely available Adobe Acrobat reader or your Netscape etc. web browser to read the manuals. But then you had to download the PDF-or HTML-format manuals first, if they weren't included with the Solaris2-distribution (Funny if at least the 'texi2html' wasn't used for the manuals, but only 'makeinfo') I don't know if anyone has put available just the plain GNU docs as PDF-files, but many prebuilt GCC-distributions include them. At least the Motorola 'GCC for M.CORE' and the European Space Agency, ESA, 'erc32' (embedded Sparc for space apps) GCC distributions include the GNU docs as PDF-files. Here is the document list from the ESA-erc32 distribution ( ftp://ftp.estec.esa.nl/pub/ws/wsd/erc32/erc32ccs ) : ------------------ clip ---------------- 2.6 Documentation An extensive set of documentation for all tools can be found in doc and man. The following documents are provided: aarm.pdf Annotated Ada 95 Reference Manual as.bdf Using as - the GNU assembler bfd.pdf Libbfd - the binary file description binutils.pdf The GNU binary utilities cpp.pdf The C Preprocessor ddd.pdf DDD - The Data Display Debugger gcc.pdf Using and porting GCC gdb.pdf Debugging with GDB gnat_rm.pdf GNAT reference manual gnat_ug.pdf GNAT User’s guide ld.pdf Using ld - the GNU linker mkprom.pdf Mkprom manual page rtems_dev.pdf RTEMS Development environment guide rtems_relnotes.pdf RTEMS Release notes rtems_sparc.pdf RTEMS SPARC Applications supplement rtems_user.pdf RTEMS C User’s manual (this is the one you want!) sis.pdf SIS - SPARC instruction set simulator manual sparcv7.pdf SPARC V7 Instruction set manual ------------------ clip ---------------- The Motorola M.CORE-distribution is available at: http://www.mot.com/SPS/MCORE/tools_gnu.htm The binary releases should include the docs in PDF-format. For the HTML-format docs you can start at 'www.gnu.org'... Cheers, Kai