comp.lang.ada
 help / color / mirror / Atom feed
From: Meskovic Zlatko <zlatko.meskovic@ubs.com>
Subject: gnat3.07 on AIX4.1.4: link problems
Date: 1996/12/12
Date: 1996-12-12T00:00:00+00:00	[thread overview]
Message-ID: <32B00C9A.41C6@ubs.com> (raw)


Hi all,

I have a little problem with linking ada on my PowerPC.

I ported (or should i say, i rewrote some packages) gnat3.07 to
PowerPC running AIX4.1.4 so that it uses pthreads for tasking.

Tasking is now running very well, i didn't discover any error until now.
But for building a program i have to run following script:

  gcc -c x.adb
  gnatbind x.ali
  gnatlink -gnatlink /bin/ld -o x x.ali \
    -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.1.4.0/2.7.2.1/ \
    -L/usr/lib/threads \
    -lgcc -lgnat /lib/crt0_r.o -lc_r -lc
                      ~~~~~~~~   ~~~

This i a little bit complicated and i would prefer to use gnatmake.

But when i use the normal 'gnatmake x.adb'
the program aborts with an exception
  raised STORAGE_ERROR
because gnatlink used only '/lib/crt0.o -lc' for linking.

When i run 'gnatmake x.adb -largs /lib/crt0_r.o -lc_r'
then i get the link warning
  ld: 0711-224 WARNING: Duplicate symbol: __start
  ld: 0711-224 WARNING: Duplicate symbol: .__start
  ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

the -bnoquiet option says:
        The following duplicates were found:
 Symbol                    Source-File(Object) OR Import-File{Shared-object}
 ------------------------- -------------------------------------------------
 __start                   crt0main.s(/lib/crt0.o)
    ** Duplicate **        crt0main.s(/lib/crt0_r.o)
ld: 0711-224 WARNING: Duplicate symbol: .__start
 .__start                  crt0main.s(/lib/crt0.o)
    ** Duplicate **        crt0main.s(/lib/crt0_r.o)

############

It looks like gnatlink allways takes /lib/crt0.o first.

Now to my question:

  How can i force gnatlink _not_ to use /lib/crt0.o but 
  to use /lib/crt0_r.o -lc_r instead ???


thanks i advance for any help

  zlatko


--
Zlatko B. Meskovic
Union Bank of Switzerland
Bahnhofstrasse 41
CH-8021 Zuerich

Email: zlatko.meskovic@ubs.com
Phone: +41 - 236 82 50
FAX:   +41 - 236 94 40




             reply	other threads:[~1996-12-12  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-12  0:00 Meskovic Zlatko [this message]
     [not found] ` <01bbe8ce$b6813a50$262a6282@cln49ae>
1996-12-16  0:00   ` gnat3.07 on AIX4.1.4: link problems Meskovic Zlatko
     [not found]     ` <01bbeb38$069d5210$262a6282@cln49ae>
1996-12-16  0:00       ` Stephen Leake
1996-12-19  0:00 ` Ken Thomas
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox