User account creation filtered due to spam.

Bug 9953 - [3.4 regression] Unsatisfied symbols: U_prep_frame_rec_for_unwind (code)
Summary: [3.4 regression] Unsatisfied symbols: U_prep_frame_rec_for_unwind (code)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-04 21:26 UTC by dave.anglin
Modified: 2004-01-17 04:22 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-05-26 02:14:01


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dave.anglin 2003-03-04 21:26:00 UTC
ada in 3.3 branch fails to build with 3.2.3 (prerelease):

mkdir -p ada/doctools
cp ../../gcc/gcc/ada/xgnatug.adb ada/doctools
cd ada/doctools && gnatmake -q xgnatug
/usr/ccs/bin/ld: Unsatisfied symbols:
   U_prep_frame_rec_for_unwind (code)
collect2: ld returned 1 exit status
gnatlink: cannot call /opt/gnu/bin/gcc
gnatmake: *** link failed.
make[2]: *** [ada/doctools/xgnatug] Error 4

The undefined symbol is from gnatlib.a:

# nm /opt/gnu/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.2.3/adalib/libgnat.a
...
s-traceb.o:
00000000 t $CODE$
00000000 t $CODE$
00000000 t $CODE$
00000000 t $CODE$
00000000 t $CODE$
00000000 t $CODE$
00000000 t L$text0000
00000000 t L$text_end0000
         U U_IS_STUB_OR_CALLX
         U U_get_previous_frame_x
         U U_get_shLib_text_addr
         U U_get_shLib_unw_tbl
         U U_get_unwind_entry
         U U_get_unwind_table
         U U_init_frame_record
         U U_is_shared_pc
         U U_prep_frame_rec_for_unwind

This is a regression.

Release:
3.2 branch

