From patchwork Sat Aug 22 22:48:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 8391 Received: (qmail 50711 invoked by alias); 22 Aug 2015 22:48:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 50695 invoked by uid 89); 22 Aug 2015 22:48:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: sonata.ens-lyon.org Date: Sun, 23 Aug 2015 00:48:24 +0200 From: Samuel Thibault To: debian-hurd@lists.debian.org, bug-hurd@gnu.org, roland@hack.frob.com Cc: libc-alpha@sourceware.org Subject: [PATCH] hurd: fix for glibc install-headers target Message-ID: <20150822224824.GB11514@type.dc15.debconf.org> Mail-Followup-To: debian-hurd@lists.debian.org, bug-hurd@gnu.org, roland@hack.frob.com, libc-alpha@sourceware.org References: <20150818210540.GA11318@type.dc15.debconf.org> <20150822215515.GA11514@type.dc15.debconf.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150822215515.GA11514@type.dc15.debconf.org> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) Hello, We are having trouble with bootstrapping glibc on Debian Hurd. To get crt*.o, we run /usr/bin/make cross-compiling=yes -C build-tree/hurd-i386-libc csu/subdir_lib At some point it gets into > /usr/bin/make -C ../mach mach-before-compile no_deps=t generating=t then it builds a couple of things: > make[4]: Entering directory '/tmp/glibc-2.19/mach' > .././scripts/mkinstalldirs /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu > mkdir -p -- /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu > echo '#include ' | \ > i586-gnu-gcc-4.8 -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -pipe -Wno-parentheses -Wstrict-prototypes -mpreferred-stack-boundary=4 -isystem /tmp/glibc-2.19/debian/include -I../include -I/tmp/glibc-2.19/build-tree/hurd-i386-libc/csu -I/tmp/glibc-2.19/build-tree/hurd-i386-libc -I../libpthread/sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd/i386 -I../libpthread/sysdeps/mach/hurd -I../libpthread/sysdeps/hurd -I../libpthread/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd -I../sysdeps/unix/inet -I../sysdeps/../libpthread/sysdeps/generic -I../libpthread/sysdeps/mach/i386 -I../sysdeps/mach/i386 -I../libpthread/sysdeps/mach -I../sysdeps/mach -I../sysdeps/i386/i586 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu -I../libpthread/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix -I../sysdeps/posix -I../libpthread/sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic -I../libpthread/include -I../libpthread -I../hurd -I/tmp/glibc-2.19/build-tree/hurd-i386-libc/hurd/ -I../mach -I/tmp/glibc-2.19/build-tree/hurd-i386-libc/mach/ -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/i586-gnu/4.8/include -isystem /usr/lib/gcc/i586-gnu/4.8/include-fixed -isystem /tmp/glibc-2.19/debian/include -I../libpthread/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -E -MD -MP -MF /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk-dep -MT /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk \ > -x c-header - \ > -D_MACH_`echo i386 | tr a-z A-Z`_SYSCALL_SW_H_=1 | \ > sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$/\1 \2 \3/p'\ > | gawk -f syscalls.awk > /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk-new > sed -e 's@ /tmp/glibc-2\.19/build-tree/hurd-i386-libc/@ $(common-objpfx)@g' -e 's@^/tmp/glibc-2\.19/build-tree/hurd-i386-libc/@$(common-objpfx)@g' /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk-dep >> /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk-new > rm -f /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk-dep > mv -f /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk-new /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-syscalls.mk > /usr/bin/make -C ../mach mach-before-compile no_deps=t generating=t > make[5]: Entering directory '/tmp/glibc-2.19/mach' > /usr/bin/make -C ../mach mach-before-compile no_deps=t generating=t > make[6]: Entering directory '/tmp/glibc-2.19/mach' and this goes on at infinitum. Make -d shows that it is trying to build /tmp/glibc-2.19/build-tree/hurd-i386-libc/mach/mach-shortcuts.h and adding a $(warning) shows that the generated mach-shortcuts.h rule is for /tmp/glibc-2.19/build-tree/hurd-i386-libc/csu/mach-shortcuts.h (in csu/ instead of mach/). AIUI, the patch below would be needed to fix the objpfx so that the proper rule is generated, isn't it? Samuel diff --git a/sysdeps/mach/Makefile b/sysdeps/mach/Makefile index b47cdc6..3323e81 100644 --- a/sysdeps/mach/Makefile +++ b/sysdeps/mach/Makefile @@ -43,7 +43,7 @@ ifneq (mach,$(subdir)) # This patsubst generates patterns like `m%h-shortcuts.h', which are damn # likely to match just the corresponding particular file we want. $(patsubst mach%,m\%h%,$(mach-before-compile)): # Run only if doesn't exist. - $(MAKE) -C $(..)mach mach-before-compile no_deps=t generating=t + $(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t generating=t before-compile += $(mach-before-compile) endif diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile index b528815..244ac4b 100644 --- a/sysdeps/mach/hurd/Makefile +++ b/sysdeps/mach/hurd/Makefile @@ -48,13 +48,13 @@ hurd-objpfx = $(common-objpfx)hurd/ before-compile += $(patsubst %,$(hurd-objpfx)hurd/%.h,auth io fs process) $(patsubst %,$(hurd-objpfx)hurd/%.%,auth io fs process): \ $(common-objpfx)mach/mach-shortcuts.h - $(MAKE) -C $(..)hurd before-compile no_deps=t + $(MAKE) -C $(..)hurd subdir=hurd before-compile no_deps=t endif # Hurd profil.c includes this file, so give a rule to make it. ifeq ($(subdir),gmon) $(common-objpfx)hurd/../mach/RPC_task_get_sampled_pcs.c: - $(MAKE) -C $(..)mach before-compile no_deps=t + $(MAKE) -C $(..)mach subdir=mach before-compile no_deps=t endif