Date: Thu, 7 Sep 2006 21:51:18 GMT From: Peter Grehan <grehan@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: amd64/102996: powerpc cross-build fails on amd64 host, works fine on i386 Message-ID: <200609072151.k87LpIGL037561@www.freebsd.org> Resent-Message-ID: <200609072200.k87M0Xqc077048@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 102996 >Category: amd64 >Synopsis: powerpc cross-build fails on amd64 host, works fine on i386 >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 07 22:00:33 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Peter Grehan >Release: 6.0 >Organization: >Environment: FreeBSD *redacted* 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Wed Nov 2 19:07:38 UTC 2005 root@rat.samsco.home:/usr/obj/usr/src/sys/GENERIC amd64 >Description: A powerpc build (any release) fails on amd64. The same tree on a 32-bit host works fine. I believe it will fail on other 64-bit arches though I haven't verified this. >How-To-Repeat: make TARGET_ARCH=powerpc buildworld >Fix: I applied the following diff supplied by Ruslan Ermilov: worked fine. %%% Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/libbfd/Makefile,v retrieving revision 1.33 diff -u -r1.33 Makefile --- Makefile 24 Oct 2004 15:32:25 -0000 1.33 +++ Makefile 26 Aug 2006 00:48:26 -0000 @@ -48,6 +48,12 @@ CFLAGS+= -DSELECT_VECS="${SELVEC}" CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} +.if ${TARGET_ARCH:M*64} +CFLAGS+= -DTARGET_64BIT=1 +.else +CFLAGS+= -DTARGET_64BIT=0 +.endif + # XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}... bfdver.h: Makefile echo '#define BFD_VERSION 215000000' > ${.TARGET} Index: bfd.h =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/libbfd/bfd.h,v retrieving revision 1.3 diff -u -r1.3 bfd.h --- bfd.h 8 Jul 2004 17:05:32 -0000 1.3 +++ bfd.h 26 Aug 2006 00:44:29 -0000 @@ -57,15 +57,18 @@ #define BFD_ARCH_SIZE 64 -#if defined(__i386__) || defined(__powerpc__) || defined(__arm__) /* The word size of the default bfd target. */ +#if TARGET_64BIT +#define BFD_DEFAULT_TARGET_SIZE 64 +#else #define BFD_DEFAULT_TARGET_SIZE 32 +#endif + +#if defined(__i386__) || defined(__powerpc__) || defined(__arm__) #define BFD_HOST_64BIT_LONG 0 #define BFD_HOST_64_BIT long long #define BFD_HOST_U_64_BIT unsigned long long #elif defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) || defined(__ia64__) -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 64 #define BFD_HOST_64BIT_LONG 1 #define BFD_HOST_64_BIT long #define BFD_HOST_U_64_BIT unsigned long %%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609072151.k87LpIGL037561>