From owner-freebsd-arm@FreeBSD.ORG Sat Jul 12 20:28:50 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C283674 for ; Sat, 12 Jul 2014 20:28:50 +0000 (UTC) Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com [207.126.144.123]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DBC620E3 for ; Sat, 12 Jul 2014 20:28:48 +0000 (UTC) Received: from mail-wg0-f47.google.com ([74.125.82.47]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKU8GaePsseQecBKIizBJJFbbYV2Q+uNRb@postini.com; Sat, 12 Jul 2014 20:28:49 UTC Received: by mail-wg0-f47.google.com with SMTP id b13so402279wgh.18 for ; Sat, 12 Jul 2014 13:28:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:message-id:to:subject:reply-to :in-reply-to; bh=lBCGWaHTn5G9czUsidgSmX6HhvSfokkUiM8jY/MDtF4=; b=cEohet6S21YPR+vKt+H8Y7NAu3f9Iq1neAZU17noN3CRxrT7BGDAo4wugniugyfrwX OmkFDdtkOA4vzTYvD9JdCfa/0CHbGM0J1EFY0F5VLGApkFSkeiwF2/yHc5Fsrq8eua++ D5eWp4S8uWkbxFRIQlrGepHolkbBMWRPDwuxAG5qSoHG2+vfl5upLkSb2UB/nmyqfTPM iigwsEZ97QW+I8mO2lrPQrOzujn+I2YmDTbzm5luuuOkSKrKvLa/iEbHuYzyKtjilfiu A5fzaolAiXQyBcZ4Ylo095GdGREVXJ87Vy+bPnz5wB+Un5RDxkBHyM9qMathb1Eox1lP d+mw== X-Gm-Message-State: ALoCoQlnhUI+Mt6CF1qHBPbO63E66eydI5DkHmgo1EWxkNTLkCNc7l9gcqTGNFkU65X1xxdaxl3u8Nr/yTsuIecMnfvdToTWagfOuPQjJ5J48XKrr5SUHE3uo/4K/50IiWdJdsA00hf0 X-Received: by 10.194.84.101 with SMTP id x5mr8449793wjy.52.1405196920910; Sat, 12 Jul 2014 13:28:40 -0700 (PDT) X-Received: by 10.194.84.101 with SMTP id x5mr8449780wjy.52.1405196920819; Sat, 12 Jul 2014 13:28:40 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id x3sm10396460wia.11.2014.07.12.13.28.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jul 2014 13:28:40 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.8/8.14.8) with ESMTP id s6CKScDV098049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 12 Jul 2014 21:28:39 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.8/8.14.8/Submit) id s6CKSch3098048; Sat, 12 Jul 2014 21:28:38 +0100 (BST) (envelope-from mexas) Date: Sat, 12 Jul 2014 21:28:38 +0100 (BST) From: Anton Shterenlikht Message-Id: <201407122028.s6CKSch3098048@mech-cluster241.men.bris.ac.uk> To: andreast-list@fgznet.ch, freebsd-arm@freebsd.org, george+freebsd@m5p.com, mexas@bris.ac.uk Subject: Re: [Bug 175605] devel/binutils: please fix build binutils-2.23.1 in raspberry pi Reply-To: mexas@bris.ac.uk In-Reply-To: <53C19400.6050404@fgznet.ch> X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 20:28:50 -0000 >From andreast-list@fgznet.ch Sat Jul 12 21:07:05 2014 >On 12.07.14 21:43, Anton Shterenlikht wrote: >>>> --- Comment #6 from mexas@bris.ac.uk --- >>>> Forgot to say that this was with Andreas Tobler's patchset. >>>> Also, it segfaults with the OS default ld too: >>>> >>>> $ cat z.c >>>> #include >>>> int main(int argc, char **argv) >>>> { >>>> printf("mumu\n"); >>>> return 0; >>>> } >>>> $ cc -c z.c -Wall >>>> $ /usr/local/bin/ld -o z /usr/lib/crt1.o /usr/lib/crti.o z.o -lc >>>> $ ldd z >>>> z: >>>> libc.so.7 => /lib/libc.so.7 (0x2003c000) >>>> $ file z >>>> z: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses >>>> shared libs), for FreBSD 10.0 (1000710), not stripped >>>> $ ./z >>>> Segmentation fault (core dumped) >>>> $ /usr/bin/ld -o z /usr/lib/crt1.o /usr/lib/crti.o z.o -lc >>>> $ ldd z >>>> z: >>>> libc.so.7 => /lib/libc.so.7 (0x2003c000) >>>> $ file z >>>> z: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses >>>> shared libs), for FreBSD 10.0 (1000710), not stripped >>>> $ ./z >>>> Segmentation fault (core dumped) >>>> $ >>>> >>> Why are you using this strange invocation of the linker? If I run >>> "cc -v -o z z.c", here is how it invokes ld: >>> >>> "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 >>> --hash-style=both --enable-new-dtags -o z /usr/lib/crt1.o >>> /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/z-9530c3.o -lgcc >>> --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s >>> --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o >>> >>> The resulting program runs without difficulty. -- George >> >> well, I copied my invocation from: >> http://people.freebsd.org/~rene/patches/binutils-rpi-bug.txt >> >> but you are right. I have now did just the same >> using /usr/local/bin/ld, and the executable worked. >> >> So probably Andreas Tobler's patchset should >> be committed? >> >> I'm building lang/gcc right now, will see how it goes. > >You can save the time for gcc. Nothing else than the system gcc works. Sorry, I still don't get you. What is the "system gcc"? I thought the system C compiler is clang, in 10-stable and above. I'm not intersted in gcc itself. I just want to build xorg-server. Thanks Anton