🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50806

gcc 2.4.5 on HP-UX thp A.09.01 A 9000/735 , and varargs

#50806
From: Markus Mock
Date: Fri, 27 Aug 1993 10:12
63 lines
2911 bytes
Hi everybody,

I can successfully compile gcc 2.4.5 on the HPUX machine (spec above), however, when you try to 

 gcc -v va-test.c
Reading specs from /usr/local/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/specs
gcc version 2.4.5
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/cpp -lang-c -v -undef -D__GNUC__=2 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D_HPUX_SOURCE -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D___HPUX_SOURCE__ -D__hppa -D__hp9000s800 -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -D___HPUX_SOURCE -D__hp9000s700 -D_PA_RISC1_1 va-test.c /usr/tmp/cca23440.i
GNU CPP version 2.4.5 (hppa)
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/cc1 /usr/tmp/cca23440.i -quiet -dumpbase va-test.c -version -o /usr/tmp/cca23440.s
GNU C version 2.4.5 (hppa) compiled by GNU C version 2.4.5.
 as -o /usr/tmp/cca234401.o /usr/tmp/cca23440.s
 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/ld -u main -a archive /lib/crt0.o -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5 -L/usr/local/lib /usr/tmp/cca234401.o -lgcc -lc -lgcc
/bin/ld: Unsatisfied symbols:
   __builtin_va_start (code)
collect: ld returned 1 exit status


Where va-test.c is:

#include <stdio.h>
#include <stdarg.h>
#include <varargs.h>

int va_sum(int cnt, ...);

main()
{
  int a = 1, b = 2, c = 3;

  printf("First call: sum = %d\n", va_sum(2, a, b));
  printf("Second call: sum =%d\n",va_sum(3, a, b, c));

}
int va_sum(int cnt, ...)
{
  int i, sum = 0;
  va_list ap;

  va_start(ap,cnt);
  for (i=0; i < cnt; i++)
    sum += va_arg(ap, int);
  va_end(ap);
  return sum;

}


which compiles perfectly with c89 and cc (not using ANSI prototypes).
Any suggestions?


-- 


	-- Markus
________________________________________________________

Markus U. Mock                  Universitaet Karlsruhe
mock@ira.uka.de                 Institut fuer Telematik
Tel.: +49-721-608-4045          Postfach 6980
Fax.: +49-721-388097            76128 Karlsruhe, Germany
________________________________________________________
Technical Details
Message-ID: <25kmlp$d0c@nz12.rz.uni-karlsruhe.de>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!rz.uni-karlsruhe.de!t500i2.telematik.informatik.uni-karlsruhe.de!mock

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,5dd5ddf23c3928c5,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-08-27 03:13:35 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!rz.uni-karlsruhe.de!t500i2.telematik.informatik.uni-karlsruhe.de!mock
From: mock@t500i2.telematik.informatik.uni-karlsruhe.de (Markus Mock)
Newsgroups: gnu.gcc.help
Subject: gcc 2.4.5 on HP-UX thp A.09.01 A 9000/735 , and varargs
Date: 27 Aug 1993 10:12:08 GMT
Organization: University of Karlsruhe
Lines: 63
Distribution: world
Message-ID: <25kmlp$d0c@nz12.rz.uni-karlsruhe.de>
Reply-To: mock@ira.uka.de
NNTP-Posting-Host: t500i2.telematik.informatik.uni-karlsruhe.de
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Keywords: gcc, varargs, builtins