[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Having trouble with newt



On Sun, 2008-03-23 at 20:10 +0000, David Goodenough wrote:
> On Sunday 23 March 2008, Neil Williams wrote:
> > On Sun, 2008-03-23 at 18:49 +0000, David Goodenough wrote:
> > > Looking further at the debian/rules file there is a place to compile
> > > the file, but it uses $CROSSCC, is this set for a non-cross compile?
> >
> > Check the contents of debian/rules after the patch is applied:
> >
> > DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
> > DEB_BUILD_GNU_CPU = $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
> >
> > DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
> > DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
> > ifneq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
> > CROSS=--build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
> > CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
> > else
> > CROSS=
> > CROSSCC=gcc
> > endif
> >
> > So $(CROSS) is just a placeholder, $(CROSSCC) equals gcc in a native
> > build or arm-linux-gnu-gcc in a crossbuild for ARM. This is done so that
> > the patch can be incorporated upstream in Debian. See #465105
> >
> > (The patch in the bug report IIRC sets --build in $(CROSS) in line with
> > the autotools-dev recommendations but it's only a precaution.)
> >
> > (Use embug -u; embug -l to see the list of crossbuilding bugs).
> 
> No, the relevant code reads:
> 
> ifneq ($(DEB_HOST_CNU_TYPE),$(DEB_BUILD_GNU_TYPE))

That's a typo - hopefully in your copy of the lines, HOST_GNU no
HOST_CNU

> CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
> # CROSS is passed to make, CROSCC is called directly
> CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
> endif

Not in newt, I don't know where you got that content:

DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
DEB_BUILD_GNU_CPU = $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)

DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
CROSS=--build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
else
CROSS=
CROSSCC=gcc
endif

The bug report patch is also correct (although it could use --build for
native builds and probably should):
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
+CROSS=--build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
+else
+CROSS=
+CROSSCC=gcc
+endif
+

Do 'emsource -c newt' to get the current patches. (Make sure you use the
-c option to clean the old directories.)

(I'm on IRC now if you have questions.)

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: