From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29689 invoked by alias); 20 Feb 2014 00:02:26 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 29680 invoked by uid 89); 20 Feb 2014 00:02:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f41.google.com Received: from mail-la0-f41.google.com (HELO mail-la0-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Feb 2014 00:02:24 +0000 Received: by mail-la0-f41.google.com with SMTP id mc6so843365lab.28 for ; Wed, 19 Feb 2014 16:02:21 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.144.35 with SMTP id sj3mr3224703lbb.44.1392854541174; Wed, 19 Feb 2014 16:02:21 -0800 (PST) Received: by 10.112.143.70 with HTTP; Wed, 19 Feb 2014 16:02:21 -0800 (PST) In-Reply-To: References: <530387FD.1040003@redhat.com> Date: Thu, 20 Feb 2014 00:02:00 -0000 Message-ID: Subject: Re: [gcc] Build fail for 2.95.3 version on a modern system From: Jonathan Wakely To: Marcello Stanisci Cc: Florian Weimer , gcc-help Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00118.txt.bz2 On 19 February 2014 22:28, Marcello Stanisci wrote: > Unfortunately, there is another issue. The fresh built compiler, when > invoked by `make', calls the linker > (that is the native linker of my system - gnu ld 2.22) and the linker > cannot find crt1.o and crti.o that exist > on my system. I also give the > ``-Wl,--library-path=/usr/lib/i386-linux-gnu/'' (that is the directory > where those > object file are) option to the fresh built compiler but it simply ignore it. I think you can use LD_LIBRARY_PATH to point the linker at that directory. > Furthermore, I just tried to compile an hello_world program to see if > my linker find crt1.o and crti.o and it goes fine. The linker gets told where to find those files by GCC. Your system GCC understands the modern layout used by Debian and Ubuntu, the ancient GCC 2.95 doesn't understand that layout, because it was released many years before Debian changed its filesystem layout. > So, why does the linker not find a file that I have in my system and > that it normally finds? Because GCC 2.95 doesn't know about the "multiach" filesystem layout of modern Debian systems. The env vars shown at http://gcc.gnu.org/ml/gcc-help/2012-05/msg00083.html solve the problem for more recent versions of GCC on Debian, they might work for GCC 2.95 too.