[PATCH 2/4] Allow make-link-multidir to make subdirectories
Joseph Myers
joseph@codesourcery.com
Wed Feb 7 01:23:00 GMT 2018
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
More information about the Libc-alpha
mailing list