From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45d5a321269b1030,start X-Google-Attributes: gid103376,public From: Meskovic Zlatko Subject: gnat3.07 on AIX4.1.4: link problems Date: 1996/12/12 Message-ID: <32B00C9A.41C6@ubs.com>#1/1 X-Deja-AN: 203707791 content-type: text/plain; charset=us-ascii organization: Union Bank of Switzerland mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01 (X11; I; AIX 1) Date: 1996-12-12T00:00:00+00:00 List-Id: 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