From owner-freebsd-arm@FreeBSD.ORG Tue Feb 3 22:13:16 2015 Return-Path: Delivered-To: freebsd-arm@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 ED2C52FF for ; Tue, 3 Feb 2015 22:13:16 +0000 (UTC) Received: from ns2.wilbury.net (ns2.wilbury.net [62.176.169.20]) by mx1.freebsd.org (Postfix) with ESMTP id 4524B7CF for ; Tue, 3 Feb 2015 22:13:16 +0000 (UTC) Received: from smtp.nic.sk (smtp.nic.sk [193.105.142.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.nic.sk", Issuer "Starfield Secure Certification Authority" (verified OK)) by ns2.wilbury.net (Postfix) with ESMTPS id 176FA3AE2D3 for ; Tue, 3 Feb 2015 23:07:03 +0100 (CET) Received: from [127.0.0.1] (remedy.wilbury.sk [IPv6:2a01:390:4::47]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client CN "janitor", Issuer "Wilbury Consulting CA" (verified OK)) by smtp.ltc.sk (Postfix) with ESMTPS id C0323B45 for ; Tue, 3 Feb 2015 23:07:02 +0100 (CET) Message-ID: <54D14686.1050109@gmail.com> Date: Tue, 03 Feb 2015 23:07:02 +0100 From: Juraj Lutter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100411 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: Issue with arm cross compiler xdev on FreeBSD 10.1 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 22:13:17 -0000 Hi, I've ran into the very same situation and found out following: - In gnu/lib/libgcc/Makefile there is something like "-I${.CURDIR}/../../../sys/arm/include" in .if ${TARGET_CPUARCH} == "arm" section - In contrib/gcc/config/arm/libunwind.S there is #include instead of, for example, #include There is some problems with checking for ARM architecture as gcc's builtin __ARM_ARCH_6ZK__ is defined but acle-compat.h still complains that it can not find proper ARM architecture. Am I missing something? (On HEAD) On 01/12/15 17:52, Warner Losh wrote: > I think there’s an issue with head. I keep running into the acle-compat.h issue > but when I look for it I can’t reproduce it. > > Warner > > >> On Jan 10, 2015, at 1:42 AM, Kai Noetzel wrote: >> >> I retried to build the arm cross compiler with the sources of 10.1. It took >> a while but the following worked: >> >> svn co http://svn.freebsd.org/base/release/10.1.0/ /usr/src2 >> make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 xdev >> >> .... >> sh /usr/src2/tools/install.sh -C -o root -g wheel -m 444 libln.a >> //usr/armv6-freebsd/usr/lib >> //usr/armv6-freebsd/usr/lib/libl.a -> //usr/armv6-freebsd/usr/lib/libln.a >> //usr/armv6-freebsd/usr/lib/libfl.a -> //usr/armv6-freebsd/usr/lib/libln.a >> cd //usr/armv6-freebsd/usr/bin; mkdir -p ../../../../usr/bin; for i in *; >> do ln -sf ../..//usr/armv6-freebsd/usr/bin/$i >> ../../../../usr/bin/armv6-freebsd-$i; ln -sf >> ../..//usr/armv6-freebsd/usr/bin/$i >> ../../../../usr/bin/armv6-freebsd10.1-$i; done >> >> Is there an issue with head or am I doing something wrong? >> >> >> On Fri, Jan 9, 2015 at 11:52 PM, Kai Noetzel wrote: >> >>> Hi Warner, >>> >>> I tried to issue your command and it ran for quite a while but stopped >>> finally with the following error: >>> >>> cc -c -O -pipe -DTARGET_ARM_EABI -DIN_GCC -DIN_LIBGCC2 >>> -D__GCC_FLOAT_NOT_NEEDED -DHAVE_GTHR_DEFAULT >>> -I/usr/src/gnu/lib/libgcc/../../../contrib/gcclibs/include >>> -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc/config >>> -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc -I. >>> -I/usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools -Dinhibit_libc >>> -fno-inline -std=gnu99 -fheinous-gnu-extensions -Qunused-arguments >>> -fvisibility=hidden -DHIDE_EXPORTS -fPIC -fexceptions -D__GLIBC__=3 >>> -DElfW=__ElfN -o libunwind.o >>> /usr/src/gnu/lib/libgcc/../../../contrib/gcc/config/arm/libunwind.S >>> /usr/src/gnu/lib/libgcc/../../../contrib/gcc/config/arm/libunwind.S:29:10: >>> fatal error: 'machine/acle-compat.h' file not found >>> #include >>> ^ >>> 1 error generated. >>> *** Error code 1 >>> >>> Stop. >>> make[4]: stopped in /usr/src/gnu/lib/libgcc >>> *** Error code 1 >>> >>> Stop. >>> make[3]: stopped in /usr/src >>> *** Error code 1 >>> >>> Stop. >>> make[2]: stopped in /usr/src >>> *** Error code 1 >>> >>> Stop. >>> make[1]: stopped in /usr/src >>> *** Error code 1 >>> >>> Stop. >>> make: stopped in /usr/src >>> >>> On Fri, Jan 9, 2015 at 11:30 PM, Warner Losh wrote: >>> >>>> Let’s get back to basics… >>>> >>>> can you do the following? >>>> >>>> make buildworld TARGET_ARCH=armv6 WITHOUT_CLANG=t >>>> WITHOUT_CLANG_BOOTSTRAP=t WITH_GCC=t WITH_GCC_BOOTSTRAP=t >>>> >>>> ???? >>>> >>>> Warner >>>> >>>> >>>> >>>>> On Jan 9, 2015, at 3:26 PM, Kai Noetzel wrote: >>>>> >>>>> Hi, >>>>> >>>>> I'm having issues trying to build the arm cross compiler on the >>>> following >>>>> system: >>>>> >>>>> root@bsdcompy:/usr/src # uname -a >>>>> FreeBSD bsdcompy 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov >>>> 11 >>>>> 21:02:49 UTC 2014 >>>>> root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC >>>>> amd64 >>>>> >>>>> I checked out: >>>>> >>>>> svn co http://svn.freebsd.org/base/head /usr/src >>>>> >>>>> When I run: >>>>> >>>>> root@bsdcompy:/usr/src # make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 xdev >>>>> >>>>> I get the following error: >>>>> >>>>> ...... >>>>> ===> xdev lib/libelftc (obj,depend,all) >>>>> ===> xdev usr.bin/addr2line (obj,depend,all) >>>>> cc -O2 -pipe >>>>> -I/usr/src/usr.bin/addr2line/../../contrib/elftoolchain/libelftc >>>>> -I/usr/src/usr.bin/addr2line/../../contrib/elftoolchain/common >>>> -std=gnu99 >>>>> -fstack-protector -Qunused-arguments -c >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:105:39: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> warnx("dwarf_tag: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:119:14: >>>>> error: use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:122:8: >>>>> warning: implicit declaration of function 'dwarf_formstring' is invalid >>>> in >>>>> C99 [-Wimplicit-function-declaration] >>>>> if (dwarf_formstring(sub_at, &func0, &de)) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:136:7: >>>>> warning: implicit declaration of function 'dwarf_global_formref' is >>>> invalid >>>>> in C99 [-Wimplicit-function-declaration] >>>>> if (dwarf_global_formref(spec_at, &ref, &de)) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:138:7: >>>>> warning: implicit declaration of function 'dwarf_offdie' is invalid in >>>> C99 >>>>> [-Wimplicit-function-declaration] >>>>> if (dwarf_offdie(dbg, ref, &spec_die, &de)) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:150:13: >>>>> error: use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:151:54: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> errx(EXIT_FAILURE, "dwarf_child: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:157:13: >>>>> error: use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:158:58: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> errx(EXIT_FAILURE, "dwarf_siblingof: %s", >>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:189:22: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:210:7: >>>>> warning: implicit declaration of function 'dwarf_srclines' is invalid in >>>>> C99 [-Wimplicit-function-declaration] >>>>> if (dwarf_srclines(die, &lbuf, &lcount, &de) != >>>> DW_DLV_OK) { >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:211:45: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> warnx("dwarf_srclines: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:219:8: >>>>> warning: implicit declaration of function 'dwarf_lineaddr' is invalid in >>>>> C99 [-Wimplicit-function-declaration] >>>>> if (dwarf_lineaddr(lbuf[i], &lineaddr, &de)) { >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:221:22: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:224:8: >>>>> warning: implicit declaration of function 'dwarf_lineno' is invalid in >>>> C99 >>>>> [-Wimplicit-function-declaration] >>>>> if (dwarf_lineno(lbuf[i], &lineno, &de)) { >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:226:22: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:229:8: >>>>> warning: implicit declaration of function 'dwarf_linesrc' is invalid in >>>> C99 >>>>> [-Wimplicit-function-declaration] >>>>> if (dwarf_linesrc(lbuf[i], &file0, &de)) { >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:231:22: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:269:14: >>>>> error: use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:271:21: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:387:46: >>>>> error: too many arguments to function call, expected 4, have 6 >>>>> if (dwarf_init(fd, DW_DLC_READ, NULL, NULL, &dbg, &de)) >>>>> ~~~~~~~~~~ ^~~~~~~~~ >>>>> /usr/include/libdwarf.h:144:1: note: 'dwarf_init' declared here >>>>> int dwarf_init(int, int, Dwarf_Debug *, Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:388:53: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> errx(EXIT_FAILURE, "dwarf_init: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:390:6: >>>>> warning: implicit declaration of function 'dwarf_get_elf' is invalid in >>>> C99 >>>>> [-Wimplicit-function-declaration] >>>>> if (dwarf_get_elf(dbg, &e, &de) != DW_DLV_OK) >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:391:56: >>>>> error: passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') to parameter of >>>>> incompatible type 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>> the >>>>> address >>>>> with & >>>>> errx(EXIT_FAILURE, "dwarf_get_elf: %s", >>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> >>>> /usr/src/usr.bin/addr2line/../../contrib/elftoolchain/addr2line/addr2line.c:407:15: >>>>> warning: incompatible pointer types passing 'Dwarf_Debug' (aka 'struct >>>>> _Dwarf_Debug *') to parameter of type 'Dwarf_Debug *' >>>>> (aka 'struct _Dwarf_Debug **'); take the address with & >>>>> [-Wincompatible-pointer-types] >>>>> dwarf_finish(dbg, &de); >>>>> ^~~ >>>>> & >>>>> /usr/include/libdwarf.h:141:32: note: passing argument to parameter here >>>>> int dwarf_finish(Dwarf_Debug *, Dwarf_Error *); >>>>> ^ >>>>> 9 warnings and 16 errors generated. >>>>> *** Error code 1 >>>>> >>>>> Stop. >>>>> make[2]: stopped in /usr/src/usr.bin/addr2line >>>>> *** Error code 1 >>>>> >>>>> Stop. >>>>> make[1]: stopped in /usr/src >>>>> *** Error code 1 >>>>> >>>>> Stop. >>>>> make: stopped in /usr/src >>>>> >>>>> Would be great if someone could take a look. >>>>> Thanks in advance. >>>>> >>>>> Best, >>>>> Kai >>>>> _______________________________________________ >>>>> freebsd-arm@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >>>>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >>>> >> _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"