Environment:
hppa1.1-hp-hpux10.20
Comment 1 Olivier Hainque 2003-03-13 17:06:38 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: dave.anglin@nrc-cnrc.gc.ca
Cc: gcc-gnats@gcc.gnu.org, hainque@ACT-Europe.FR, bosch@gnat.com
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (code)
Date: Thu, 13 Mar 2003 17:06:38 +0100

 dave.anglin@nrc-cnrc.gc.ca wrote:
 > cd ada/doctools && gnatmake -q xgnatug
 > /usr/ccs/bin/ld: Unsatisfied symbols:
 >    U_prep_frame_rec_for_unwind (code)
 
  As indicated on other channels, this is because the GNAT run-time library
  references functions from the system unwinding library (for call-chain
  computation purposes), and this specific one is not provided on HPUX 10.
 
  The patch below should fix this.
 
  Bootstrapped against 3.3 on hppa1.1-hp-hpux11.00, and checked that
  the rest of the build goes fine on this target, with the symlinks 
  setup properly during the GNAT run-time library build. Performed a
  couple of simple tests with the resulting compiler installed.
 
  I checked that the symlinks are also setup as expected for a hpux10.20
  target (cross configuration), but I don't have a 10.20 machine at hand to
  test this further.
 
  Could you please check if it indeed fixes your problem ?
 
  Thanks in advance,
 
  Olivier
 
 --
 
 *** gcc/ada/Makefile.in.ori	Mon Mar  3 09:49:49 2003
 --- gcc/ada/Makefile.in	Thu Mar 13 10:59:47 2003
 *************** ifeq ($(strip $(filter-out hppa% hp hpux
 *** 759,771 ****
     s-osinte.ads<53osinte.ads \
     s-parame.ads<5hparame.ads \
     s-osprim.adb<7sosprim.adb \
 -   s-traceb.adb<5htraceb.adb \
     s-taprop.adb<7staprop.adb \
     s-taspri.ads<7staspri.ads \
     s-tpopsp.adb<5atpopsp.adb \
     g-soccon.ads<3hsoccon.ads \
     system.ads<5hsystem.ads
   
     TGT_LIB = /usr/lib/libcl.a -lpthread
     THREADSLIB = -lpthread -lc_r
     SYMLIB = -laddr2line -lbfd $(INTLLIBS)
 --- 759,779 ----
     s-osinte.ads<53osinte.ads \
     s-parame.ads<5hparame.ads \
     s-osprim.adb<7sosprim.adb \
     s-taprop.adb<7staprop.adb \
     s-taspri.ads<7staspri.ads \
     s-tpopsp.adb<5atpopsp.adb \
     g-soccon.ads<3hsoccon.ads \
     system.ads<5hsystem.ads
   
 +   # An HPUX specific s-traceb.adb shall be used for traceback support.
 +   # It resorts to functions provided by the system unwinding library,
 +   # some of which are not available in HPUX 10, so fallback to the default
 +   # implementation in this case. The block below expresses this as "if not
 +   # hpux10, use the dedicated s-traceb.adb".
 +   ifneq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
 +   LIBGNAT_TARGET_PAIRS += s-traceb.adb<5htraceb.adb
 +   endif
 + 
     TGT_LIB = /usr/lib/libcl.a -lpthread
     THREADSLIB = -lpthread -lc_r
     SYMLIB = -laddr2line -lbfd $(INTLLIBS)
 
  
  

Comment 2 dave 2003-03-13 22:07:10 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org, hainque@ACT-Europe.FR,
   bosch@gnat.com
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Thu, 13 Mar 2003 22:07:10 -0500 (EST)

 > dave.anglin@nrc-cnrc.gc.ca wrote:
 > > cd ada/doctools && gnatmake -q xgnatug
 > > /usr/ccs/bin/ld: Unsatisfied symbols:
 > >    U_prep_frame_rec_for_unwind (code)
 > 
 >  As indicated on other channels, this is because the GNAT run-time library
 >  references functions from the system unwinding library (for call-chain
 >  computation purposes), and this specific one is not provided on HPUX 10.
 > 
 >  The patch below should fix this.
 
 It doesn't fix the problem when starting from gcc-3.2.3.  We appear
 to need a similar patch for the 3.2 branch.  I am trying the obvious
 to rebuild 3.2.3 but note that in the 3.2 branch 5htraceb.adb is also
 included in the DCE case.  I'm also wondering about libcl.
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Comment 3 Olivier Hainque 2003-03-14 10:11:44 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: gcc-gnats@gcc.gnu.org, bosch@gnat.com, hainque@ACT-Europe.FR,
	charlet@ACT-Europe.FR, comar@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Fri, 14 Mar 2003 10:11:44 +0100

 John David Anglin wrote:
 > It doesn't fix the problem when starting from gcc-3.2.3.
 
  Indeed. The Makefile context has changed since then. The approach may
  be identical. 
 
 > We appear to need a similar patch for the 3.2 branch. 
 
  OK.
 
 > I am trying the obvious to rebuild 3.2.3 but note that in the 3.2 branch
 > 5htraceb.adb is also included in the DCE case.
 
  I think you just need to remove the specific line from the DCE section
  and move the new block until after the DCE one.
 
 > I'm also wondering about libcl.
 
  Could you please elaborate ?
 
  I don't see mention of this in the 3_2-branch version of Makefile.in.
 
 

Comment 4 dave 2003-03-14 13:28:45 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: gcc-gnats@gcc.gnu.org, bosch@gnat.com, hainque@ACT-Europe.FR,
   charlet@ACT-Europe.FR, comar@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Fri, 14 Mar 2003 13:28:45 -0500 (EST)

 > > I am trying the obvious to rebuild 3.2.3 but note that in the 3.2 branch
 > > 5htraceb.adb is also included in the DCE case.
 > 
 >  I think you just need to remove the specific line from the DCE section
 >  and move the new block until after the DCE one.
 
 The build was successful and libgnat doesn't contain any references
 from the unwind library.  However, I just deleted the 5htraceb.adb
 from the DCE section.  Is it possible that the new block should follow
 the DCE block in 3.3 and the trunk?
 
 > > I'm also wondering about libcl.
 > 
 >  Could you please elaborate ?
 
 No, it isn't necessary.
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Comment 5 dave 2003-03-17 11:15:12 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org, hainque@ACT-Europe.FR,
   bosch@gnat.com
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Mon, 17 Mar 2003 11:15:12 -0500 (EST)

 > dave.anglin@nrc-cnrc.gc.ca wrote:
 > > cd ada/doctools && gnatmake -q xgnatug
 > > /usr/ccs/bin/ld: Unsatisfied symbols:
 > >    U_prep_frame_rec_for_unwind (code)
 > 
 >  As indicated on other channels, this is because the GNAT run-time library
 >  references functions from the system unwinding library (for call-chain
 >  computation purposes), and this specific one is not provided on HPUX 10.
 > 
 >  The patch below should fix this.
 
 [...]
 
 > + 
 >     TGT_LIB = /usr/lib/libcl.a -lpthread
 >     THREADSLIB = -lpthread -lc_r
 >     SYMLIB = -laddr2line -lbfd $(INTLLIBS)
 
 We still have a problem.  The first problem is fixed but libpthread
 (posix threads) isn't available under 10.20:
 
 ../../xgcc -B../../ -DIN_GCC   `echo -g -W -Wall -Wwrite-strings -Wstrict-protot
 ypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  |sed -e 's/-pe
 dantic//g' -e 's/-Wtraditional//g'`   -o ../../gnatmake b_gnatm.o ali.o ali-util
 .o alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o einfo.o elists.o e
 rrout.o fmap.o fname.o fname-uf.o fname-sf.o gnatmake.o gnatvsn.o hostparm.o kru
 nch.o lib.o make.o makeusg.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o
 namet.o nlists.o opt.o osint.o osint-m.o output.o prj.o prj-attr.o prj-com.o prj
 -dect.o prj-env.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt
 .o prj-tree.o prj-util.o rident.o scans.o scn.o sdefault.o sfn_scan.o sinfo.o si
 nfo-cn.o sinput.o sinput-l.o sinput-p.o snames.o stand.o stringt.o style.o style
 sw.o validsw.o switch.o switch-m.o switch-c.o table.o targparm.o tree_io.o types
 .o uintp.o uname.o urealp.o usage.o widechar.o \
       ../../prefix.o ../../version.o ../rts/libgnat.a  ../../../libiberty/libiberty.a  /usr/lib/libcl.a -lpthread
 /usr/ccs/bin/ld: Can't find library for -lpthread
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Comment 6 dave 2003-03-17 12:46:37 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org, bosch@gnat.com,
   hainque@ACT-Europe.FR, charlet@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Mon, 17 Mar 2003 12:46:37 -0500 (EST)

 > > We still have a problem.  The first problem is fixed but libpthread
 > > (posix threads) isn't available under 10.20:
 > 
 >  Oh, strange. We did have it under 10.20, which is why the Makefile includes
 >  a setup for a dual build.
 > 
 > > ../../xgcc [...] -o ../../gnatmake /usr/lib/libcl.a -lpthread [...]
 > 
 >  The problem you see may be solvable independently, though, as I believe
 >  "-lthreadlib" is not supposed to be there for the "gnatmake" target anyway.
 
 There is the GNU pth implementation and possibly HP provided it as an
 option.  However, the standard thread implementation was DCE threads.
 
 I haven't really had a chance to work on the thread implementation
 under hpux 11.  However, I have decided that probably we should use
 a multilib implementation as HP's "weak" support doesn't conform to
 the SYSV ABI with respect to undefined weak symbols.
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Comment 7 Olivier Hainque 2003-03-17 18:20:13 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org,
	bosch@gnat.com, hainque@ACT-Europe.FR, charlet@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Mon, 17 Mar 2003 18:20:13 +0100

 Hi John,
 
 Sorry for the delay in getting back to you after your previous message:
 
 John David Anglin wrote:
 > >  I think you just need to remove the specific line from the DCE section
 > >  and move the new block until after the DCE one.
 
 > The build was successful and libgnat doesn't contain any references
 > from the unwind library.  However, I just deleted the 5htraceb.adb
 > from the DCE section.  Is it possible that the new block should follow
 > the DCE block in 3.3 and the trunk?
 
  I think it's OK as you did it. Additionally moving the block after the DCE
  section would have been useful if this was to work for DCE/HPUX11, but there
  is no point.
 
 > We still have a problem.  The first problem is fixed but libpthread
 > (posix threads) isn't available under 10.20:
 
  Oh, strange. We did have it under 10.20, which is why the Makefile includes
  a setup for a dual build.
 
 > ../../xgcc [...] -o ../../gnatmake /usr/lib/libcl.a -lpthread [...]
 
  The problem you see may be solvable independently, though, as I believe
  "-lthreadlib" is not supposed to be there for the "gnatmake" target anyway.
 
  I'll dig a bit and suggest an approach shortly. 
 
 > >     TGT_LIB = /usr/lib/libcl.a -lpthread
 
  seems suspicious to me.
 
 
  
     

Comment 8 charlet 2003-03-17 21:10:46 UTC
From: Arnaud Charlet <charlet@ACT-Europe.FR>
To: Olivier Hainque <hainque@ACT-Europe.FR>
Cc: John David Anglin <dave@hiauly1.hia.nrc.ca>,
	dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org, bosch@gnat.com,
	charlet@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Mon, 17 Mar 2003 21:10:46 +0100

 >  Oh, strange. We did have it under 10.20, which is why the Makefile includes
 >  a setup for a dual build.
 > 
 > > ../../xgcc [...] -o ../../gnatmake /usr/lib/libcl.a -lpthread [...]
 
 Actually no, HP-UX 10.20 only has DCE threads.
 
 What we did was to build two GNAT run time (one for DCE, one for pthread),
 with the idea that: under 10.20, only the DCE run time can be used;
 under 11.00, both could be used.
 
 We now no longer build dce under 11.00, as this library caused too many
 problems (both in terms of posix compliance and reliability).
 
 Arno

Comment 9 dave 2003-03-18 11:06:09 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org,
   bosch@gnat.com, hainque@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Tue, 18 Mar 2003 11:06:09 -0500 (EST)

 > Arnaud Charlet wrote:
 > > >  How does it look to you ?
 > > 
 > > Agreed. I guess -lpthread was added to make --enable-threads happy.
 
 At the moment, --enable-threads is supported under hpux 11.
 
 >  OK, thanks. 
 > 
 >  John, could you please give it a try on HPUX 10 (removing -lpthread from
 >  TGT_LIB) ?
 > 
 >  This will hopefully let you complete the build, and it appears wrong
 > anyway.
 > 
 >  If it leads to antoher problem, I'll see to get one of our HP machines
 >  rebooted under 10.20 temporarily.
 
 I'm also going to remove it from THREADSLIB as I don't believe it should be
 there either.
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Comment 10 dave 2003-03-18 11:10:42 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: dave@hiauly1.hia.nrc.ca (John David Anglin)
Cc: hainque@ACT-Europe.FR, charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca,
   gcc-gnats@gcc.gnu.org, bosch@gnat.com
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Tue, 18 Mar 2003 11:10:42 -0500 (EST)

 > > > Agreed. I guess -lpthread was added to make --enable-threads happy.
 > 
 > At the moment, --enable-threads is supported under hpux 11.
 
 Sorry, the above should say "is not supported."
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Comment 11 Olivier Hainque 2003-03-18 14:32:32 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: Arnaud Charlet <charlet@ACT-Europe.FR>
Cc: dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org,
	bosch@gnat.com, hainque@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Tue, 18 Mar 2003 14:32:32 +0100

 Arnaud Charlet wrote:
 > What we did was to build two GNAT run time (one for DCE, one for pthread),
 > with the idea that: under 10.20, only the DCE run time can be used;
 > under 11.00, both could be used.
 > 
 > We now no longer build dce under 11.00, as this library caused too many
 > problems (both in terms of posix compliance and reliability).
 
  Thanks for the clarification, Arno.
 
  For the remaining issue at hand:
 
    >   TGT_LIB = /usr/lib/libcl.a -lpthread
 
    >  ../../xgcc [...] -o ../../gnatmake [...]  /usr/lib/libcl.a -lpthread
    >  /usr/ccs/bin/ld: Can't find library for -lpthread
 
  it seems to me that -lpthread should not be part of TGT_LIB, which is
  only used for the tools. AFAICS, removing it would fix the problem on HPUX
  10.20, and I checked that builds are still OK on HPUX 11.00.
 
  How does it look to you ?
 
 
  
 
  
  

Comment 12 charlet 2003-03-18 15:39:17 UTC
From: Arnaud Charlet <charlet@ACT-Europe.FR>
To: Olivier Hainque <hainque@ACT-Europe.FR>
Cc: Arnaud Charlet <charlet@ACT-Europe.FR>,
	dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org, bosch@gnat.com
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Tue, 18 Mar 2003 15:39:17 +0100

 >  How does it look to you ?
 
 Agreed. I guess -lpthread was added to make --enable-threads happy.
 
 Arno

Comment 13 Olivier Hainque 2003-03-18 16:45:14 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: Arnaud Charlet <charlet@ACT-Europe.FR>
Cc: dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org,
	bosch@gnat.com, hainque@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Tue, 18 Mar 2003 16:45:14 +0100

 Arnaud Charlet wrote:
 > >  How does it look to you ?
 > 
 > Agreed. I guess -lpthread was added to make --enable-threads happy.
 
  OK, thanks. 
 
  John, could you please give it a try on HPUX 10 (removing -lpthread from
  TGT_LIB) ?
 
  This will hopefully let you complete the build, and it appears wrong anyway.
 
  If it leads to antoher problem, I'll see to get one of our HP machines
  rebooted under 10.20 temporarily.
 
 
 

Comment 14 dave 2003-03-19 20:56:18 UTC
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org,
   bosch@gnat.com, hainque@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Wed, 19 Mar 2003 20:56:18 -0500 (EST)

 Olivier,
 
 >  John, could you please give it a try on HPUX 10 (removing -lpthread from
 >  TGT_LIB) ?
 
 The hpux 10.20 build was successful with the enclosed patch.  Possibly,
 the hpux test that you added should be after the DCE block but that
 doesn't matter for hpux 10.  I may try hpux 11 after I return from vacation.
 
 Thanks for your help,
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
 
 Index: Makefile.in
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
 retrieving revision 1.36.4.3
 diff -u -3 -p -r1.36.4.3 Makefile.in
 --- Makefile.in	29 Jan 2003 22:37:55 -0000	1.36.4.3
 +++ Makefile.in	20 Mar 2003 00:52:17 -0000
 @@ -759,15 +759,23 @@ ifeq ($(strip $(filter-out hppa% hp hpux
    s-osinte.ads<53osinte.ads \
    s-parame.ads<5hparame.ads \
    s-osprim.adb<7sosprim.adb \
 -  s-traceb.adb<5htraceb.adb \
    s-taprop.adb<7staprop.adb \
    s-taspri.ads<7staspri.ads \
    s-tpopsp.adb<5atpopsp.adb \
    g-soccon.ads<3hsoccon.ads \
    system.ads<5hsystem.ads
  
 -  TGT_LIB = /usr/lib/libcl.a -lpthread
 -  THREADSLIB = -lpthread -lc_r
 +  # An HPUX specific s-traceb.adb shall be used for traceback support.
 +  # It resorts to functions provided by the system unwinding library,
 +  # some of which are not available in HPUX 10, so fallback to the default
 +  # implementation in this case. The block below expresses this as "if not
 +  # hpux10, use the dedicated s-traceb.adb".
 +  ifneq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
 +  LIBGNAT_TARGET_PAIRS += s-traceb.adb<5htraceb.adb
 +  endif
 +
 +  TGT_LIB = /usr/lib/libcl.a
 +  THREADSLIB = -lc_r
    SYMLIB = -laddr2line -lbfd $(INTLLIBS)
    soext = .sl
    SO_OPTS = -Wl,+h,

Comment 15 Olivier Hainque 2003-03-20 09:26:02 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca,
	gcc-gnats@gcc.gnu.org, bosch@gnat.com, hainque@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Thu, 20 Mar 2003 09:26:02 +0100

 Hi John,
 
 John David Anglin wrote:
 > The hpux 10.20 build was successful with the enclosed patch.  Possibly,
 > the hpux test that you added should be after the DCE block but that
 > doesn't matter for hpux 10.
 
  Thanks for your feedback.
 
  We'll see how to integrate this in a way that will fit both the FSF and
  our internal trees.
 
 > I may try hpux 11 after I return from vacation.
 
  OK. I will check and report back, but it will in any case be interesting to
  get confirmation that it doesn't break on your side.
  
 > Thanks for your help,
 
  You are most welcome. Thanks for your help too.
 
  And, ... enjoy your vacation :)
 
  Olivier
 

Comment 16 Olivier Hainque 2003-03-25 09:48:31 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca,
	gcc-gnats@gcc.gnu.org, bosch@gnat.com, hainque@ACT-Europe.FR
Subject: Re: ada/9953: Unsatisfied symbols: U_prep_frame_rec_for_unwind (c
Date: Tue, 25 Mar 2003 09:48:31 +0100

 Olivier Hainque wrote:
 >  OK. I will check and report back, but it will in any case be interesting to
 >  get confirmation that it doesn't break on your side.
 
  FYI, I'll probably commit somthing today.

Comment 17 Olivier Hainque 2003-03-27 09:58:28 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: gcc-patches@gcc.gnu.org
Cc: charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca,
	gcc-gnats@gcc.gnu.org, bosch@gnat.com, hainque@ACT-Europe.FR
Subject: ada/9953: Build failures with Ada on HPUX 10
Date: Thu, 27 Mar 2003 09:58:28 +0100

 This patch is what we eventually came up with to fix ada/9953, which is
 about build failures with Ada on HPUX 10.
 
 Two problems have been identified: 1/ A system specific s-traceb.adb was used
 but only suited HPUX 11 because of references to system library functions only
 available there, and 2/ -lpthread ended up in the arguments of a number of
 commands issued during the build, causing failure because there is no pthread
 library on HPUX 10.
 
 The first attempts to fix this were making conditional parts in the existing
 general gnatlib configuration section for HPUX in Makefile.in. The last one
 was working but introduced some complexity which we'd prefer to avoid.
 
 We eventually decided to go for a simpler approach which consists in making
 independent sections for HPUX 10 and HPUX 11.
 
 Complete build for c,ada (bootstrap+gnatlib and tools), as well as a couple of
 simple tests were successful against 3.3 on hppa1.1-hp-hpux10.20 and 11.00.
 
 Ok to commmit ?
 
 ----------------------------------
 
 2003-03-27  Olivier Hainque  <hainque@act-europe.fr>
 
 	ada/9953
 	* ada/Makefile.in (gnatlib configuration for HPUX): Split
 	the general section for HPUX into specific sections for
 	HPUX 10 and HPUX 11. Fix the setting of TGT_LIB in the HPUX
 	11 case.
 
 Index: Makefile.in
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
 retrieving revision 1.36.4.3
 diff -c -3 -p -r1.36.4.3 Makefile.in
 *** Makefile.in	29 Jan 2003 22:37:55 -0000	1.36.4.3
 --- Makefile.in	27 Mar 2003 08:50:19 -0000
 *************** ifeq ($(strip $(filter-out mips sgi irix
 *** 750,756 ****
     LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
   endif
   
 ! ifeq ($(strip $(filter-out hppa% hp hpux%,$(targ))),)
     LIBGNAT_TARGET_PAIRS = \
     a-intnam.ads<4hintnam.ads \
     s-inmaop.adb<7sinmaop.adb \
 --- 750,774 ----
     LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
   endif
   
 ! ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
 !   LIBGNAT_TARGET_PAIRS = \
 !   a-excpol.adb<4wexcpol.adb \
 !   a-intnam.ads<4hintnam.ads \
 !   s-inmaop.adb<7sinmaop.adb \
 !   s-interr.adb<5ginterr.adb \
 !   s-intman.adb<7sintman.adb \
 !   s-osinte.adb<5hosinte.adb \
 !   s-osinte.ads<5hosinte.ads \
 !   s-parame.ads<5hparame.ads \
 !   s-osprim.adb<7sosprim.adb \
 !   s-taprop.adb<5htaprop.adb \
 !   s-taspri.ads<5htaspri.ads \
 !   s-tpopsp.adb<7stpopsp.adb \
 !   g-soccon.ads<3hsoccon.ads \
 !   system.ads<5hsystem.ads
 ! endif
 ! 
 ! ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
     LIBGNAT_TARGET_PAIRS = \
     a-intnam.ads<4hintnam.ads \
     s-inmaop.adb<7sinmaop.adb \
 *************** ifeq ($(strip $(filter-out hppa% hp hpux
 *** 766,772 ****
     g-soccon.ads<3hsoccon.ads \
     system.ads<5hsystem.ads
   
 !   TGT_LIB = /usr/lib/libcl.a -lpthread
     THREADSLIB = -lpthread -lc_r
     SYMLIB = -laddr2line -lbfd $(INTLLIBS)
     soext = .sl
 --- 784,790 ----
     g-soccon.ads<3hsoccon.ads \
     system.ads<5hsystem.ads
   
 !   TGT_LIB = /usr/lib/libcl.a
     THREADSLIB = -lpthread -lc_r
     SYMLIB = -laddr2line -lbfd $(INTLLIBS)
     soext = .sl
 *************** ifeq ($(strip $(filter-out hppa% hp hpux
 *** 789,794 ****
 --- 807,813 ----
       g-soccon.ads<3hsoccon.ads \
       system.ads<5hsystem.ads
   
 +     TGT_LIB =
       THREADSLIB = -lcma
     endif
   endif
 
 
 
 

Comment 18 Geert Bosch 2003-03-27 12:14:14 UTC
From: Geert Bosch <bosch@gnat.com>
To: Olivier Hainque <hainque@ACT-Europe.FR>
Cc: gcc-patches@gcc.gnu.org, charlet@ACT-Europe.FR,
	dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org
Subject: Re: ada/9953: Build failures with Ada on HPUX 10
Date: Thu, 27 Mar 2003 12:14:14 -0500

 On Thursday, Mar 27, 2003, at 03:58 America/New_York, Olivier Hainque 
 wrote:
 > Ok to commmit ?
 
 Yes. Thanks for fixing this!
 
    -Geert
 

Comment 19 Olivier Hainque 2003-03-27 21:48:12 UTC
From: hainque@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: ada/9953
Date: 27 Mar 2003 21:48:12 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	hainque@gcc.gnu.org	2003-03-27 21:48:12
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/ada        : Makefile.in 
 
 Log message:
 	PR ada/9953
 	* ada/Makefile.in (gnatlib configuration for HPUX): Split
 	the general section for HPUX into specific sections for
 	HPUX 10 and HPUX 11. Fix the setting of TGT_LIB in the HPUX
 	11 case.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.369&r2=1.16114.2.370
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.36.4.3&r2=1.36.4.4
 

Comment 20 Olivier Hainque 2003-03-27 21:51:24 UTC
From: hainque@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: ada/9953
Date: 27 Mar 2003 21:51:24 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	hainque@gcc.gnu.org	2003-03-27 21:51:24
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/ada        : Makefile.in 
 
 Log message:
 	PR ada/9953
 	* ada/Makefile.in (gnatlib configuration for HPUX): Split
 	the general section for HPUX into specific sections for
 	HPUX 10 and HPUX 11. Fix the setting of TGT_LIB in the HPUX
 	11 case.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.17228&r2=1.17229
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/Makefile.in.diff?cvsroot=gcc&r1=1.41&r2=1.42
 

Comment 21 Jeffrey A. Law 2003-03-28 09:54:46 UTC
From: law@redhat.com
To: Olivier Hainque <hainque@ACT-Europe.FR>
Cc: gcc-patches@gcc.gnu.org, charlet@ACT-Europe.FR, dave.anglin@nrc-cnrc.gc.ca,
   gcc-gnats@gcc.gnu.org, bosch@gnat.com
Subject: Re: ada/9953: Build failures with Ada on HPUX 10 
Date: Fri, 28 Mar 2003 09:54:46 -0700

 In message <20030327095828.A27519@rome.int.act-europe.fr>, Olivier Hainque writ
 es:
  >available there, and 2/ -lpthread ended up in the arguments of a number of
  >commands issued during the build, causing failure because there is no pthread
  >library on HPUX 10.
 Actually, there are two thread libraries on hpux10 (pthreads and dce), both
 are optional packages and only installed if you explicitly ask for them
 when installing hpux.
 
 
 jeff
 

Comment 22 Olivier Hainque 2003-03-28 10:38:20 UTC
From: hainque@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: ada/9953
Date: 28 Mar 2003 10:38:20 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	hainque@gcc.gnu.org	2003-03-28 10:38:20
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/ada        : Makefile.in 
 
 Log message:
 	PR ada/9953
 	* ada/Makefile.in (gnatlib configuration for HPUX): Split
 	the general section for HPUX into specific sections for
 	HPUX 10 and HPUX 11.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.13152.2.657.2.287&r2=1.13152.2.657.2.288
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.21.10.4.4.4&r2=1.21.10.4.4.5
 

Comment 23 Olivier Hainque 2003-03-28 18:08:30 UTC
From: Olivier Hainque <hainque@ACT-Europe.FR>
To: law@redhat.com
Cc: gcc-patches@gcc.gnu.org, charlet@ACT-Europe.FR,
	dave.anglin@nrc-cnrc.gc.ca, gcc-gnats@gcc.gnu.org, bosch@gnat.com,
	hainque@ACT-Europe.FR
Subject: Re: ada/9953: Build failures with Ada on HPUX 10
Date: Fri, 28 Mar 2003 18:08:30 +0100

 law@redhat.com wrote:
 > Actually, there are two thread libraries on hpux10 (pthreads and dce), both
 > are optional packages and only installed if you explicitly ask for them
 > when installing hpux.
 
  OK. Thanks for the clarification.
 
  Only dce has ever been supported in GNAT for this target.
Comment 24 Andrew Pinski 2003-05-25 21:04:34 UTC
according to trail this has been fixed in 3.2.3, 3.3, and 3.4, closing then as fixed.
Comment 25 dave 2003-05-26 01:44:30 UTC
Subject: Re: [Bug ada/9953] Unsatisfied symbols: U_prep_frame_rec_for_unwind (code)

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9953
> 
> 
> pinskia@physics.uc.edu changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |RESOLVED
>          Resolution|                            |FIXED
> 
> 
> ------- Additional Comments From pinskia@physics.uc.edu  2003-05-25 21:04 -------
> according to trail this has been fixed in 3.2.3, 3.3, and 3.4, closing then as fixed.

Actually, while this is fixed on 3.2.3 and 3.3, I hit the same problem
again building 3.4:

GNATLINK 3.4 20030521 (experimental) Copyright 1996-2002 Free Software Foundatio
n, Inc.
xgcc -c -gnatA -gnatWb -gnatiw -B../../ -I../rts -I. -I/xxx/gnu/gcc-3.3/gcc/gcc/
ada -gnatws b~gnatchop.adb
../../xgcc b~gnatchop.o ../../prefix.o ../../version.o ../rts/ada.o ../rts/a-cha
rac.o ../rts/a-chlat1.o ../rts/gnat.o ../rts/g-casuti.o ../rts/g-except.o ../rts
/g-hesora.o ../rts/g-htable.o ../rts/interfac.o ../rts/system.o ../rts/s-parame.
o ../rts/i-cstrea.o ../rts/s-exctab.o ../rts/a-ioexce.o ../rts/a-string.o ../rts
/s-assert.o ../rts/s-except.o ../rts/s-stoele.o ../rts/s-mastop.o ../rts/s-imgin
t.o ../rts/a-comlin.o ../rts/a-tags.o ../rts/a-stream.o ../rts/s-soflin.o ../rts
/s-stache.o ../rts/s-secsta.o ../rts/g-os_lib.o ../rts/s-finroo.o ../rts/s-memor
y.o ../rts/s-stalib.o ../rts/s-strops.o ../rts/s-sopco3.o ../rts/s-sopco4.o ../r
ts/s-sopco5.o ../rts/s-traceb.o ../rts/a-except.o ../rts/s-unstyp.o ../rts/s-bit
ops.o ../rts/a-strmap.o ../rts/a-stmaco.o ../rts/a-chahan.o ../rts/a-strsea.o ..
/rts/a-strfix.o ../rts/s-stratt.o ../rts/s-finimp.o ../rts/a-finali.o ../rts/a-f
ilico.o ../rts/g-dirope.o ../rts/g-regexp.o ../rts/g-comlin.o ../rts/s-ficobl.o
../rts/s-fileio.o ../rts/a-textio.o ../rts/s-valuti.o ../rts/s-valuns.o ../rts/s
-valint.o ./gnatvsn.o ./hostparm.o ./gnatchop.o -o ../../gnatchop ../rts/libgnat
.a ../../../libiberty/libiberty.a -L./ -L../rts/ -L/xxx/gnu/gcc-3.3/gcc/gcc/ada/
 -L/opt/gnu/gcc/gcc-3.4/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.4/adalib/ ../rts/libg
 nat.a -lpthread -B../../ -I../rts -I. -I/xxx/gnu/gcc-3.3/gcc/gcc/ada
 /usr/ccs/bin/ld: Can't find library for -lpthread

I looked briefly at the Makefile and it wasn't obvious how "-lpthread"
was getting added under hpux 10.20.

Dave
Comment 26 Andrew Pinski 2003-05-26 01:47:22 UTC
According to the submitter it is broken for 3.4, but was fixed for 3.2.3 and 3.4.
Comment 27 Olivier Hainque 2003-05-31 09:17:58 UTC
Subject: Re:  Unsatisfied symbols: U_prep_frame_rec_for_unwind (code)


Hello John,

(re-sending a comment sent yesterday, but rejected as spam).

dave@hiauly1.hia.nrc.ca wrote:
> Actually, while this is fixed on 3.2.3 and 3.3, I hit the same problem
> again building 3.4:

> I looked briefly at the Makefile and it wasn't obvious how "-lpthread"
> was getting added under hpux 10.20.

It is coming from a Linker_Option pragma in 5hsystem.ads. This should
not be there and can probably just be removed. Was added recently to 3.4
only, during some synchronization operation.

I'll experiment here and followup.
Comment 28 Olivier Hainque 2003-06-03 15:12:19 UTC
Subject: Re:  [3.4 regression] Unsatisfied symbols: U_prep_frame_rec_for_unwind (code)


This is about a build failure on HPUX10.20, complaining at some point that 
"-lpthread" cannot be honored.

It is coming from a Linker_Option pragma in 5hsystem.ads, which should not be
there. Was added recently to 3.4 only, during some synchronization operation.

The patch below allows the build to proceed by removing the culprit lines.
It also removes the  "ZCX_By_Default" bit, set during the same synchronization
option, and which needs other changes to be functional.

Full build successfull on HPUX11.00, ensuring that it does not break anything
there. I don't have a 10.20 machine handy at this point, but it should
definitely fix the problem at hand, and apart from a couple of simple changes,
it basically reverts the file to it's 3.3 state, where the builds have been
reported to succeed.

OK to commit ?

Olivier

Index: 5hsystem.ads
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/5hsystem.ads,v
retrieving revision 1.5
diff -c -3 -p -r1.5 5hsystem.ads
*** 5hsystem.ads	24 Apr 2003 17:53:51 -0000	1.5
--- 5hsystem.ads	3 Jun 2003 14:59:43 -0000
*************** pragma Pure (System);
*** 101,109 ****
  
  private
  
-    pragma Linker_Options ("-lpthread");
-    --  To ease supporting --enable-threads=posix at configure-time.
- 
     type Address is mod Memory_Size;
     Null_Address : constant Address := 0;
  
--- 101,106 ----
*************** private
*** 135,141 ****
     Stack_Check_Default       : constant Boolean := False;
     Stack_Check_Probes        : constant Boolean := False;
     Use_Ada_Main_Program_Name : constant Boolean := False;
!    ZCX_By_Default            : constant Boolean := True;
     GCC_ZCX_Support           : constant Boolean := True;
     Front_End_ZCX_Support     : constant Boolean := False;
  
--- 132,138 ----
     Stack_Check_Default       : constant Boolean := False;
     Stack_Check_Probes        : constant Boolean := False;
     Use_Ada_Main_Program_Name : constant Boolean := False;
!    ZCX_By_Default            : constant Boolean := False;
     GCC_ZCX_Support           : constant Boolean := True;
     Front_End_ZCX_Support     : constant Boolean := False;
  

Comment 29 John David Anglin 2003-06-05 15:17:58 UTC
The patch included in comment #28 is installed and it resolves the
problem reported in comment #25.