• Sam Protsenko's avatar
    tests: Fix incorrect order of linker flags · b4c0354a
    Sam Protsenko authored
    Libraries flags (like -lglib-2.0) should be provided in the end of
    compile command. It's not how it's done right now in tests/Makefile.am,
    because _LDFLAGS is used where we should actually use _LDADD. Due to
    this, on Ubuntu 16.04 with GCC 5 we have next linking errors:
    
        gcc -lxcb-damage -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb
            -lxcb-xtest -lxcb -lxcb-shm -lxcb -lxcb-util -lxcb -lgtk-x11-2.0
            -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0
            -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0
            -lfontconfig -lfreetype -lspice-server -lglib-2.0 -lpixman-1
            -o x11spice_test tests.o x11spice_test.o xcb.o xdummy.o util.o
            main.o  -laudit
    
        tests.o: In function `check_binary':
        src/tests/tests.c:83: undefined reference to `g_log'
        src/tests/tests.c:84: undefined reference to `g_test_skip'
        tests.o: In function `test_common_start':
        src/tests/tests.c:46: undefined reference to `g_test_build_filename'
        src/tests/tests.c:56: undefined reference to `g_log'
        src/tests/tests.c:57: undefined reference to `g_test_fail'
        src/tests/tests.c:39: undefined reference to `g_test_skip'
        src/tests/tests.c:48: undefined reference to `g_log'
        src/tests/tests.c:49: undefined reference to `g_test_fail'
    
    Use _LDADD instead of _LDFLAGS for libs, so that libraries are
    specified in the end of compile line.
    Signed-off-by: 's avatarSam Protsenko <joe.skb7@gmail.com>
    b4c0354a
Name
Last commit
Last update
..
Makefile.am Loading commit data...
expected.grid.1024x768.ppm Loading commit data...
expected.grid.1280x1024.ppm Loading commit data...
expected.grid.1920x1080.ppm Loading commit data...
expected.grid.640x480.ppm Loading commit data...
expected.grid.800x600.ppm Loading commit data...
gui.supp Loading commit data...
main.c Loading commit data...
options.supp Loading commit data...
tests.c Loading commit data...
tests.h Loading commit data...
util.c Loading commit data...
util.h Loading commit data...
x11perf1 Loading commit data...
x11spice_test.c Loading commit data...
x11spice_test.h Loading commit data...
xcb.c Loading commit data...
xcb.h Loading commit data...
xdummy.c Loading commit data...
xdummy.h Loading commit data...