Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Alexander Kabaev

On Tue, 24 Sep 2002 10:52:10 -0500 (CDT)
Mike Silbersack [EMAIL PROTECTED] wrote:

  Do you want me to try your first patch?  I never got a chance to test
  it.(And no longer have a copy of it, either.)
No, there is a bug in the patch you tested. Could you please try again
with an updated patch? URL is the same

http://people.freebsd.org/~kan/gcc-cpp.diff

-- 
Alexander Kabaev

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Mike Silbersack



On Tue, 24 Sep 2002, Alexander Kabaev wrote:

 On Tue, 24 Sep 2002 10:52:10 -0500 (CDT)
 Mike Silbersack [EMAIL PROTECTED] wrote:

   Do you want me to try your first patch?  I never got a chance to test
   it.(And no longer have a copy of it, either.)
 No, there is a bug in the patch you tested. Could you please try again
 with an updated patch? URL is the same

 http://people.freebsd.org/~kan/gcc-cpp.diff

 --
 Alexander Kabaev

That doesn't seem to have fixed the problem, and the backtrace looks to be
the same:

#0  0x08058cb6 in cpp_ideq ()
#1  0x080592e6 in _cpp_lex_direct ()
#2  0x08058f6d in _cpp_lex_token ()
#3  0x08056465 in cpp_macro_definition ()
#4  0x080564ed in cpp_macro_definition ()
#5  0x0805672b in _cpp_handle_directive ()
#6  0x08058f9c in _cpp_lex_token ()
#7  0x08055832 in cpp_get_token ()
#8  0x0805595d in cpp_scan_nooutput ()
#9  0x08048409 in do_preprocessing ()
#10 0x08048241 in main ()
#11 0x08048145 in _start ()

Thanks to the wonderful sort breakage, I'm seeing this if I touch
cppmacro.c and make again:

=== cc_int
cc -O -pipe -mcpu=pentiumpro -DIN_GCC -DHAVE_CONFIG_H -DPREFIX=\/usr\
-I/usr/obj/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
-I/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
-I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc
-I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/config
-DHAVE_CONFIG_H -DTARGET_NAME=\i386-undermydesk-freebsd\ -DIN_GCC  -c
/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/cppmacro.c -o
cppmacro.o
building static cc_int library
sort: open failed: +1: No such file or directory
sort: open failed: +1: No such file or directory
ranlib libcc_int.a

Any chance that's causing a problem?

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Mike Silbersack


On Sun, 22 Sep 2002, Alexander Kabaev wrote:

 On Sun, 22 Sep 2002 18:51:14 -0500 (CDT)
 Mike Silbersack [EMAIL PROTECTED] wrote:

  I'm seeing the segfault in the kernel make depend step, just as
  someone else reported.

 OK, could you please try the patch at
 http://people.freebsd.org/~kan/gcc-cpp.diff and let me know the results.


 --
 Alexander Kabaev

This version of the gcc-cpp.diff patch:

Index: cppmacro.c
===
RCS file: /usr/ncvs/src/contrib/gcc/cppmacro.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 cppmacro.c
--- cppmacro.c  1 Sep 2002 20:37:29 -   1.1.1.4
+++ cppmacro.c  23 Sep 2002 17:44:32 -
@@ -349,6 +349,8 @@

   /* Commit the memory, including NUL, and return the token.  */
   len = dest - BUFF_FRONT (pfile-u_buff);
+  if ((size_t) (BUFF_LIMIT (pfile-u_buff) - dest)  1)
+_cpp_extend_buff (pfile, pfile-u_buff, 1);
   BUFF_FRONT (pfile-u_buff) = dest + 1;
   return new_string_token (pfile, dest - len, len);
 }

Does _not_ fix the problem for me.  Here's the backtrace of the crash with
the patch applied:

#0  0x08058cb6 in cpp_ideq ()
#1  0x080592e6 in _cpp_lex_direct ()
#2  0x08058f6d in _cpp_lex_token ()
#3  0x08056465 in cpp_macro_definition ()
#4  0x080564ed in cpp_macro_definition ()
#5  0x0805672b in _cpp_handle_directive ()
#6  0x08058f9c in _cpp_lex_token ()
#7  0x08055832 in cpp_get_token ()
#8  0x0805595d in cpp_scan_nooutput ()
#9  0x08048409 in do_preprocessing ()
#10 0x08048241 in main ()
#11 0x08048145 in _start ()

