From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id 03B813857C6B for ; Tue, 12 Jan 2021 17:46:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 03B813857C6B Received: by mail-pj1-x1035.google.com with SMTP id l23so2161285pjg.1 for ; Tue, 12 Jan 2021 09:46:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qV+fZN8QjB6/wivALUA94GcHvZiIpRvHyIXIFsLy0cU=; b=UnTvaV9/+bBZVo6ynl7/hgCmxKDnQQLeE84OkVYkq7BZE+OKNDXRKQmFx6QrlW2LIc Jzu7bLjd773TJ/FM4iIt/4AEeefc3KXQow+IloJTxogQtB+Q1uOq/G2MaD6n5egvHTCu 4wWWzLsQUwTdAXhdPrOI91ZMjcZnNWMOdXU3CG6xhkx7zQfHmyLH3GLdUeVgcGpROSGS z7+e9qOfZQ4IfcCxyqJ5IwPDMISu/TnqXSLcFapm2hCm9Shlid+pHq6G69fEkdECjTV1 QCSeMTIfyw2ZLqoJxtcxbQm4tJXJltbRtI23EsM4j8wq3NjB8bnMtoWpScEqIUDnAZ+y eoMA== X-Gm-Message-State: AOAM533t6OW1ZqGgaJtCnG1tPnYKBLoPOPCdH80USYGOwyAooaTYhX5m WfUuBpHzsLlTH0CT59eL37bC7XChuX7Rcb9EYwnEhfsHIp7+RcE+ X-Google-Smtp-Source: ABdhPJwKWuqnc1hqhrc4xVqV/Qbnkhne16pdWM1G/e14fKz3Ohs9N2K8XPDXlhbVf/Fj9E1v0CvuYvUD58Oba0E73wU= X-Received: by 2002:a17:902:e9c5:b029:db:d1ae:46ba with SMTP id 5-20020a170902e9c5b02900dbd1ae46bamr248321plk.38.1610473615066; Tue, 12 Jan 2021 09:46:55 -0800 (PST) MIME-Version: 1.0 References: <20201228194855.510315-1-maskray@google.com> <20201228194855.510315-4-maskray@google.com> <0be74da1-a490-be53-86e1-8469dc0b9428@linaro.org> <87im82jtav.fsf@oldenburg2.str.redhat.com> In-Reply-To: From: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Date: Tue, 12 Jan 2021 09:46:43 -0800 Message-ID: Subject: Re: [PATCH 3/3] install: Replace scripts/output-format.sed with objdump -f [BZ #26559] To: Florian Weimer Cc: Adhemerval Zanella via Libc-alpha , Adhemerval Zanella Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-19.4 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 17:46:57 -0000 On Tue, Jan 12, 2021 at 4:00 AM Adhemerval Zanella wrote: > > > > On 12/01/2021 08:20, Florian Weimer wrote: > > * Adhemerval Zanella via Libc-alpha: > > > >> On 28/12/2020 16:48, Fangrui Song via Libc-alpha wrote: > >>> GNU ld and gold have supported --print-output-format since 2011. glib= c > >>> requires binutils>=3D2.25 (2015), so if LD is GNU ld or gold, we can > >>> assume the option is supported. > >>> > >>> lld is by default a cross linker supporting multiple targets. It auto > >>> detects the file format and does not need OUTPUT_FORMAT. It does not > >>> support --print-output-format. > >>> > >>> By parsing objdump -f, we can support all the three linkers. > >> > >> LGTM and this change seems orthogonal to the other lld adjustments. > >> I have checked that at least with a build for a handful of supported > >> ABIs I see no difference with ld.bfd (with multiple versions). > > > > I see a cross-build failure during the initial static link bootstrap on > > aarch64-linux-gnu during =E2=80=9Cmake install=E2=80=9D: > > > > make[2]: Entering directory '/home/bmg/src/glibc' > > aarch64-glibc-linux-gnu-gcc -shared -Wl,-dynamic-linker=3D/lib/ld-li= nux-aarch64.so.1 \ > > -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=3Dboth \ > > -x c /dev/null -o /home/bmg/build/compilers/aarch64-linux-gnu= /glibc/aarch64-linux-gnu/format.lds.so > > /home/bmg/install/compilers/aarch64-linux-gnu/lib/gcc/aarch64-glibc-lin= ux-gnu/10.2.1/../../../../aarch64-glibc-linux-gnu/bin/ld: cannot find crti.= o: No such file or directory > > /home/bmg/install/compilers/aarch64-linux-gnu/lib/gcc/aarch64-glibc-lin= ux-gnu/10.2.1/../../../../aarch64-glibc-linux-gnu/bin/ld: cannot find crtn.= o: No such file or directory > > collect2: error: ld returned 1 exit status > > make[2]: *** [Makerules:1070: /home/bmg/build/compilers/aarch64-linux-g= nu/glibc/aarch64-linux-gnu/format.lds] Error 1 > > > > This affects other targets as well. > > > > I guess using > > > > $(CC) -nostdlib -nostartfiles -shared -x assembler /dev/null > > > > should work on most targets here. > > I haven't see it when a stage2 gcc, make install works as intended. Howe= ver I > did see it now with a stage1 gcc with build-many-glibcs.py. > > The -nostdlib -nostartfiles seems to fix it indeed, I am checking with a > bootstrap using build-many-glibcs.py. Thanks for the fix 0400f928335a5e04c788e1c831d8825d42612c49!