Bug 20270 - [4.1 Regression] Link error: unsatisfied symbols
Summary: [4.1 Regression] Link error: unsatisfied symbols
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Nathanael C. Nerode
URL:
Keywords: build
: 20271 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-01 23:52 UTC by John David Anglin
Modified: 2005-05-16 11:59 UTC (History)
3 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed: 2005-05-04 01:05:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-03-01 23:52:03 UTC
../../xgcc -B../../ -DIN_GCC   `echo -g -O2 -W -Wall -Wwrite-strings -Wstrict-pr
ototypes -Wmissing-prototypes -fno-common |sed -e 's/-pedantic//g' -e 's/-Wtradi
tional//g'`   -o ../../gnatmake b_gnatm.o a-except.o ctrl_c.o ali.o ali-util.o s
-casuti.o alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o ei
nfo.o erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o gnatma
ke.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o make.o make
usg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o namet.o nlist
s.o opt.o osint.o osint-m.o output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o pr
j-dect.o prj-env.o prj-err.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 s-exctab.o s-secsta.o s-stalib.o s-
stoele.o scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o sinfo.o sinp
ut.o sinput-c.o sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.
o validsw.o switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o u
intp.o  uname.o urealp.o usage.o widechar.o  \
      ../rts/libgnat.a  ../../prefix.o ../../version.o link.o ../../../libiberty
/libiberty.a
/usr/ccs/bin/ld: Unsatisfied symbols:
   U_get_unwind_entry (first referenced in ../rts/libgnat.a(s-traceb.o)) (code)
   U_IS_STUB_OR_CALLX (first referenced in ../rts/libgnat.a(s-traceb.o)) (code)
   U_get_shLib_text_addr (first referenced in ../rts/libgnat.a(s-traceb.o)) (cod
e)
   U_is_shared_pc (first referenced in ../rts/libgnat.a(s-traceb.o)) (code)
   U_init_frame_record (first referenced in ../rts/libgnat.a(s-traceb.o)) (code)
   U_prep_frame_rec_for_unwind (first referenced in ../rts/libgnat.a(s-traceb.o)
) (code)
   U_get_shLib_unw_tbl (first referenced in ../rts/libgnat.a(s-traceb.o)) (code)
   U_get_previous_frame_x (first referenced in ../rts/libgnat.a(s-traceb.o)) (co
de)
   U_get_unwind_table (first referenced in ../rts/libgnat.a(s-traceb.o)) (code)
collect2: ld returned 1 exit status

These symbols are in libcl.
Comment 1 Andrew Pinski 2005-03-02 00:44:54 UTC
*** Bug 20271 has been marked as a duplicate of this bug. ***
Comment 2 John David Anglin 2005-03-02 00:50:52 UTC
I believe that this was introduced bt the following:

-TOOLS_FLAGS_TO_PASS=           \
-        "CC=$(CC)"             \
-        "CFLAGS=$(CFLAGS)"     \
-       "LDFLAGS=$(LDFLAGS)"    \
-        "ADAFLAGS=$(ADAFLAGS)" \
-        "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
-       "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
-       "libsubdir=$(libsubdir)"        \
-       "exeext=$(exeext)"      \
-       "fsrcdir=$(fsrcdir)"    \
-       "srcdir=$(fsrcdir)"     \
-        "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)"  \
-       "GNATMAKE=$(GNATMAKE)"  \
-       "GNATLINK=$(GNATLINK)"  \
-       "GNATBIND=$(GNATBIND)"

The define for TGT_LIB contains libcl.a on this target.  This change
was part of

2005-02-26  Nathanael Nerode  <neroden@gcc.gnu.org>
        Partial merge from libada-gnattools-branch:

        2004-12-02  Nathanael Nerode  <neroden@gcc.gnu.org>
        * Makefile.in: Move gnattools{1,1re,2,3,4} and corresponding flags
        into code in gnattools/Makefile.in.  Remove direct dependencies on
        stamp-tools by tools clauses.
        2004-12-02  Nathanael Nerode  <neroden@gcc.gnu.org>
        * config-lang.in: Add gnattools to $lang_dirs.

  
Comment 3 Arnaud Charlet 2005-03-30 10:00:16 UTC
I confirm the analysis in comment #2
Nathanael, could you please have a look and fix this regression ?

Also, having the TOOLS_TARGET_PAIRS being now set in configure.ac is
more painful to maintain than having the list in Makefile.in, what about
reverting this change ? It would make life simpler when adding support
for a new target (no need to worry about rerunning configure, configure
version, configure syntax errors, etc...)

Thanks in advance,

Arno
Comment 4 Nathanael C. Nerode 2005-04-26 03:59:14 UTC
Try this patch for ada/Makefile.in: it's the "dumb solution" which might work. 
 
--- Makefile.in 7 Apr 2005 19:07:41 -0000       1.116 
+++ Makefile.in 26 Apr 2005 03:58:11 -0000 
@@ -245,7 +245,9 @@ 
 # and the system's installed libraries. 
 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS) 
 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY) 
-TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) 
link.o ../../../libiberty/libiberty.a $(SYSLIBS) 
+# Default is no TGT_LIB; one might be passed down or something 
+TGT_LIB = 
+TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) 
link.o ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB) 
 
 # Specify the directories to be searched for header files. 
 # Both . and srcdir are used, in that order, 
 
Comment 5 Nathanael C. Nerode 2005-05-03 01:33:33 UTC
I'm waiting for feedback here; because this is a port-specific proble I can't
test fixes on my own.  Patch in bug trail.
Comment 6 dave 2005-05-03 02:11:17 UTC
Subject: Re:  [4.1 Regression] Link error: unsatisfied symbols

> I'm waiting for feedback here; because this is a port-specific proble I can't
> test fixes on my own.  Patch in bug trail.

Sorry for the delay.  I was away on vacation and I'm now having some
network problems.  Anyway, the change is now under test.

Dave
Comment 7 dave 2005-05-03 22:39:39 UTC
Subject: Re:  [4.1 Regression] Link error: unsatisfied symbols

> ------- Additional Comments From neroden at gcc dot gnu dot org  2005-05-03 01:33 -------
> I'm waiting for feedback here; because this is a port-specific proble I can't
> test fixes on my own.  Patch in bug trail.

The patch resolves the link error.

Thanks,
Dave
Comment 8 GCC Commits 2005-05-16 11:59:09 UTC
Subject: Bug 20270

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	neroden@gcc.gnu.org	2005-05-16 11:58:49

Modified files:
	gcc/ada        : Makefile.in ChangeLog 

Log message:
	PR ada/20270
	* Makefile.in: Make TGT_LIB behave correctly.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/Makefile.in.diff?cvsroot=gcc&r1=1.116&r2=1.117
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/ChangeLog.diff?cvsroot=gcc&r1=1.662&r2=1.663

Comment 9 Nathanael C. Nerode 2005-05-16 11:59:13 UTC
Committed fix to mainline.