And of course, it's this part of a buildkernel where it happens:

make -V CFILES -V SYSTEM_CFILES -V GEN_CFILES -V GEN_M_CFILES |
MKDEP_CPP=cc -E CC=cc xargs mkdep -a -f .newdep -O -pipe
-mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
-Wcast-qual  -fformat-extensions -ansi -g -nostdinc -I-  -I.
-I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica
-I/usr/src/sys/contrib/ipfilter -D_KERNEL -include opt_global.h
-fno-common  -mpreferred-stack-boundary=2 -ffreestanding
cc: Internal error: Segmentation fault (program cpp0)
Please submit a full bug report.
See URL:http://www.gnu.org/software/gcc/bugs.html for instructions.

Do you want me to try your first patch?  I never got a chance to test it.
(And no longer have a copy of it, either.)

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Alexander Kabaev


 
 Thanks to the wonderful sort breakage, I'm seeing this if I touch
 cppmacro.c and make again:
 
 === cc_int
 cc -O -pipe -mcpu=pentiumpro -DIN_GCC -DHAVE_CONFIG_H
 -DPREFIX=\/usr\-I/usr/obj/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
 -I/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
 -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc
 -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/config
 -DHAVE_CONFIG_H -DTARGET_NAME=\i386-undermydesk-freebsd\ -DIN_GCC 
 -c/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/cppmacro.c -o
 cppmacro.o
 building static cc_int library
 sort: open failed: +1: No such file or directory
 sort: open failed: +1: No such file or directory
 ranlib libcc_int.a
 
 Any chance that's causing a problem?
 

It is certainly a possibility. Were all the binaries dependent on the
cc_int relinked? Was cc_int itself updated with a newer cppmacro.o file?
You might want to do a make clean in /usr/src/gnu/usr.bin/cc before
building a new copy of gcc.

-- 
Alexander Kabaev

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread walt

Mike Silbersack wrote:


 Thanks to the wonderful sort breakage, I'm seeing this if I touch
 cppmacro.c and make again: 
 
 building static cc_int library
 sort: open failed: +1: No such file or directory
 sort: open failed: +1: No such file or directory

This is easily fixed by patching /usr/bin/lorder to use the newer
syntax for 'sort'.  See Garrett's patch in the thread entitled
'lorder problem'.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Mike Silbersack


