[Patchset 1/2] Single makefile
Mihail Konev
k.mvc at ya.ru
Sat Apr 1 07:25:16 UTC 2017
This was originally done in order to use subdir-objects to prevent automake
warnings (I didn't have the idea of .include.c files at the moment).
Here for rather illustrative purposes, as well as benchmarking against the meson.
Makes moving the library assignments out of configure.ac for speed of testing
feasible, but the latter should be doing this too.
Makes compilation errors print file paths relatively to the top build directory.
Avoids multiple "../" in compiler/linker arguments.
The rebuild ( touch os/backtrace.c; make ) speedup is only about 1/5 .. 1/4 on Linux.
On Solaris, the difference is 1~2 seconds.
XQuartz becomes slower (8 sec -> 9 sec).
Xvfb-only rebuild slows down too (3.8 -> 4.6 sec).
XWin becomes 43 -> 22 sec, but here the "make" and "bash" (the latter because
of libtool being a shell script) most likely need patching to use spawning
instead of fork-exec, after which the time would probably be comparable to
Linux.
Build changes:
- Documentation is disabled by default. (Is this wrong?)
This only gives 0.08 sec difference when rebuilding, however.
- C sources from Yacc/Lex files are now generated for all DDX-es regardless of whether
they are built or not. This is OK, because that's what the "make dist" did anyway
(was it rather a bug than a feature; i.e. should they have not been distributed?).
- No "make relink" necessary.
But modules are now rebuilt after the Xorg binary changes,
giving a verbosity burst at the end of rebuild.
- Libraries and binaries are put into the top of build directory.
- Module names are changed to reflect their source directories.
"make [un]install" now has to find-and-rename/remove them.
The last three patches only arguably fix "make distcheck":
- makefile: fix distcheck configure flags
This does not work for older automake versions
(and the motivation of LDADD -> DEPENDENCIES duplication in
makefiles was probably such a concern; so marking this arguable).
- hw/xfree86: fix install target for distcheck as non-root
Just unsure if this is correct/safe.
- xephyr: disable piglit tests
This is a hack needing the proper fix.
Includes a commit from master ( e337de2d488a124e5fee0fdcb882567b68f1767d ) for
the purpose of marking a "safe history point".
Not tested: Hurd, HAL, SELinux, Xvfb piglit
Mihail
-------------- next part --------------
e337de2d488a124e5fee0fdcb882567b68f1767d, on Linux, out-of-source:
Default configure:
'make -j4':
3m19.22s real 8m38.20s user 0m39.94s system
'make -j4 -r':
3m17.21s real 8m37.24s user 0m39.84s system
'touch .../os/backtrace.c; make -j4':
0m10.49s real 0m07.59s user 0m02.29s system
'touch .../os/backtrace.c; make -j4 -r':
0m09.15s real 0m06.67s user 0m01.87s system
'make install -j1'
0m06.26s real 0m03.94s user 0m01.72s system
'make install -j4'
0m05.98s real 0m03.94s user 0m01.75s system
'make install -j4 -r'
0m04.09s real 0m02.58s user 0m01.21s system
Xvfb only:
'make -j4':
1m48.49s real 5m15.46s user 0m22.70s system
'make install -j1'
0m01.96s real 0m01.35s user 0m00.53s system
'make install -j4'
0m01.91s real 0m01.38s user 0m00.50s system
'touch; make -j4':
0m03.87s real 0m02.95s user 0m00.78s system
'touch; make -j4 -r':
0m03.28s real 0m02.53s user 0m00.59s system
Single makefile, out-of-source:
Default configure:
'make -j4':
2m23.40s real 8m27.73s user 0m40.35s system
speedup: 28%
'make -j4 -r':
2m23.82s real 8m27.72s user 0m40.59s system
'touch $(top_srcdir)/os/backtrace.c; make -j4':
0m06.81s real 0m11.46s user 0m02.22s system
'touch $(top_srcdir)/os/backtrace.c; make -j4 -r':
0m05.85s real 0m10.59s user 0m02.15s system
speedup: 36%
'make install -j1'
0m06.10s real 0m05.19s user 0m00.74s system
'make install -j4'
0m04.81s real 0m05.28s user 0m00.74s system
'make install -j4 -r'
0m03.21s real 0m03.43s user 0m00.70s system
speedup: 21%
Default configure with
"configure.ac: disable documentation by default"
commit reverted:
'touch; make -j4':
0m06.89s real 0m11.65s user 0m02.22s system
1.1% slowdown from reverting
Xvfb only:
'touch; make -j4'
0m04.59s real 0m03.81s user 0m00.64s system
18% slowdown
'make install -j4'
0m03.42s real 0m03.67s user 0m00.42s system
79% slowdown
Linking commands:
rm hw/xfree86/Xorg
make -C hw/xfree86 Xorg
make: Entering directory '.../xserver/build/hw/xfree86'
/bin/sh ../../libtool --tag=CC --mode=link gcc -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/X11/dri -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/freetype2 -I../../../include -I../../include -I../../../Xext -I../../../composite -I../../../damageext -I../../../xfixes -I../../../Xi -I../../../mi -I../../../miext/sync -I../../../miext/shadow -I../../../miext/damage -I../../../render -I../../../randr -I../../../fb -I../../../dbe -I../../../present -fvisibility=hidden -DHAVE_XORG_CONFIG_H -fvisibility=hidden -I/usr/include/libdrm -g -O2 -pthread -export-dynamic -o Xorg sdksyms.o ../../dix/libmain.la ../../dix/dix.O ../../mi/libmi.la ../../os/os.O -lnettle -ldl -lunwind loader/libloader.la common/libcommon.la os-support/libxorgos.la parser/libxf86config.la dixmods/libdixmods.la modes/libxf86modes.la ramdac/libramdac.la ddc/libddc.la i2c/libi2c.la ../../composite/libcomposite.la ../../xfixes/libxfixes.la ../../Xext/libXext.la ../../dbe/libdbe.la ../../record/librecord.la ../../randr/librandr.la ../../render/librender.la ../../damageext/libdamageext.la ../../dri3/libdri3.la ../../present/libpresent.la ../../miext/sync/libsync.la ../../miext/damage/libdamage.la ../../Xi/libXi.la ../../xkb/libxkb.la dixmods/libxorgxkb.la dri/libdri.la dri2/libdri2.la ../../dri3/libdri3.la ../../miext/sync/libsync.la ../../mi/libmi.la ../../os/libos.la ../../Xext/libXvidmode.la -lpciaccess -ldrm -lpixman-1 -lXfont2 -lXau -lxshmfence -lXdmcp -lm -lm
rm Xorg
make Xorg
/bin/sh ./libtool --tag=CC --mode=link gcc -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/X11/dri -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/freetype2 -I../include -I./include -I../Xext -I../composite -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/sync -I../miext/shadow -I../miext/damage -I../render -I../randr -I../fb -I../dbe -I../present -fvisibility=hidden -DHAVE_XORG_CONFIG_H -fvisibility=hidden -I/usr/include/libdrm -g -O2 -pthread -export-dynamic -o Xorg hw/xfree86/Xorg-sdksyms.o ./libmain.la ./dix.O ./libmi.la ./os.O -lnettle -ldl -lunwind ./libxf_loader.la ./libxf_common.la ./libxf_os.la ./libxf_parser.la ./libxf_dixmods.la ./libxf_modes.la ./libxf_ramdac.la ./libxf_ddc.la ./libxf_i2c.la ./libcomposite.la ./libxfixes_main.la ./libXext_main.la ./libdbe.la ./librecord.la ./librandr.la ./librender.la ./libdamageext.la ./libdri3.la ./libpresent.la ./libmiext_sync.la ./libmiext_damage.la ./libXi_main.la ./libxkb.la ./libxf_dixmods_xkb.la ./libxf_dri.la ./libxf_dri2.la ./libdri3.la ./libmiext_sync.la ./libmi.la ./libos.la ./libXext_vidmode.la -lpciaccess -ldrm -lpixman-1 -lXfont2 -lXau -lxshmfence -lXdmcp -lm -lm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdea.sh
Type: application/x-sh
Size: 591 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170401/bcc66372/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sim1.txz
Type: application/octet-stream
Size: 47340 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170401/bcc66372/attachment-0001.obj>
More information about the xorg-devel
mailing list