Sorry, forgot to attach the new patch.
On Thu, Dec 18, 2014 at 11:44 PM, YunQiang Su <wzssyqa@gmail.com> wrote:
> Thank you for pointing them out.
>
> On Wed, Dec 17, 2014 at 3:10 AM, Helmut Grohne <helmut@subdivi.de> wrote:
>> On Tue, Dec 16, 2014 at 11:39:40PM +0800, YunQiang Su wrote:
>>> Hi, the attached patch can improve bootstrapping of glibc.
>>
>> Partially, this seems to be a duplicate of #766877. Maybe these should
>> be merged?
>>
>>> It produces the similiar stage1 glibc
>>> (libc6/libc6-dev and multilib version of them),
>>> at the same time, the dependencies of them are also correct.
>>
>> The documentation and rationale of this patch are scarce. I have a few
>> comments on individual hunks though.
>>
>> diff -Nru glibc-2.19/debian/rules glibc-2.19/debian/rules
>> --- glibc-2.19/debian/rules 2014-10-17 07:43:19.000000000 +0000
>> +++ glibc-2.19/debian/rules 2014-12-10 23:16:28.000000000 +0000
>> @@ -143,8 +143,12 @@
>> endif
>> endif
>>
>> +ifeq ($(DEB_STAGE),stage2)
>> + DEB_BUILD_PROFILES+=stage2
>> +endif
>> +
>> ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
>> - DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev
>> + DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev $(libc)
>> DEB_INDEP_REGULAR_PACKAGES =
>> DEB_UDEB_PACKAGES =
>> else
>>
>> I have no clue how one would build the libc in stage1. The gcc stage1
>> does not provide the means for doing so. If anything those packages
>> would be empty. I.e. this seems rather wrong to me.
>
> Yes, it is a empty package and are used only for meeting dependency.
> It is only for stage1, and it can make things simple.
> I don't treat it as a problem.
>
>>
>> diff -Nru glibc-2.19/debian/sysdeps/linux.mk glibc-2.19/debian/sysdeps/linux.mk
>> --- glibc-2.19/debian/sysdeps/linux.mk 2014-07-16 18:43:31.000000000 +0000
>> +++ glibc-2.19/debian/sysdeps/linux.mk 2014-12-10 23:11:05.000000000 +0000
>> @@ -16,11 +16,7 @@
>> endif
>>
>> ifndef LINUX_SOURCE
>> - ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
>> - LINUX_HEADERS := /usr/include
>> - else
>> - LINUX_HEADERS := /usr/$(DEB_HOST_GNU_TYPE)/include
>> - endif
>> + LINUX_HEADERS := /usr/include
>> LINUX_ARCH_HEADERS := /usr/include/$(DEB_HOST_MULTIARCH)
>> else
>> LINUX_HEADERS := $(LINUX_SOURCE)/include
>>
>> This breaks the supported cross build method.
>
> - ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
> + ifeq ($(shell dpkg-query --status
> linux-libc-dev-$(DEB_HOST_ARCH)-cross 2>/dev/null),)
> LINUX_HEADERS := /usr/include
> else
> LINUX_HEADERS := /usr/$(DEB_HOST_GNU_TYPE)/include
> endif
> + LINUX_HEADERS := /usr/include
> LINUX_ARCH_HEADERS := /usr/include/$(DEB_HOST_MULTIARCH)
> else
> LINUX_HEADERS := $(LINUX_SOURCE)/include
>
> Will it be ok? I am not very sure whether linux-libc-dev-$(DEB_HOST_ARCH)-cross
> will be installed in the "support method scheme".
>
>>
>> diff -Nru glibc-2.19/debian/sysdeps/mips64.mk glibc-2.19/debian/sysdeps/mips64.mk
>> --- glibc-2.19/debian/sysdeps/mips64.mk 2014-10-17 07:43:19.000000000 +0000
>> +++ glibc-2.19/debian/sysdeps/mips64.mk 2014-12-11 03:50:09.000000000 +0000
>> @@ -59,5 +59,5 @@
>> # create a symlink for the 32 bit dynamic linker in /lib
>> define libc6-mips32_extra_pkg_install
>> mkdir -p debian/libc6-mips32/lib
>> -ln -sf /libo32/ld.so.1 debian/libc6-mips32/lib
>> +ln -sf ../libo32/ld.so.1 debian/libc6-mips32/lib
>> endef
>>
>> This violates a should in Debian policy section 10.5.
>
> Will mv OK?
>
> mv -f debian/libc6-mips32/libo32/{ld.so.1,ld-*.so} debian/libc6-mips32/lib
>
> I tested it. It works on mips64el.
>
>
>>
>> Helmut
>
>
>
> --
> YunQiang Su
--
YunQiang Su
Attachment:
glibc.debdiff
Description: Binary data