On Tue, 24 Sep 2002, David Wolfskill wrote:

 building static cc_int library
 sort: open failed: +1: No such file or directory
 sort: open failed: +1: No such file or directory
 ranlib libcc_int.a

 Any chance that's causing a problem?

 To fix that (regardless of sort), s/sort +1/sort -k 2/ in `which lorder`
 (and /usr/src/usr.bin/lorder/lorder.sh).

 Cheers,
 david   (links to my resume at http://www.catwhisker.org/~david)
 --
 David H. Wolfskill[EMAIL PROTECTED]

Ok, I fixed lorder.sh, and made gcc again from clean with Alexander's
patch.  No change, I still see the same segmentation fault.  Alexander,
how can I easily build gcc with full debugging symbols?  That might make
the backtrace more useful for you.

Or better yet, I'm just including my kernel config.  Presumably with it
you'll be able to recreate the problem on your system.  If not, then we
can see what else differs about my system.

Mike Silby Silbersack


#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
#http://www.FreeBSD.org/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the NOTES configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in NOTES.
#
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.308 2001/05/13 20:52:39 phk Exp $

machine i386
cpu I486_CPU
cpu I586_CPU
cpu I686_CPU
ident   PATROCLES
maxusers0

#options RANDOM_IP_ID
options  UFS_DIRHASH
options DIAGNOSTIC
#makeoptions NO_WERROR=true

device  smbus   # Bus support, required for smb below.

device  intpm
device  alpm
device  ichsmb
 
device  smb

device  iicbus  # Bus support, required for ic/iic/iicsmb below.
device  iicbb

device  ic
device  iic
device  iicsmb  # smb over i2c bridge

#device pcf

#To statically compile in device wiring instead of /boot/device.hints
#hints  GENERIC.hints #Default places to look for devices.

makeoptions DEBUG=-g#Build kernel with gdb(1) debug symbols
options DDB
#optionsMATH_EMULATE#Support for x87 emulation
options INET#InterNETworking
options INET6   #IPv6 communications protocols
options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options MD_ROOT #MD is a potential root device
#optionsNFS #Network Filesystem
#optionsNFS_ROOT#NFS usable as root device, NFS required
options MSDOSFS #MSDOS Filesystem
options CD9660  #ISO 9660 Filesystem
options PROCFS  #Process filesystem
options PSEUDOFS
options COMPAT_43   #Compatible with BSD 4.3 [KEEP THIS!]
options SCSI_DELAY=15000#Delay (in ms) before probing SCSI
options KTRACE  #ktrace(1) support
options SYSVSHM #SYSV-style shared memory
options SYSVMSG #SYSV-style message queues
options SYSVSEM #SYSV-style semaphores
options P1003_1B#Posix P1003_1B real-time extensions
options _KPOSIX_PRIORITY_SCHEDULING
options KBD_INSTALL_CDEV# install a CDEV entry in /dev

# Debugging for use in -current
#optionsDDB
#optionsINVARIANTS
#optionsINVARIANT_SUPPORT
#optionsWITNESS

# To make an SMP kernel, the next two are needed
#optionsSMP # Symmetric MultiProcessor Kernel
#optionsAPIC_IO # Symmetric (APIC) I/O

device  isa
device  eisa
device  pci

# Floppy drives
device  fdc

# ATA and ATAPI devices
device  ata
device  atadisk # ATA disk drives
device  atapicd # ATAPI CDROM drives
device  atapifd # ATAPI floppy drives
device  atapist # ATAPI tape drives
options ATA_STATIC_ID   #Static device numbering

# SCSI Controllers
device  ahb # EISA AHA1742 family
device  ahc # AHA2940 and onboard AIC7xxx devices

Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Craig Rodrigues

On Tue, Sep 24, 2002 at 02:05:08PM -0500, Mike Silbersack wrote:
 Ok, I fixed lorder.sh, and made gcc again from clean with Alexander's
 patch.  No change, I still see the same segmentation fault.  Alexander,
 how can I easily build gcc with full debugging symbols?  That might make
 the backtrace more useful for you.

Does this work for you:
cd /usr/src/gnu/usr.bin/cc
make DEBUG_FLAGS=-g install

-- 
Craig Rodrigues
http://www.gis.net/~craigr
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Mike Silbersack


On Tue, 24 Sep 2002, Craig Rodrigues wrote:

 On Tue, Sep 24, 2002 at 02:05:08PM -0500, Mike Silbersack wrote:
  Ok, I fixed lorder.sh, and made gcc again from clean with Alexander's
  patch.  No change, I still see the same segmentation fault.  Alexander,
  how can I easily build gcc with full debugging symbols?  That might make
  the backtrace more useful for you.

 Does this work for you:
 cd /usr/src/gnu/usr.bin/cc
 make DEBUG_FLAGS=-g install

 --
 Craig Rodrigues
 http://www.gis.net/~craigr
 [EMAIL PROTECTED]

Nope, that doesn't build in debugging symbols either.  Neither does adding
+g or +gstabs+ to CFLAGS in make.conf.  Hmph.

Maybe I need to add LDFLAGS or something, I'm not sure.  (I'm really bad
with Makefiles.)

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Alexander Kabaev

On Tue, 24 Sep 2002 16:07:39 -0500 (CDT)
Mike Silbersack [EMAIL PROTECTED] wrote:

 
 On Tue, 24 Sep 2002, Craig Rodrigues wrote:
 
  On Tue, Sep 24, 2002 at 02:05:08PM -0500, Mike Silbersack wrote:
   Ok, I fixed lorder.sh, and made gcc again from clean with
   Alexander's patch.  No change, I still see the same segmentation
   fault.  Alexander, how can I easily build gcc with full debugging
   symbols?  That might make the backtrace more useful for you.

cd /usr/src/gnu/usr.bin/cc
CFLAGS=-g STRIP= make clean all install

Always worked for me.
-- 
Alexander Kabaev

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Mike Silbersack


On Tue, 24 Sep 2002, Alexander Kabaev wrote:

 On Tue, 24 Sep 2002 16:07:39 -0500 (CDT)
 Mike Silbersack [EMAIL PROTECTED] wrote:

 
  On Tue, 24 Sep 2002, Craig Rodrigues wrote:
 
   On Tue, Sep 24, 2002 at 02:05:08PM -0500, Mike Silbersack wrote:
