From owner-freebsd-toolchain@FreeBSD.ORG Fri Apr 17 20:13:44 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F725E1A; Fri, 17 Apr 2015 20:13:44 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 134FD809; Fri, 17 Apr 2015 20:13:44 +0000 (UTC) Received: by laat2 with SMTP id t2so88653681laa.1; Fri, 17 Apr 2015 13:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=riqYKm0PmBg6wZIxxtcZXjggwVP7BqQnzW2aGcibQVk=; b=rAnCjB+4XIlskN74Shl/YtF9AuWFJFrsf6Ajbmc9eSsXCsOBsTUJ6UJCdHQXfvk7Nu YInp9DsJaZ1MQFL7AaX5Hdk7QHr7jkvFw1ukKw9ZxC8qwmVxzPDlkMB9oKCg4ftpHJTQ 61En4qFkg+m9RS79/7RGuKAcNOoGbY72frPJkFVO8RJHp4Q7VN7mK2wyDUT3ADumdPSQ 3M2nytEL5u8ZvpsI4dlkaJVE4heC3cI5T+4XoQ4kd/dnMHcuHKZq33nzoBtFWAfK8OML YBXMdAmOAAV0AUiJDCY3oAtWFnb4Y11g5K/WypqtyUo7gB35pspJzihGPgi8b2mCcMTf 5WCA== MIME-Version: 1.0 X-Received: by 10.112.16.97 with SMTP id f1mr5789668lbd.26.1429301621962; Fri, 17 Apr 2015 13:13:41 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.108.168 with HTTP; Fri, 17 Apr 2015 13:13:41 -0700 (PDT) In-Reply-To: References: Date: Fri, 17 Apr 2015 13:13:41 -0700 X-Google-Sender-Auth: 5g_Fs6hu0e4St_rXrYfKDQPmSaY Message-ID: Subject: Re: Fails to build sys/i386/boot2 with gcc 4.9 From: Craig Rodrigues To: FreeBSD Toolchain , "freebsd-testing@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2015 20:13:44 -0000 On Sat, Mar 28, 2015 at 4:05 PM, Craig Rodrigues wrote: > Hi, > > To work around the problems build rescue, this time I used a build host > running FreeBSD-CURRENT at svn revision r280353 > > I took this patch for libc++ and applied it to my tree: > > http://reviews.llvm.org/D8461 > > I used this script to build with gcc 4.9: > > > https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/cross-build.sh > > Buildling sys/i386/boot2 failed: > > ===> sys/boot/i386/boot2 (all) > objcopy -S -O binary boot1.out boot1 > dd if=/dev/zero of=boot2.ldr bs=512 count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.000034 secs (14989607 bytes/sec) > /usr/local/bin/x86_64-portbld-freebsd11.0-gcc -isystem > /usr/obj/opt2/branches/head/tmp/usr/include > -L/usr/obj/opt2/branches/head/tmp/usr/lib > --sysroot=/usr/obj/opt2/branches/head/tmp -B/usr/local/x86_64-freebsd/bin/ > -fomit-frame-pointer -mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2 > -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 > -I/opt2/branches/head/sys/boot/i386/boot2/../../common > -I/opt2/branches/head/sys/boot/i386/boot2/../btx/lib -I. -Wall > -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow > -Wstrict-prototypes -Wwrite-strings -Winline -march=i386 -ffreestanding > -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -m32 > -std=gnu99 -Os -fno-guess-branch-probability -fno-unit-at-a-time > --param max-inline-insns-single=100 -mpreferred-stack-boundary=2 -S -o > boot2.s.tmp /opt2/branches/head/sys/boot/i386/boot2/boot2.c > /opt2/branches/head/sys/boot/i386/boot2/boot2.c: In function 'parse': > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:484:6: warning: suggest > parentheses around assignment used as truth value [-Wparentheses] > if (k = ep - arg) { > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c: In function 'load': > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:334:9: warning: called > from here [-Winline] > if (xfsread(ino, &hdr, sizeof(hdr))) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:341:6: warning: called > from here [-Winline] > if (xfsread(ino, p, hdr.ex.a_text)) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:344:6: warning: called > from here [-Winline] > if (xfsread(ino, p, hdr.ex.a_data)) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:349:10: warning: called > from here [-Winline] > if (xfsread(ino, ep + j, sizeof(ep[0]))) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:357:10: warning: called > from here [-Winline] > if (xfsread(ino, p, ep[i].p_filesz)) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:365:10: warning: called > from here [-Winline] > if (xfsread(ino, &es, sizeof(es))) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:187:1: warning: inlining > failed in call to 'xfsread': call is unlikely and code size would grow > [-Winline] > xfsread(ufs_ino_t inode, void *buf, size_t nbyte) > ^ > /opt2/branches/head/sys/boot/i386/boot2/boot2.c:371:7: warning: called > from here [-Winline] > if (xfsread(ino, p, es[i].sh_size)) > ^ > sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s > rm -f boot2.s.tmp > /usr/local/bin/x86_64-portbld-freebsd11.0-gcc -isystem > /usr/obj/opt2/branches/head/tmp/usr/include > -L/usr/obj/opt2/branches/head/tmp/usr/lib > --sysroot=/usr/obj/opt2/branches/head/tmp -B/usr/local/x86_64-freebsd/bin/ > -m32 -c boot2.s > /usr/local/bin/x86_64-portbld-freebsd11.0-gcc -isystem > /usr/obj/opt2/branches/head/tmp/usr/include > -L/usr/obj/opt2/branches/head/tmp/usr/lib > --sysroot=/usr/obj/opt2/branches/head/tmp -B/usr/local/x86_64-freebsd/bin/ > -fomit-frame-pointer -mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2 > -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 > -I/opt2/branches/head/sys/boot/i386/boot2/../../common > -I/opt2/branches/head/sys/boot/i386/boot2/../btx/lib -I. -Wall > -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow > -Wstrict-prototypes -Wwrite-strings -Winline -march=i386 -ffreestanding > -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -m32 > -std=gnu99 -Os -fno-guess-branch-probability -fno-unit-at-a-time > --param max-inline-insns-single=100 -mpreferred-stack-boundary=2 -m32 -c > /opt2/branches/head/sys/boot/i386/boot2/sio.S -o sio.o > /usr/local/x86_64-freebsd/bin/ld -static -N --gc-sections -m elf_i386_fbsd > -Ttext 0x2000 -o boot2.out > /usr/obj/opt2/branches/head/sys/boot/i386/boot2/../btx/lib/crt0.o boot2.o > sio.o > objcopy -S -O binary boot2.out boot2.bin > btxld -v -E 0x2000 -f bin -b > /usr/obj/opt2/branches/head/sys/boot/i386/boot2/../btx/btx/btx -l > boot2.ldr -o boot2.ld -P 1 boot2.bin > kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1 > client: fmt=bin size=195f text=0 data=0 bss=0 entry=0 > output: fmt=bin size=21ef text=200 data=1fef org=0 entry=0 > -1007 bytes available > *** Error code 1 > > Stop. > make[6]: stopped in /opt2/branches/head/sys/boot/i386/boot2 > *** Error code 1 > > Stop. > make[5]: stopped in /opt2/branches/head/sys/boot/i386 > *** Error code 1 > > Stop. > make[4]: stopped in /opt2/branches/head/sys/boot > *** Error code 1 > > Stop. > make[3]: stopped in /opt2/branches/head/sys > *** Error code 1 > > Stop. > make[2]: stopped in /opt2/branches/head > *** Error code 1 > > Stop. > make[1]: stopped in /opt2/branches/head > *** Error code 1 > > Stop. > make: stopped in /opt2/branches/head > > Script done on Sat Mar 28 13:44:24 2015 > > In sys/boot/i386/boot2/Makefile, I saw this section: # Decide level of UFS support. BOOT2_UFS?= UFS1_AND_UFS2 #BOOT2_UFS?= UFS2_ONLY #BOOT2_UFS?= UFS1_ONLY I tried setting just UFS2_ONLY, but I still couldn't build boot2 with gcc 4.9 due to taking too much space. I then tried setting just UFS1_ONLY, but even then I still couldn't build boot2 with gcc 4.9. So I'm really stuck here. I'm curious how the assembly of boot2 is different between gcc 4.2.1 and gcc 4.9. I didn't try compiling with gcc 4.2.1 yet. -- Craig > -- > Craig >