diff --git a/configure.ac b/configure.ac index 78ab380..a88f7c0 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AM_CONDITIONAL(BUILD_TESTS, [test "x$HAVE_CHECK" = "xyes"]) if test "x$GCC" = "xyes"; then - GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden" + GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -pipe -fno-common -fno-strict-aliasing -ffunction-sections -fdata-sections -fstack-protector -fno-strict-aliasing -fdiagnostics-show-option -fno-common" fi AC_SUBST(GCC_CFLAGS) diff --git a/libevdev/Makefile.am b/libevdev/Makefile.am index 5ebbd42..64adf58 100644 --- a/libevdev/Makefile.am +++ b/libevdev/Makefile.am @@ -11,7 +11,14 @@ libevdev_la_SOURCES = \ libevdev-uinput-int.h \ libevdev.c -libevdev_la_LDFLAGS = -version-info $(LIBEVDEV_LT_VERSION) -export-symbols-regex '^libevdev_' $(GCOV_LDFLAGS) +libevdev_la_LDFLAGS = \ + -version-info $(LIBEVDEV_LT_VERSION) \ + -export-symbols-regex '^libevdev_' \ + $(GCOV_LDFLAGS) \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,-z,relro \ + -Wl,-z,now libevdevincludedir = $(includedir)/libevdev-1.0/libevdev libevdevinclude_HEADERS = libevdev.h libevdev-uinput.h