public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Cannot build recent snapshots on UnixWare 2.1.2
@ 1997-10-26 14:27 acs
  1997-10-26 16:30 ` H.J. Lu
  1997-10-27  0:08 ` Jeffrey A Law
  0 siblings, 2 replies; 7+ messages in thread
From: acs @ 1997-10-26 14:27 UTC (permalink / raw)
  To: egcs

On my UnixWare 2.1.2 (SVR4.2MP) system, I'm having the same difficulty
building snapshot 971023 as I had building 971016; the result of the
stage1 compiler will not work.  I had previously built the 970910
snapshot with no difficulty.  I cannot build the 971023 snapshot using 
either the native compiler or gcc.

	cd ./egcs-971023
	./configure --prefix=/usr/local/egcs-971023 --with-gnu-as
Configuring for a i386-pc-sysv4.2uw2.1.2 host.
Created "Makefile" in /home/acs/egcs-971023 using "config/mh-sysv4"
Links are now set up to build a native compiler for i386-pc-sysv4.2uw2.1.2
	cd ./gcc
	ln -s /usr/local/binutils-2.8.1/bin/as .
	make LANGUAGES=c
	make stage1

This produces a compiler which dumps core on a simple hello world
program:

	./egcs-971023/gcc/stage1/xgcc  -B ./egcs-971023/gcc/stage1/ -v x.c
Reading specs from ./egcs-971023/gcc/stage1/specs
gcc version egcs-2.90.14 971023 (gcc2-970802 experimental)
 ./egcs-971023/gcc/stage1/cpp -lang-c -v -isystem ./egcs-971023/gcc/include -isystem ./egcs-971023/gcc/stage1/include -undef -D__GNUC__=2 -D__GNUC_MINOR__=90 -Di386 -Dunix -D__svr4__ -D__i386__ -D__unix__ -D__svr4__ -D__i386 -D__unix -Asystem(unix) -Asystem(svr4) -Acpu(i386) -Amachine(i386) x.c /var/tmp/cca005y4.i
GNU CPP version egcs-2.90.14 971023 (gcc2-970802 experimental) (i386 System V Release 4)
#include "..." search starts here:
#include <...> search starts here:
 egcs-971023/gcc/include
 /usr/local/include
 /usr/include
End of search list.
 ./egcs-971023/gcc/stage1/cc1 /var/tmp/cca005y4.i -quiet -dumpbase x.c -version -o /var/tmp/cca005y4.s
GNU C version egcs-2.90.14 971023 (gcc2-970802 experimental) (i386-pc-sysv4.2uw2.1.2) compiled by GNU C version egcs-2.90.06 970907 (gcc2-970802 experimental).
 ./egcs-971023/gcc/stage1/as -V -Qy -o /var/tmp/cca005y41.o /var/tmp/cca005y4.s
GNU assembler version 970731 (i386-pc-sysv4.2uw2.1.2), using BFD version linux-2.8.1.0.15
 ./egcs-971023/gcc/stage1/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o ./egcs-971023/gcc/stage1/crtbegin.o -L./egcs-971023/gcc/stage1 -L/usr/ccs/bin -L/usr/ccs/lib /var/tmp/cca005y41.o -lgcc -lc -lgcc ./egcs-971023/gcc/stage1/crtend.o /usr/ccs/lib/crtn.o
UX:ld: INFO:  Optimizing C Compilation System  (CCS) 3.0  12/10/95 (eiger8)

	./a.out
Hello world!
zsh: IOT instruction (core dumped)  ./a.out

Here's the backtrace:
#0  0xbffb3783 in kill ()
#1  0xbffe3528 in abort ()
#2  0x804853e in __do_global_dtors_aux ()
#3  0x8048ffd in _fini ()

I've tried building this with both binutils-2.8.1 and HJ's
binutils-2.8.1.0.15; I get the same results with each.

If anyone has any suggestions, I'd be happy to hear them.


vin shelton

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cannot build recent snapshots on UnixWare 2.1.2
  1997-10-26 14:27 Cannot build recent snapshots on UnixWare 2.1.2 acs
@ 1997-10-26 16:30 ` H.J. Lu
  1997-10-26 16:52   ` Jeffrey A Law
  1997-10-26 20:44   ` acs
  1997-10-27  0:08 ` Jeffrey A Law
  1 sibling, 2 replies; 7+ messages in thread
From: H.J. Lu @ 1997-10-26 16:30 UTC (permalink / raw)
  To: acs; +Cc: egcs

> 
> 
> On my UnixWare 2.1.2 (SVR4.2MP) system, I'm having the same difficulty
> building snapshot 971023 as I had building 971016; the result of the
> stage1 compiler will not work.  I had previously built the 970910
> snapshot with no difficulty.  I cannot build the 971023 snapshot using 
> either the native compiler or gcc.
> 

Can you try this patch?


H.J.
---
Fri Oct 17 08:28:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* frame.c (count_fdes, add_fdes): Skip linked once FDE entries.

Sat Oct 11 17:24:53 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* toplev.c (rest_of_compilation): Don't defer thunks.

Index: toplev.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/toplev.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 toplev.c
--- toplev.c	1997/10/24 01:16:14	1.1.1.6
+++ toplev.c	1997/10/24 01:21:06
@@ -3046,7 +3074,8 @@
 
       /* If we can, defer compiling inlines until EOF.
 	 save_for_inline_copying can be extremely expensive.  */
