🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by John Eaton Fri, 06 Nov 1992 00:04
Compiling oleo-1.0 with gcc-2.3 on a SPARC fails (possible fix)
#1029
Author: John Eaton
Date: Fri, 06 Nov 1992 00:04
51 lines
2123 bytes
io_utils.c fails to compile with gcc-2.3 on a SPARC running SunOS 4.1.2:

schoch:53> make CC=gcc  io_utils.o
gcc -c -g  -DSTDC_HEADERS=1 -DHAVE_UALARM=1 -DHAVE_SETITIMER=1 -DHAVE_RENAME=1 -DHAVE_VPRINTF=1  /usr/local/src/public/gnu/oleo-1.0/io_utils.c
as: "/usr/tmp/cca14282.s", line 111: error: location counter not on word boundary
make: *** [io_utils.o] Error 1

Line 111 of io_utils.s is:

  108   _numb_oflo:
  109           .ascii "########################################\0"
  110   .stabs "__plinf:G13",32,0,0,0
  111           .global ___plinf
  112           .align 8
  113   ___plinf:
  114           .word   0x7ff00000

which can be traced to the following lines in io_utils.c:

#ifndef ASM_INF
#if defined(__GNUC__) && ! defined(mips)
__asm (".globl ___plinf");
__asm ("___plinf: .double 0rinf");
__asm (".globl ___neinf");
__asm ("___neinf: .double 0r-inf");
__asm (".globl ___nan");
__asm ("___nan: .double 0rnan");
#else
double __plinf = 1e500;
double __neinf = -1e500;
double __nan = 1e500 / -1e500;
#endif
#endif

The problem can be elimimated by changing

  #if defined(__GNUC__) && ! defined(mips)

to

  #if defined(__GNUC__) && ! (defined(mips) || defined(sparc))

or by defining ASM_INF (?!).

Neither of these solutions seems to be the correct one though, and I
can find no other mention of ASM_INF anywhere else in the oleo
distribution.  Was its definition accidentally omitted?

--
Virtually all of the programs obtained by our sampling | John W. Eaton
procedure were written in FORTRAN.  -- Donald E. Knuth | jwe@che.utexas.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads