Commit graph

20 commits

Author SHA1 Message Date
Peter Hutterer
7421760eae Require check 0.9.9
0.9.9 is the first released version with fixed ck_assert_* macros that don't do
multiple expansion.

http://sourceforge.net/p/check/code/596/

Reported-by: Martin Minarik <minarik11@student.fiit.stuba.sk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-11 12:07:51 +10:00
David Herrmann
14ac764ec8 build: remove -fstack-protector
If gcc is built without libssp support, it loudly fails linking due to
missing __stack_chk_*() helpers. Unfortunately, gcc isn't smart enough to
disable it automatically.

systemd recently got a CC_CHECK_FLAG_APPEND helper to work around such
issues:
  http://cgit.freedesktop.org/systemd/systemd/tree/m4/attributes.m4

I didn't want to add it now, so let's just drop -fstack-protector. If we
want it, we can try adding it later again.

This partially reverts:
  commit 43752ec17d
  Author: David Herrmann <dh.herrmann@gmail.com>
  Date:   Sun Sep 1 17:45:04 2013 +0200

      Add some gcc/ld optimizations and magic

All other gcc/ld options are kept.

Reported-by: Giovanni Campagna <gcampagn@redhat.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-10 10:18:06 +10:00
Giovanni Campagna
5b28e0292d configure: add missing comma
Without that, it becomes impossible to build without gcov.

Signed-off-by: Giovanni Campagna <scampa.giovanni@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-10 10:01:19 +10:00
Peter Hutterer
0b712e6f86 Check for GNU ld and use the flags depending on the outcome
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-09-04 07:54:09 +10:00
David Herrmann
95df174f06 Remove -g from default GCC_CFLAGS
-g should be set by debugging-options or in the default CFLAGS="", we
shouldn't force it in GCC_CFLAGS.

Reported-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-03 07:31:40 +10:00
David Herrmann
43752ec17d Add some gcc/ld optimizations and magic
There are several gcc/ld flags that optimize size and performance without
requiring explicit code changes. In no particular order, this adds:
 - gcc -pipe to avoid temporary files and use pipes during compilation
 - gcc -fno-common avoids putting uninitialized global variables not
   marked as "extern" into a common section. This catches compilation
   errors if we didn't mark global variables explicitly as "extern".
 - gcc -fno-strict-aliasing allows us to use unions for some binary magic.
   Otherwise, -O2 might assume that two different types never point at the
   same memory. We currently don't rely on this but it's common practice
   so avoid any non-obvious runtime errors later.
 - gcc -ffunction-sections and -fdata-sections put each function and
   variable into a separate section. This enables ld's --gc-sections to
   drop any unused sections (sections which aren't referenced from an
   exported section). This is very useful to avoid putting dead code into
   DSOs. We can now link any helper function into libevdev and the linker
   removes all of them if they're unused.
 - gcc -fstack-protector adds small stack-corruption protectors in
   functions which have big buffers on the stack (>8bytes). If the
   stack-protectors are corrupted, the process is aborted. This is highly
   useful to debug stack-corruption issues which often are nearly
   impossible to catch without this.
 - ld --as-needed drops all linked libraries that are not actually
   required by libevdev. So we can link to whatever we want and the linker
   will drop everything which is not actually used.
 - ld -z now, resolve symbols during linking, not during runtime.
 - ld -z relro, add relocation-read-only section. This allows to put
   read-only global variables and alike into a read-only section. This is
   useful for variables that need a relocation and thus cannot be
   explicitly put into a read-only section. This option tells the linker
   to mark them read-only after relocations are done. (that's why -z now
   makes sense in combination with this)

All of these options are common in other open-source projects, including
systemd and weston. Don't ask me why they are not marked as default..

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-03 07:31:33 +10:00
Peter Hutterer
a8871e7aea Use AC_USE_SYSTEM_EXTENSIONS
Defines _GNU_SOURCE for us.
http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 13:54:50 +10:00
Peter Hutterer
cc2eaec4ed test: switch udev backend over to new libevdev-uinput bits
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 13:54:49 +10:00
Peter Hutterer
9b924d26eb configure.ac: Drop a superfluous variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 13:02:50 +10:00
Peter Hutterer
1619613414 Make the tests optional to drop unneeded dependencies
libevdev has no external dependencies and both check and libudev are
only required for running the unit-tests. Make them optional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-08-13 07:11:50 +10:00
Peter Hutterer
d8d8e75197 libevdev 0.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-08 13:21:04 +10:00
Peter Hutterer
d0de78cb8c libevdev 0.2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-25 09:00:59 +10:00
Peter Hutterer
a482fd9256 libevdev 0.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-22 10:50:20 +10:00
Peter Hutterer
479e16725d Use doxygen instead of man pages
Doxygen is bad for man pages, but having an online API documentation
is better and easier to maintain.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 10:41:54 +10:00
Peter Hutterer
b06f6e9d41 Hook up gcov
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 10:41:54 +10:00
Peter Hutterer
7c860d6002 Set up a test harness
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:33 +10:00
Peter Hutterer
fe34f7cff7 Move libevdev-events over to a tools directory
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:32 +10:00
Peter Hutterer
a3f89c647d Drop requirement on ffi - copy/paste leftover
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:32 +10:00
Peter Hutterer
e8e4bc37c7 Add man-pages for the current interface
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-03 14:15:14 +10:00
Peter Hutterer
a3255d3ec7 libevdev is a library to handle evdev devices
Two main goals of this library:
- 'transparently' handle SYN_DROPPED events
- avoid errors in ioctl handling by providing a simpler interface.

Keeps a cached copy of the device for quick querying.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-05-29 15:33:21 +10:00