This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/4] Allow make-link-multidir to make subdirectories
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, <schwab at linux-m68k dot org>, <patches at groups dot riscv dot org>
- Date: Wed, 7 Feb 2018 00:49:30 +0000
- Subject: Re: [PATCH 2/4] Allow make-link-multidir to make subdirectories
- Authentication-results: sourceware.org; auth=none
- References: <20180106073231.20491-1-palmer@dabbelt.com> <20180106073231.20491-3-palmer@dabbelt.com>
On Fri, 5 Jan 2018, Palmer Dabbelt wrote:
> diff --git a/Makerules b/Makerules
> index d94e4ca0c18f..ef6abeac6d9d 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -1081,6 +1081,7 @@ mv -f $@.new $@
> endef
> define make-link-multidir
> $(patsubst %/,cd %,$(objpfx)); \
> + $(addprefix $(abspath $(..)scripts/mkinstalldirs) ,$(dir $(multidir))); \
> $(LN_S) . $(multidir) 2> /dev/null; \
> test -L $(multidir)
> endef
This doesn't actually achieve the desired effect.
That is, it stops the build from failing. But the point of HJ's commit
abcb584d0eae7270b35e1b3fed1f9661e26b8be0 was that multidir ends up as a
symlink pointing to the csu object directory containing crt*.o. When
there are multiple subdirectory levels involved, you're still creating a
symlink to ".", which is just the subdirectory one level up; you need a
symlink that actually points to the csu object directory, however many
levels up it might be. So presumably the "wrong" (previously built)
crt*.o could get used in some cases for building shared libraries.
(I think the case of no ln -s support gets this right, though I haven't
tested that case.)
--
Joseph S. Myers
joseph@codesourcery.com