X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.36.124.71 with SMTP id a68mr649187itd.13.1485953375758; Wed, 01 Feb 2017 04:49:35 -0800 (PST) X-Received: by 10.157.27.162 with SMTP id z31mr246439otd.7.1485953375729; Wed, 01 Feb 2017 04:49:35 -0800 (PST) Newsgroups: comp.os.msdos.djgpp Date: Wed, 1 Feb 2017 04:49:35 -0800 (PST) In-Reply-To: <8b086a70-3a1c-4615-b1b6-4e017efd6154@googlegroups.com> Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.33.255.218; posting-account=OFalZQoAAADCSVzPBKjmhdetJY5Tyv-s NNTP-Posting-Host: 213.33.255.218 References: <54e4e15b-fb44-453a-9b1a-0c774a47b307 AT googlegroups DOT com> <36a727e1-bebe-4332-9ac6-b52fc2d18ef3 AT googlegroups DOT com> <6835ad4a-5978-42dc-8ccf-587040458abb AT googlegroups DOT com> <8c52ad4f-0846-4437-b88a-3d97f1df8091 AT googlegroups DOT com> <8b086a70-3a1c-4615-b1b6-4e017efd6154 AT googlegroups DOT com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: micropython djgpp build From: "multisosnooley AT gmail DOT com [via djgpp AT delorie DOT com]" Injection-Date: Wed, 01 Feb 2017 12:49:35 +0000 Content-Type: text/plain; charset=UTF-8 Bytes: 6733 Lines: 86 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tuesday, January 31, 2017 at 5:41:12 PM UTC+3, multiso DOT DOT DOT AT gmail DOT com wrote: > On Tuesday, January 31, 2017 at 4:54:20 PM UTC+3, Louis Santillan (lpsantil AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: > > Can you replace CFLAGS/LDFLAGS to exclude the `--gc-sections`? > > > > On Tue, Jan 31, 2017 at 2:48 AM, multisosnooley AT gmail DOT com [via > > djgpp AT delorie DOT com] wrote: > > > On Thursday, January 26, 2017 at 3:13:00 AM UTC+3, multiso DOT DOT DOT AT gmail DOT com wrote: > > >> On Wednesday, January 25, 2017 at 6:19:02 PM UTC+3, Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: > > >> > On 1/25/17, multisosnooley AT gmail DOT com [via djgpp AT delorie DOT com] > > >> > wrote: > > >> > > On Wednesday, January 25, 2017 at 3:07:30 PM UTC+3, Ozkan Sezer > > >> > > (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: > > >> > >> On 1/25/17, multisosnooley AT gmail DOT com [via djgpp AT delorie DOT com] > > >> > >> wrote: > > >> > >> > Hi! > > >> > >> > > > >> > >> > We have a problem with building micropython with djgpp with > > >> > >> > '--gc-sections' > > >> > >> > flag active. It segfaults on linking. > > >> > >> > More info: > > >> > >> > https://github.com/micropython/micropython/issues/2560 > > >> > >> > https://github.com/micropython/micropython/pull/2644 > > >> > >> > > > >> > >> > > >> > >> Possibly related to this? > > >> > >> https://sourceware.org/bugzilla/show_bug.cgi?id=20401 > > >> > >> > > >> > >> Which binutils version are you using? > > >> > > > > >> > > I don't exactly now which version of binutils was used in previous cases, > > >> > > but right now newest available is > > >> > > http://www.delorie.com/pub/djgpp/deleted/v2gnu/bnu226sr3.zip and in bug you > > >> > > reference fix comes in 2.27, but it is not released yet. Or? > > >> > > > > >> > > > >> > There is a djgpp port of 2.27: > > >> > http://www.delorie.com/pub/djgpp/current/v2gnu/bnu227s.zip > > >> > http://www.delorie.com/pub/djgpp/current/v2gnu/bnu227b.zip > > >> > Besides, the fix is (should be) applicable to 2.26 too. > > >> > > > >> > Looking at the links you provided: > > >> > https://github.com/micropython/micropython/issues/2560#issuecomment-260157891 > > >> > mentions binutils 2.20.1.20100303: if that is version giving you the > > >> > segfault then I don't know, because but as far as I remember the > > >> > --gc-sections support for coff and pe targets began with > > >> > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0f088b2a > > >> > and that corresponds to either 2.25.1 or 2.26 > > >> > > >> Just tested: > > >> > > >> [poh ~/tmp/upython]$ cat test.c > > >> int main () { return 0; } > > >> [poh ~/tmp/upython]$ djgpp-6.2.0/bin/i586-pc-msdosdjgpp-gcc -Wl,--gc-sections test.c > > >> collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped > > >> compilation terminated. > > >> [poh ~/tmp/upython]$ djgpp-6.2.0/bin/i586-pc-msdosdjgpp-gcc --version > > >> i586-pc-msdosdjgpp-gcc (GCC) 6.2.0 > > >> Copyright (C) 2016 Free Software Foundation, Inc. > > >> This is free software; see the source for copying conditions. There is NO > > >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > >> > > >> [poh ~/tmp/upython]$ djgpp-6.2.0/bin/i586-pc-msdosdjgpp-ld --version > > >> GNU ld (GNU Binutils) 2.26.20160125 > > >> Copyright (C) 2015 Free Software Foundation, Inc. > > >> This program is free software; you may redistribute it under the terms of > > >> the GNU General Public License version 3 or (at your option) a later version. > > >> This program has absolutely no warranty. > > >> > > >> Will try to test with 2.27 > > > > > > Unfortunately, building djgpp with 2.27s failed with: > > > ../bfd/.libs/libbfd.a(coff-go32.o): In function `coff_swap_scnhdr_in': > > > /home/broomrider/tmp/upython/build-djgpp/build/bnu227s/gnu/binutils-2.27/bfd/coffswap.h:775: undefined reference to `coff_64k_relocation_enabled' > > > ../bfd/.libs/libbfd.a(coff-go32.o): In function `coff_swap_scnhdr_out': > > > /home/broomrider/tmp/upython/build-djgpp/build/bnu227s/gnu/binutils-2.27/bfd/coffswap.h:815: undefined reference to `coff_64k_relocation_enabled' > > > ../bfd/.libs/libbfd.a(coff-go32.o): In function `coff_set_alignment_hook': > > > /home/broomrider/tmp/upython/build-djgpp/build/bnu227s/gnu/binutils-2.27/bfd/coffcode.h:1990: undefined reference to `coff_64k_relocation_enabled' > > > ../bfd/.libs/libbfd.a(coff-stgo32.o): In function `_bfd_go32_mkobject': > > > /home/broomrider/tmp/upython/build-djgpp/build/bnu227s/gnu/binutils-2.27/bfd/coff-stgo32.c:454: undefined reference to `coff_64k_relocation_enabled' > > > > > > I found this: > > > https://groups.google.com/d/msg/comp.os.msdos.djgpp/mUOzbTpE1Sk/ODqAENwlAgAJ > > > But, as I realized, there is no solution right now. > > You mean for test code? If I omit `--gc-sections` everything work as expected. The question is exactly about `--gc-sections` and why linker crashes. Probably binutils 2.27 will solve the problem, but I can't build it. Ok, with 2.27 everything work as expected.