Skip to content

1.0: libwacom is not LTO ready #152

Description

@kloczek

When compiled with LTO optimisation linkiong of the test suite fails:

[tkloczko@barrel test]$ make
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -Os -no-install -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin -o test-deprecated test-deprecated.o ../libwacom/libwacom.la  -ldl 
libtool: link: gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -Os -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin -o test-deprecated test-deprecated.o  ../libwacom/.libs/libwacom.so -lgudev-1.0 -lgobject-2.0 -lglib-2.0 -ldl -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libwacom-0.99.901/libwacom/.libs
/usr/bin/ld: /tmp/test-deprecated.thrYTc.ltrans0.ltrans.o: in function `main':
/home/tkloczko/rpmbuild/BUILD/libwacom-0.99.901/test/test-deprecated.c:77: undefined reference to `libwacom_match_destroy@LIBWACOM_0.33'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/libwacom-0.99.901/test/test-deprecated.c:78: undefined reference to `libwacom_match_new@LIBWACOM_0.33'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/libwacom-0.99.901/test/test-deprecated.c:79: undefined reference to `libwacom_error_set@LIBWACOM_0.33'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/libwacom-0.99.901/test/test-deprecated.c:80: undefined reference to `libwacom_stylus_destroy@LIBWACOM_0.33'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/libwacom-0.99.901/test/test-deprecated.c:81: undefined reference to `libwacom_update_match@LIBWACOM_0.33'
collect2: error: ld returned 1 exit status
make: *** [Makefile:664: test-deprecated] Error 1
make: Target 'all' not remade because of errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions