linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/13] [kbuild] handle exports in lib-y objects reliably
Date: Thu, 4 Feb 2016 23:33:27 +0100	[thread overview]
Message-ID: <56B3D1B7.4080305@suse.cz> (raw)
In-Reply-To: <1454534445-16759-1-git-send-email-viro@ZenIV.linux.org.uk>

Dne 3.2.2016 v 22:20 Al Viro napsal(a):
> From: Al Viro <viro@zeniv.linux.org.uk>
> 
> Collect the symbols exported by anything that goes into lib.a and
> add an empty object (lib-exports.o) with explicit undefs for each
> of those to obj-y.
> 
> That allows to relax the rules regarding the use of exports in
> lib-* objects - right now an object with export can be in lib-*
> only if we are guaranteed that there always will be users in
> built-in parts of the tree, otherwise it needs to be in obj-*.
> As the result, we have an unholy mix of lib- and obj- in lib/Makefile
> and (especially) in arch/*/lib/Makefile.  Moreover, a change in
> generic part of the kernel can lead to mysteriously missing exports
> on some configs.  With this change we don't have to worry about
> that anymore.
> 
> One side effect is that built-in.o now pulls everything with exports
> from the corresponding lib.a (if such exists).  That's exactly what
> we want for linking vmlinux and fortunately it's almost the only thing
> built-in.o is used in.  arch/ia64/hp/sim/boot/bootloader is the only
> exception and it's easy to get rid of now - just turn everything in
> arch/ia64/lib into lib-* and don't bother with arch/ia64/lib/built-in.o
> anymore.
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>  arch/ia64/hp/sim/boot/Makefile |  2 +-
>  arch/ia64/lib/Makefile         |  8 +++-----
>  scripts/Makefile.build         | 20 ++++++++++++++++++++
>  3 files changed, 24 insertions(+), 6 deletions(-)

Acked-by: Michal Marek <mmarek@suse.cz>

Sorry for the delay.


> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -81,6 +81,7 @@ endif
>  
>  ifneq ($(strip $(lib-y) $(lib-m) $(lib-)),)
>  lib-target := $(obj)/lib.a
> +obj-y += $(obj)/lib-ksyms.o
>  endif
>  
>  ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
> @@ -363,6 +364,25 @@ $(lib-target): $(lib-y) FORCE
>  	$(call if_changed,link_l_target)
>  
>  targets += $(lib-target)
> +
> +dummy-object = $(obj)/__lib_exports.o
> +ksyms-lds = $(obj)/lib-ksyms.lds

Just a really minor nitpick (no need to resend just because of it): We
typically use dotfiles for temporary stuff, e.g.

dummy-object = $(obj)/.lib_exports.o
ksyms-lds = $(dot-target).lds

Michal

  reply	other threads:[~2016-02-04 22:33 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 19:17 [RFC][PATCHSET] allowing exports in *.S Al Viro
2016-01-29 19:18 ` [PATCH 01/12] [kbuild] handle exports in lib-y objects reliably Al Viro
2016-01-29 19:18 ` [PATCH 02/12] EXPORT_SYMBOL() for asm Al Viro
2016-01-29 21:06   ` Arnd Bergmann
2016-02-01 15:12   ` David Howells
2016-01-29 19:18 ` [PATCH 03/12] x86: move exports to actual definitions Al Viro
2016-02-01  8:12   ` Thomas Gleixner
2016-01-29 19:18 ` [PATCH 04/12] alpha: " Al Viro
2016-01-29 19:18 ` [PATCH 05/12] m68k: move exports to definitions Al Viro
2016-02-01 10:52   ` Geert Uytterhoeven
2016-02-01 12:18     ` Al Viro
2016-02-01 13:30       ` Geert Uytterhoeven
2016-02-01 14:53         ` Al Viro
2016-02-01 15:32           ` Geert Uytterhoeven
2016-01-29 19:18 ` [PATCH 06/12] s390: " Al Viro
2016-02-02 11:29   ` Heiko Carstens
2016-01-29 19:18 ` [PATCH 07/12] arm: " Al Viro
2016-01-29 19:18 ` [PATCH 08/12] ppc: " Al Viro
2016-01-29 19:18 ` [PATCH 09/12] sparc: " Al Viro
2016-01-30  7:08   ` David Miller
2016-01-29 19:18 ` [PATCH 10/12] ia64: " Al Viro
2016-01-29 19:18 ` [PATCH 11/12] [sparc] unify 32bit and 64bit string.h Al Viro
2016-01-30  7:08   ` David Miller
2016-01-29 19:18 ` [PATCH 12/12] sparc32: debride memcpy.S a bit Al Viro
2016-01-30  7:07   ` David Miller
2016-02-03 21:19 ` [RFC][PATCHSET v2] allowing exports in *.S Al Viro
2016-02-03 21:20   ` [PATCH v2 01/13] [kbuild] handle exports in lib-y objects reliably Al Viro
2016-02-04 22:33     ` Michal Marek [this message]
2016-02-05  0:18       ` Al Viro
2016-02-03 21:20   ` [PATCH v2 02/13] EXPORT_SYMBOL() for asm Al Viro
2016-02-04 18:06     ` Al Viro
2016-02-10 22:15     ` Nicolas Pitre
2016-02-03 21:20   ` [PATCH v2 03/13] x86: move exports to actual definitions Al Viro
2016-02-03 21:20   ` [PATCH v2 04/13] alpha: " Al Viro
2016-02-03 21:20   ` [PATCH v2 05/13] m68k: move exports to definitions Al Viro
2016-02-03 21:20   ` [PATCH v2 06/13] s390: " Al Viro
2016-02-03 21:20   ` [PATCH v2 07/13] arm: " Al Viro
2016-02-10 21:56     ` Nicolas Pitre
2016-02-03 21:20   ` [PATCH v2 08/13] ppc: " Al Viro
2016-02-03 21:20   ` [PATCH v2 09/13] ppc: get rid of unreachable abs() implementation Al Viro
2016-02-03 21:20   ` [PATCH v2 10/13] sparc: move exports to definitions Al Viro
2016-02-03 21:20   ` [PATCH v2 11/13] [sparc] unify 32bit and 64bit string.h Al Viro
2016-02-03 21:20   ` [PATCH v2 12/13] sparc32: debride memcpy.S a bit Al Viro
2016-02-03 21:20   ` [PATCH v2 13/13] ia64: move exports to definitions Al Viro
2016-08-02 14:01   ` [RFC][PATCHSET v2] allowing exports in *.S Michal Marek
2016-08-16  5:48     ` Michal Marek
2016-08-16  5:57       ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B3D1B7.4080305@suse.cz \
    --to=mmarek@suse.cz \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).