From: Sam Ravnborg <sam@ravnborg.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
linuxppc64-dev <linuxppc64-dev@lists.linuxppc.org>,
Alan Modra <amodra@bigpond.net.au>,
Ulrich Drepper <drepper@redhat.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: vDSO for ppc64 : Preliminary release #4
Date: Fri, 10 Sep 2004 22:36:35 +0200 [thread overview]
Message-ID: <20040910203635.GB11338@mars.ravnborg.org> (raw)
In-Reply-To: <1094799101.2664.144.camel@gaston>
Hi Ben.
I would prefer to use a bit more core kbuild stuff.
Could you please try my version below (needs to be applied manually).
Let me know how it turns out.
Sam
On Fri, Sep 10, 2004 at 04:51:42PM +1000, Benjamin Herrenschmidt wrote:
> diff -urN linux-2.5/arch/ppc64/kernel/vdso32/Makefile linux-vdso/arch/ppc64/kernel/vdso32/Makefile
> --- /dev/null 2004-09-01 15:26:22.000000000 +1000
> +++ linux-vdso/arch/ppc64/kernel/vdso32/Makefile 2004-09-07 18:25:44.000000000 +1000
> @@ -0,0 +1,51 @@
> +# Choose compiler
> +#
> +# XXX FIXME: We probably want to enforce using a biarch compiler by default
> +# and thus use (CC) with -m64, while letting the user pass a
> +# CROSS32_COMPILE prefix if wanted. Same goes for the zImage
> +# wrappers
> +#
> +
> +CROSS32_COMPILE ?=
> +
> +CROSS32CC := $(CROSS32_COMPILE)gcc
> +CROSS32AS := $(CROSS32_COMPILE)as
> +
> +# List of files in the vdso, has to be asm only for now
> +
> +src-vdso32 = sigtramp.S gettimeofday.S datapage.S
> +
> +# Build rules
> +
> +obj-vdso32 := $(addsuffix .o, $(basename $(src-vdso32))
targets := $(obj-vdso32)
-> So they get removed by make clean
> +obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
> +src-vdso32 := $(addprefix $(src)/, $(src-vdso32))
OK.
> +
> +VDSO32_CFLAGS := -shared -s -fno-common -Iinclude -fno-builtin -nostdlib
> +VDSO32_CFLAGS += -Wl,-soname=linux-vdso32.so.1
> +VDSO32_AFLAGS := -D__ASSEMBLY__ -D__KERNEL__ -D__VDSO32__ -s -nostdinc -Iinclude
Replace with:
EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin
EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1
EXTRA_AFLAGS := -D__VDSO32__ -s
> +obj-y += vdso32_wrapper.o
-> This causes built-in.o to be generated, which is fine.
> +extra-y += vdso32.lds
> +CPPFLAGS_vdso32.lds += -P -C -U$(ARCH)
OK
> +# Force dependency (incbin is bad)
> +$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
OK
> +# link rule for the .so file, .lds has to be first
> +$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32)
> + $(call if_changed,vdso32ld)
OK
> +
> +# assembly rules for the .S files
> +# This is probably wrong with split src & obj trees
> +$(obj-vdso32): %.o: %.S
> + $(call if_changed_dep,vdso32as)
OK - but see below
> +# actual build commands
> +quiet_cmd_vdso32ld = VDSO32L $@
cmd_vdso32ld = $(CROSS32CC) $(cflags) -Wl,-T $^ -o $@
Utilising $(cflags) gives:
-> Correct $(depfile)
-> Expanded include paths
> +quiet_cmd_vdso32as = VDSO32A $@
> + cmd_vdso32as = $(CROSS32CC) $(aflags) -c -o $@ $^
Same here.
> +
> +targets += vdso32.so
OK - but put it closer to the rule that generates it.
prev parent reply other threads:[~2004-09-10 20:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-10 6:51 Benjamin Herrenschmidt
2004-09-10 20:36 ` Sam Ravnborg [this message]
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=20040910203635.GB11338@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=amodra@bigpond.net.au \
--cc=benh@kernel.crashing.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
/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
all inboxes | Powered by JetHome®