-      if (inlineable && ! decl_function_context (decl))
+      if (inlineable && !current_function_is_thunk
+	  && ! decl_function_context (decl))
 	DECL_DEFER_OUTPUT (decl) = 1;
 
       /* If function is inline, and we don't yet know whether to
Index: frame.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/frame.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 frame.c
--- frame.c	1997/10/09 17:28:50	1.1.1.3
+++ frame.c	1997/10/17 23:04:44
@@ -217,8 +217,9 @@
 
   for (count = 0; this_fde->length != 0; this_fde = next_fde (this_fde))
     {
-      /* Skip CIEs.  */
-      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1)
+      /* Skip CIEs and linked once FDE entries.  */
+      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1
+	  || !this_fde->pc_begin)
 	continue;
 
       ++count;
@@ -237,8 +238,9 @@
 
   for (; this_fde->length != 0; this_fde = next_fde (this_fde))
     {
-      /* Skip CIEs.  */
-      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1)
+      /* Skip CIEs and linked once FDE entries.  */
+      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1
+	  || !this_fde->pc_begin)
 	continue;
 
       fde_insert (array, i++, this_fde);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cannot build recent snapshots on UnixWare 2.1.2
  1997-10-26 16:30 ` H.J. Lu
@ 1997-10-26 16:52   ` Jeffrey A Law
  1997-10-26 17:01     ` H.J. Lu
  1997-10-26 20:44   ` acs
  1 sibling, 1 reply; 7+ messages in thread
From: Jeffrey A Law @ 1997-10-26 16:52 UTC (permalink / raw)
  To: H.J. Lu; +Cc: acs, egcs

  In message < m0xPcpS-0004edC@ocean.lucon.org >you write:
  > Fri Oct 17 08:28:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
  > 
  > 	* frame.c (count_fdes, add_fdes): Skip linked once FDE entries.
Jason installed this patch this morning.

  > Sat Oct 11 17:24:53 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
  > 
  > 	* toplev.c (rest_of_compilation): Don't defer thunks.
I don't know what the status of this patch is -- Jason?


jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cannot build recent snapshots on UnixWare 2.1.2
  1997-10-26 16:52   ` Jeffrey A Law
@ 1997-10-26 17:01     ` H.J. Lu
  0 siblings, 0 replies; 7+ messages in thread
From: H.J. Lu @ 1997-10-26 17:01 UTC (permalink / raw)
  To: law; +Cc: egcs

> 
> 
>   In message < m0xPcpS-0004edC@ocean.lucon.org >you write:
>   > Fri Oct 17 08:28:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
>   > 
>   > 	* frame.c (count_fdes, add_fdes): Skip linked once FDE entries.
> Jason installed this patch this morning.

Thanks.

> 
>   > Sat Oct 11 17:24:53 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
>   > 
>   > 	* toplev.c (rest_of_compilation): Don't defer thunks.
> I don't know what the status of this patch is -- Jason?
> 

Just try -O -fvtable-thunks on any platforms without
ASM_OUTPUT_MI_THUNK. Alpha and MIPS are 2 of them.

# gcc -O -fvtable-thunks t.cc


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
----t.cc--
class B
{
public:
  virtual ~B () {};
};
 
class A : virtual B
{
public:
  A() {}
  ~A ();
};
 
A::~A ()
{
}
 
main ()
{
  A os;
}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cannot build recent snapshots on UnixWare 2.1.2
  1997-10-26 16:30 ` H.J. Lu
  1997-10-26 16:52   ` Jeffrey A Law
@ 1997-10-26 20:44   ` acs
  1997-10-26 23:53     ` Jeffrey A Law
  1 sibling, 1 reply; 7+ messages in thread
From: acs @ 1997-10-26 20:44 UTC (permalink / raw)
  To: H.J. Lu; +Cc: egcs

After applying your patch, I still see the same problem.
Here's the backtrace from the resulting executable again:

#0  0xbffb3783 in kill ()
#1  0xbffe3528 in abort ()
#2  0x804853e in __do_global_dtors_aux ()
#3  0x804900d in _fini ()

Thanks for the help.

vin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cannot build recent snapshots on UnixWare 2.1.2
  1997-10-26 20:44   ` acs
@ 1997-10-26 23:53     ` Jeffrey A Law
  0 siblings, 0 replies; 7+ messages in thread
From: Jeffrey A Law @ 1997-10-26 23:53 UTC (permalink / raw)
  To: acs; +Cc: H.J. Lu, egcs

  In message < 199710270443.XAA25701@spacely.icd.teradyne.com >you write:
  > After applying your patch, I still see the same problem.
  > Here's the backtrace from the resulting executable again:
  > 
  > #0  0xbffb3783 in kill ()
  > #1  0xbffe3528 in abort ()
  > #2  0x804853e in __do_global_dtors_aux ()
  > #3  0x804900d in _fini ()
What do the global ctor/dtor lists look like -- any chance
they're not being initialized correctly?

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cannot build recent snapshots on UnixWare 2.1.2
  1997-10-26 14:27 Cannot build recent snapshots on UnixWare 2.1.2 acs
  1997-10-26 16:30 ` H.J. Lu
@ 1997-10-27  0:08 ` Jeffrey A Law
  1 sibling, 0 replies; 7+ messages in thread
From: Jeffrey A Law @ 1997-10-27  0:08 UTC (permalink / raw)
  To: acs; +Cc: egcs

I believe i386-pc-sysv4.2uw2.1.2 uses crtbegin/crtend, which means
you should be able to compile them with debug information so that
you can figure out what's happening.

It might also be the "eh.o not compiled with -fexceptions problem".

Try adding -fexceptions to LIBGCC2_CFLAGS in Makefile.in, then
rebuiling libgcc.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-10-27  0:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-26 14:27 Cannot build recent snapshots on UnixWare 2.1.2 acs
1997-10-26 16:30 ` H.J. Lu
1997-10-26 16:52   ` Jeffrey A Law
1997-10-26 17:01     ` H.J. Lu
1997-10-26 20:44   ` acs
1997-10-26 23:53     ` Jeffrey A Law
1997-10-27  0:08 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).