Ok, I fixed lorder.sh, and made gcc again from clean with
Alexander's patch.  No change, I still see the same segmentation
fault.  Alexander, how can I easily build gcc with full debugging
symbols?  That might make the backtrace more useful for you.

 cd /usr/src/gnu/usr.bin/cc
 CFLAGS=-g STRIP= make clean all install

 Always worked for me.
 --
 Alexander Kabaev

Yep, STRIP= was the necessary trick, I didn't realize that install -s
meant strip. :)

As to your patch... it turns out that I wasn't using it.  I've been
testing with make buildkernel, which uses the copy of gcc built by your
last buildworld, not a more recent manual build of gcc.  Hence, I've been
testing the wrong version.  I'll go ahead and run a full buildworld before
testing again.  Sorry about my poor testing practices.

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-24 Thread Mike Silbersack


On Tue, 24 Sep 2002, Mike Silbersack wrote:

 Yep, STRIP= was the necessary trick, I didn't realize that install -s
 meant strip. :)

 As to your patch... it turns out that I wasn't using it.  I've been
 testing with make buildkernel, which uses the copy of gcc built by your
 last buildworld, not a more recent manual build of gcc.  Hence, I've been
 testing the wrong version.  I'll go ahead and run a full buildworld before
 testing again.  Sorry about my poor testing practices.

 Mike Silby Silbersack

Ok, now that I tested properly, I can confirm that your generation 3 patch
seems to solve the problem here.  Please commit it asap!

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-22 Thread Alexander Kabaev

On Sat, 21 Sep 2002 23:10:51 -0500 (CDT)
Mike Silbersack [EMAIL PROTECTED] wrote:

 
 Is anyone else still seeing Sig 11's from GCC when mcpu=pentiumpro is
 enabled (as it appears to be by default now)?  I get a segfault in the
 same place every time when compiling a DIAGNOSTIC kernel when I leave
 it enabled.
 
 Just curious if this is just me or not...
 
 Mike Silby Silbersack
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-current in the body of the message
 
Please post an error message and a traceback from GCC if possible. I
might have the patch for that.

-- 
Alexander Kabaev


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-22 Thread Mike Silbersack


On Sun, 22 Sep 2002, Alexander Kabaev wrote:

 On Sat, 21 Sep 2002 23:10:51 -0500 (CDT)
 Mike Silbersack [EMAIL PROTECTED] wrote:

 
  Is anyone else still seeing Sig 11's from GCC when mcpu=pentiumpro is
  enabled (as it appears to be by default now)?  I get a segfault in the
  same place every time when compiling a DIAGNOSTIC kernel when I leave
  it enabled.
 
  Just curious if this is just me or not...
 
  Mike Silby Silbersack
 
 
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with unsubscribe freebsd-current in the body of the message
 
 Please post an error message and a traceback from GCC if possible. I
 might have the patch for that.

 --
 Alexander Kabaev

Ok, I think this is the correct backtrace:

#0  0x0806ccee in cpp_ideq ()
#1  0x0806d31e in _cpp_lex_direct ()
#2  0x0806cfa5 in _cpp_lex_token ()
#3  0x080589e1 in cpp_macro_definition ()
#4  0x08058a69 in cpp_macro_definition ()
#5  0x08058ca7 in _cpp_handle_directive ()
#6  0x0806cfd4 in _cpp_lex_token ()
#7  0x08057dae in cpp_get_token ()
#8  0x08057ed9 in cpp_scan_nooutput ()
#9  0x080483e1 in do_preprocessing ()
#10 0x08048219 in main ()
#11 0x08048131 in _start ()

I'm seeing the segfault in the kernel make depend step, just as someone
else reported.

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -mcpu=pentiumpro still evil?

2002-09-22 Thread Alexander Kabaev

On Sun, 22 Sep 2002 18:51:14 -0500 (CDT)
Mike Silbersack [EMAIL PROTECTED] wrote:

 I'm seeing the segfault in the kernel make depend step, just as
 someone else reported.

OK, could you please try the patch at
http://people.freebsd.org/~kan/gcc-cpp.diff and let me know the results.


-- 
Alexander Kabaev


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



-mcpu=pentiumpro still evil?

2002-09-21 Thread Mike Silbersack


Is anyone else still seeing Sig 11's from GCC when mcpu=pentiumpro is
enabled (as it appears to be by default now)?  I get a segfault in the
same place every time when compiling a DIAGNOSTIC kernel when I leave it
enabled.

Just curious if this is just me or not...

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message