* [PATCH] Makefile: libfdt: build only the strict necessary
@ 2020-04-08 7:02 Claudio Fontana
2020-04-08 7:06 ` no-reply
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Claudio Fontana @ 2020-04-08 7:02 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Laurent Vivier, Alex Bennee, Claudio Fontana,
David Gibson
when building dtc/libfdt, we were previously using dtc/Makefile,
which tries to build some artifacts that are not needed,
and can complain on stderr about the absence of tools that
are not required to build just libfdt.
Instead, build only the strict necessary to get libfdt.a .
Remove the subdir-dtc "compatibility gunk" for recursion,
since we are not recursing anymore.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
Makefile | 21 ++++++++++-----------
configure | 6 +-----
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index 84ef881600..8a461534d9 100644
--- a/Makefile
+++ b/Makefile
@@ -526,15 +526,16 @@ $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed)
$(TARGET_DIRS_RULES):
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
-DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
-DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
-DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
-
-.PHONY: dtc/all
-dtc/all: .git-submodule-status dtc/libfdt dtc/tests
- $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
-
-dtc/%: .git-submodule-status
+LIBFDT_srcdir = $(SRC_PATH)/dtc/libfdt
+LIBFDT_objdir = dtc/libfdt
+LIBFDT_archive = $(LIBFDT_objdir)/libfdt.a
+include $(LIBFDT_srcdir)/Makefile.libfdt
+LIBFDT_objects = $(addprefix $(LIBFDT_objdir)/, $(LIBFDT_OBJS))
+.PHONY: libfdt
+libfdt: .git-submodule-status $(LIBFDT_archive)
+$(LIBFDT_archive): $(LIBFDT_objects)
+$(LIBFDT_objects): | $(LIBFDT_objdir)
+$(LIBFDT_objdir): .git-submodule-status
@mkdir -p $@
# Overriding CFLAGS causes us to lose defines added in the sub-makefile.
@@ -563,7 +564,6 @@ slirp/all: .git-submodule-status
# Compatibility gunk to keep make working across the rename of targets
# for recursion, to be removed some time after 4.1.
-subdir-dtc: dtc/all
subdir-capstone: capstone/all
subdir-slirp: slirp/all
@@ -821,7 +821,6 @@ distclean: clean
rm -rf $$d || exit 1 ; \
done
rm -Rf .sdk
- if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi
KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \
ar de en-us fi fr-be hr it lv nl pl ru th \
diff --git a/configure b/configure
index 22870f3867..eb50d50b0a 100755
--- a/configure
+++ b/configure
@@ -4278,10 +4278,6 @@ EOF
if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
fdt=git
mkdir -p dtc
- if [ "$pwd_is_source_path" != "y" ] ; then
- symlink "$source_path/dtc/Makefile" "dtc/Makefile"
- symlink "$source_path/dtc/scripts" "dtc/scripts"
- fi
fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
fdt_ldflags="-L\$(BUILD_DIR)/dtc/libfdt"
fdt_libs="$fdt_libs"
@@ -8151,7 +8147,7 @@ echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
if [ "$fdt" = "git" ]; then
- echo "config-host.h: dtc/all" >> $config_host_mak
+ echo "config-host.h: libfdt" >> $config_host_mak
fi
if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
echo "config-host.h: capstone/all" >> $config_host_mak
--
2.16.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Makefile: libfdt: build only the strict necessary
2020-04-08 7:02 [PATCH] Makefile: libfdt: build only the strict necessary Claudio Fontana
@ 2020-04-08 7:06 ` no-reply
2020-04-08 7:49 ` Claudio Fontana
2020-04-08 7:07 ` no-reply
2020-04-08 7:08 ` no-reply
2 siblings, 1 reply; 7+ messages in thread
From: no-reply @ 2020-04-08 7:06 UTC (permalink / raw)
To: cfontana; +Cc: peter.maydell, qemu-devel, laurent, cfontana, alex.bennee, david
Patchew URL: https://patchew.org/QEMU/20200408070231.20265-1-cfontana@suse.de/
Hi,
This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===
=== OUTPUT BEGIN ===
Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
cc -nostdlib -o dtc/libfdt/Makefile.libfdt.mo
cc: fatal error: no input files
compilation terminated.
make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
LD dtc/libfdt/Makefile.libfdt.mo
cc: fatal error: no input files
compilation terminated.
make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
real 0m0.585s
user 0m0.384s
The full log is available at
http://patchew.org/logs/20200408070231.20265-1-cfontana@suse.de/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Makefile: libfdt: build only the strict necessary
2020-04-08 7:02 [PATCH] Makefile: libfdt: build only the strict necessary Claudio Fontana
2020-04-08 7:06 ` no-reply
@ 2020-04-08 7:07 ` no-reply
2020-04-08 7:08 ` no-reply
2 siblings, 0 replies; 7+ messages in thread
From: no-reply @ 2020-04-08 7:07 UTC (permalink / raw)
To: cfontana; +Cc: peter.maydell, qemu-devel, laurent, cfontana, alex.bennee, david
Patchew URL: https://patchew.org/QEMU/20200408070231.20265-1-cfontana@suse.de/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===
=== OUTPUT BEGIN ===
Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
cc -nostdlib -o dtc/libfdt/Makefile.libfdt.mo
cc: fatal error: no input files
compilation terminated.
make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
LD dtc/libfdt/Makefile.libfdt.mo
cc: fatal error: no input files
compilation terminated.
make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
real 0m0.410s
user 0m0.216s
The full log is available at
http://patchew.org/logs/20200408070231.20265-1-cfontana@suse.de/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Makefile: libfdt: build only the strict necessary
2020-04-08 7:02 [PATCH] Makefile: libfdt: build only the strict necessary Claudio Fontana
2020-04-08 7:06 ` no-reply
2020-04-08 7:07 ` no-reply
@ 2020-04-08 7:08 ` no-reply
2 siblings, 0 replies; 7+ messages in thread
From: no-reply @ 2020-04-08 7:08 UTC (permalink / raw)
To: cfontana; +Cc: peter.maydell, qemu-devel, laurent, cfontana, alex.bennee, david
Patchew URL: https://patchew.org/QEMU/20200408070231.20265-1-cfontana@suse.de/
Hi,
This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===
=== OUTPUT BEGIN ===
Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
cc -nostdlib -o dtc/libfdt/Makefile.libfdt.mo
cc: fatal error: no input files
compilation terminated.
make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
LD dtc/libfdt/Makefile.libfdt.mo
cc: fatal error: no input files
compilation terminated.
make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
real 0m0.512s
user 0m0.320s
The full log is available at
http://patchew.org/logs/20200408070231.20265-1-cfontana@suse.de/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Makefile: libfdt: build only the strict necessary
2020-04-08 7:06 ` no-reply
@ 2020-04-08 7:49 ` Claudio Fontana
2020-04-08 9:08 ` Daniel P. Berrangé
0 siblings, 1 reply; 7+ messages in thread
From: Claudio Fontana @ 2020-04-08 7:49 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, alex.bennee, laurent, david
Hi,
On 4/8/20 9:06 AM, no-reply@patchew.org wrote:
> Patchew URL: https://patchew.org/QEMU/20200408070231.20265-1-cfontana@suse.de/
>
>
>
> Hi,
>
> This series failed the asan build test. Please find the testing commands and
> their output below. If you have Docker installed, you can probably reproduce it
> locally.
I can't reproduce this here running the commands (TEST SCRIPT) below..
>
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> export ARCH=x86_64
> make docker-image-fedora V=1 NETWORK=1
> time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
> === TEST SCRIPT END ===
>
> === OUTPUT BEGIN ===
> Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
hmm this is the include directive
include $(LIBFDT_srcdir)/Makefile.libfdt
is this test not getting the dtc submodule for some reason?
> cc -nostdlib -o dtc/libfdt/Makefile.libfdt.mo
Hmm..
> cc: fatal error: no input files
> compilation terminated.
> make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
> Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
> LD dtc/libfdt/Makefile.libfdt.mo
> cc: fatal error: no input files
> compilation terminated.
> make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
>
> real 0m0.585s
> user 0m0.384s
>
>
> The full log is available at
> http://patchew.org/logs/20200408070231.20265-1-cfontana@suse.de/testing.asan/?type=message.
> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Makefile: libfdt: build only the strict necessary
2020-04-08 7:49 ` Claudio Fontana
@ 2020-04-08 9:08 ` Daniel P. Berrangé
2020-04-08 10:09 ` Claudio Fontana
0 siblings, 1 reply; 7+ messages in thread
From: Daniel P. Berrangé @ 2020-04-08 9:08 UTC (permalink / raw)
To: Claudio Fontana; +Cc: peter.maydell, david, alex.bennee, qemu-devel, laurent
On Wed, Apr 08, 2020 at 09:49:56AM +0200, Claudio Fontana wrote:
> Hi,
>
> On 4/8/20 9:06 AM, no-reply@patchew.org wrote:
> > Patchew URL: https://patchew.org/QEMU/20200408070231.20265-1-cfontana@suse.de/
> >
> >
> >
> > Hi,
> >
> > This series failed the asan build test. Please find the testing commands and
> > their output below. If you have Docker installed, you can probably reproduce it
> > locally.
>
> I can't reproduce this here running the commands (TEST SCRIPT) below..
>
> >
> > === TEST SCRIPT BEGIN ===
> > #!/bin/bash
> > export ARCH=x86_64
> > make docker-image-fedora V=1 NETWORK=1
> > time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
> > === TEST SCRIPT END ===
> >
> > === OUTPUT BEGIN ===
> > Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
>
> hmm this is the include directive
>
> include $(LIBFDT_srcdir)/Makefile.libfdt
>
> is this test not getting the dtc submodule for some reason?
Note that this test script did not even get as far as trying to
build QEMU itself.
Starting from a clean checkout *WITHOUT* having run configure,
it is trying todo
make docker-image-fedora V=1 NETWORK=1
This should invoke the rules to launch docker, and then run
configure inside docker. Instead it is trying to build dtc.
So something in your changes has broken the ability to run
the docker make targets.
>
> > cc -nostdlib -o dtc/libfdt/Makefile.libfdt.mo
>
> Hmm..
>
> > cc: fatal error: no input files
> > compilation terminated.
> > make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
> > Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
> > LD dtc/libfdt/Makefile.libfdt.mo
> > cc: fatal error: no input files
> > compilation terminated.
> > make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
> >
> > real 0m0.585s
> > user 0m0.384s
> >
> >
> > The full log is available at
> > http://patchew.org/logs/20200408070231.20265-1-cfontana@suse.de/testing.asan/?type=message.
> > ---
> > Email generated automatically by Patchew [https://patchew.org/].
> > Please send your feedback to patchew-devel@redhat.com
> >
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Makefile: libfdt: build only the strict necessary
2020-04-08 9:08 ` Daniel P. Berrangé
@ 2020-04-08 10:09 ` Claudio Fontana
0 siblings, 0 replies; 7+ messages in thread
From: Claudio Fontana @ 2020-04-08 10:09 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: peter.maydell, david, alex.bennee, qemu-devel, laurent
On 4/8/20 11:08 AM, Daniel P. Berrangé wrote:
> On Wed, Apr 08, 2020 at 09:49:56AM +0200, Claudio Fontana wrote:
>> Hi,
>>
>> On 4/8/20 9:06 AM, no-reply@patchew.org wrote:
>>> Patchew URL: https://patchew.org/QEMU/20200408070231.20265-1-cfontana@suse.de/
>>>
>>>
>>>
>>> Hi,
>>>
>>> This series failed the asan build test. Please find the testing commands and
>>> their output below. If you have Docker installed, you can probably reproduce it
>>> locally.
>>
>> I can't reproduce this here running the commands (TEST SCRIPT) below..
>>
>>>
>>> === TEST SCRIPT BEGIN ===
>>> #!/bin/bash
>>> export ARCH=x86_64
>>> make docker-image-fedora V=1 NETWORK=1
>>> time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
>>> === TEST SCRIPT END ===
>>>
>>> === OUTPUT BEGIN ===
>>> Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
>>
>> hmm this is the include directive
>>
>> include $(LIBFDT_srcdir)/Makefile.libfdt
>>
>> is this test not getting the dtc submodule for some reason?
>
> Note that this test script did not even get as far as trying to
> build QEMU itself.
>
> Starting from a clean checkout *WITHOUT* having run configure,
> it is trying todo
>
> make docker-image-fedora V=1 NETWORK=1
>
> This should invoke the rules to launch docker, and then run
> configure inside docker. Instead it is trying to build dtc.
>
> So something in your changes has broken the ability to run
> the docker make targets.
Thanks, I can reproduce this now, will correct.
>
>>
>>> cc -nostdlib -o dtc/libfdt/Makefile.libfdt.mo
>>
>> Hmm..
>>
>>> cc: fatal error: no input files
>>> compilation terminated.
>>> make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
>>> Makefile:532: dtc/libfdt/Makefile.libfdt: No such file or directory
>>> LD dtc/libfdt/Makefile.libfdt.mo
>>> cc: fatal error: no input files
>>> compilation terminated.
>>> make: *** [dtc/libfdt/Makefile.libfdt.mo] Error 4
>>>
>>> real 0m0.585s
>>> user 0m0.384s
>>>
>>>
>>> The full log is available at
>>> http://patchew.org/logs/20200408070231.20265-1-cfontana@suse.de/testing.asan/?type=message.
>>> ---
>>> Email generated automatically by Patchew [https://patchew.org/].
>>> Please send your feedback to patchew-devel@redhat.com
>>>
>>
>>
>
> Regards,
> Daniel
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-08 10:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-08 7:02 [PATCH] Makefile: libfdt: build only the strict necessary Claudio Fontana
2020-04-08 7:06 ` no-reply
2020-04-08 7:49 ` Claudio Fontana
2020-04-08 9:08 ` Daniel P. Berrangé
2020-04-08 10:09 ` Claudio Fontana
2020-04-08 7:07 ` no-reply
2020-04-08 7:08 ` no-reply
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).