The build of 3.79 goes smoothly (using Sun's native make), however, I run gmake I get:
Bus Error (core dumped)
regardless of what command-line arguments I use.
using the following trivial Makefile:
all:
echo "making all ... "
my gdb session looks as follows:
> gdb ~/bin/gmake
GNU gdb 4.17
[ed. ... ]
This GDB was configured as "sparc-sun-solaris2.7"...
(gdb) set args all
(gdb) run
Starting program: /export/home/brownn/bin/gmake all
Program received signal SIGBUS, Bus error.
0x1fcc8 in init_switches () at main.c:1930
1930 switch (switches[i].type)
(gdb) print i
$1 = 0
(gdb) print switches[i]
$2 = {c = 98, type = ignore, value_ptr = 0x0, env = 0, toenv = 0,
no_makefile = 0, noarg_value = 0x0, default_value = 0x0, long_name = 0x0,
argdesc = 0x0, description = 0x33f30 "Ignored for compatibility"}
(gdb)
The relevant section of code reads as follows:
for (i = 0; switches[i].c != '\0'; ++i)
{
long_options[i].name = (switches[i].long_name == 0 ? "" :
switches[i].long_name);
long_options[i].flag = 0;
long_options[i].val = switches[i].c;
if (short_option (switches[i].c))
*p++ = switches[i].c;
switch (switches[i].type) # [ed. line 1930]
{
case flag:
case flag_off:
case ignore:
long_options[i].has_arg = no_argument;
break;
Any guess why a simple switch statement on a defined enumerated type would cause
a bus error? Might it have something to do with the 64-bit extensions in Sol 2.7?
Or is this a gcc bug of some kind?
"file ~/bin/gmake" gives:
ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
Although I am building 3.79, I get the same error in the corresponding locations in
all versions
back to 3.77.
Here is the relevant compile info:
make-3.79
gcc version 2.95.2 19991024 (release)
5.7 Generic sun4u sparc SUNW,Ultra-60
64-bit sparcv9 applications
32-bit sparc applications
Thanks,
Nelson Brown
[EMAIL PROTECTED]