Commit Graph

112 Commits

Author SHA1 Message Date
Thomas Petazzoni dc8ed09f8f Add configure check for _Static_assert()
Commit 8efede20ef ("Use _Static_assert") introduced the usage of
_Static_assert(). However, _Static_assert() is a fairly new thing,
since it was introduced only in gcc 4.6. In order to support older
compilers, this patch adds a configure.in test that checks whether
_Static_assert() is usable or not, and adjust the behavior of the
assert_cc() macro accordingly.
2013-09-06 11:06:19 -03:00
Lucas De Marchi 18811d22e9 kmod 15 2013-08-22 10:44:08 -03:00
Lucas De Marchi 80cf2c8f05 build: Install bash completion data 2013-07-30 14:45:21 -03:00
Lucas De Marchi 3b38c7fcb5 kmod 14 2013-07-03 12:42:04 -03:00
Lucas De Marchi b7016153ec build-sys: do not allow --enable static
Do the same as done in systemd by Cristian Rodríguez
<crrodriguez@opensuse.org>. We use private symbols, not namespaced. So
don't pretend we support static linking.
2013-06-06 11:48:38 -03:00
Lucas De Marchi abb910eb9d kmod 13 2013-04-09 19:35:32 -03:00
Lucas De Marchi 8edd5bb292 build-sys: Always enable parallel tests
Automake < 1.13 doesn't enable parallel tests by default, so add it to our
automake options.
2013-04-09 12:02:37 -03:00
Lucas De Marchi 55112d19f7 libkmod: Move finit_module() definition to missing.h
Check for finit_module() and don't use our own static inline function if
there's such function in libc (or another lib).

In testsuite we need to unconditionally define HAVE_FINIT_MODULE because
we want to override this function, and never use the static inline one
in missing.h
2013-04-09 04:38:27 -03:00
Cristian Rodríguez 41a51c2af9 libkmod: Use secure_getenv if available
"The secure_getenv() function is intended for use in general-purpose
libraries to avoid vulnerabilities that could occur if set-user-ID or
set-group-ID programs accidentally trusted the environment."
2013-04-04 15:58:29 -03:00
Kees Cook 144d1826f1 libkmod: add finit_module logic
When a module is being loaded directly from disk (no compression, etc),
pass the file descriptor to the new finit_module() syscall. If the
finit_module syscall is exported by the kernel syscall headers, use it.
Additionally, if the kernel's module.h file is available, map kmod flags
to finit_module flags.
2013-02-19 19:19:51 -03:00
Lucas De Marchi 6feba02878 kmod 12 2012-12-05 01:39:17 -02:00
Lucas De Marchi c599606f75 kmod 11 2012-11-08 02:30:21 -02:00
Lucas De Marchi caaf438cb6 build-sys: use AS_IF autoconf macro
Just for consistency with the rest.
2012-10-23 10:45:10 -02:00
Sami Kerola 5c61b1491e build-sys: require xsltproc when manpages are enabled
Before this commit the build system failed at late state with
non-helpful message when xsltproc was not available.

Making all in man
  GEN      depmod.d.5
/bin/sh: --nonet: command not found
make[2]: *** [depmod.d.5] Error 127
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
2012-10-22 16:06:04 -02:00
Dave Reisner c5b37dba89 build-sys: Remove --with-rootprefix option
This is a broken option that only leads to misery and incompatabilities
with other systems. Kbuild doesn't come close to supporting directories
other than /lib/modules with several targets simply failing without
hacky fixes. Simply remove the option and all traces of it, as it
doesn't make sense in today's world.
2012-10-02 00:27:31 -03:00
Lucas De Marchi 4075860264 kmod 10 2012-09-06 16:26:53 -03:00
Lucas De Marchi 382de85c94 build-sys: add 'man' entry in summary 2012-07-31 09:51:48 -03:00
Colin Walters 8631552d3d build-sys: Add --disable-manpages option
1) Embedded systems often don't want man pages on the
   target; rather than pointlessly building them, then ignoring
   the result, allow just not building them at all
2) When bootstrapping an operating systems, documentation is the
   source of many cyclical dependencies, and allowing it to
   be explicitly disabled is useful for earlier build passes.
2012-07-31 09:45:59 -03:00
Lucas De Marchi 62081c0f68 kmod 9 2012-06-19 19:46:53 -03:00
Lucas De Marchi 46684bc2d9 kmod 8 2012-04-19 11:21:00 -03:00
Lucas De Marchi 8885ced062 kmod 7 2012-03-19 08:23:14 -03:00
Lucas De Marchi e48f37657d build-sys: don't set CFLAGS and LDFLAGS
These variables are supposed to be set by user. What we can do in
configure is to set another variable and AC_SUBST() it. Then in
Makefile.am we assign it to AM_{CFLAGS,LDFLAGS}. This way user can
always override their values, in configure or make phase.

Reference: http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
2012-03-19 01:17:05 -03:00
Lucas De Marchi 3ef7208ecf build-sys: re-organize configure.ac 2012-03-17 11:07:10 -03:00
Randy Witt 1701b1b46f configure.ac: Move link only flags out of CFLAGS and into LDFLAGS.
On the ARM gcc 4.2.2 I'm using I get many
"--as-needed: linker input file unused because linking not done"
style errors when libtool is using compile mode.

In order to silence these warnings and be "correct", the flags that
only make sense for linking were moved into LDFLAGS.
2012-03-17 03:34:08 -03:00
Lucas De Marchi 26906fe73e kmod 6 2012-03-02 22:34:36 -03:00
Lucas De Marchi bb05bc8ac1 Move repository to kernel.org 2012-02-24 01:58:20 -02:00
Lucas De Marchi d005aeb752 Check if libc has __xstat
uClibc doesn't use __xstat. Check if it exists, otherwise don't export
the override function.
2012-02-08 20:29:52 -02:00
Lucas De Marchi e479598b7d kmod 5 2012-02-06 20:34:33 -02:00
Lucas De Marchi 80f9e02382 testsuite: add skeleton 2012-01-26 16:05:04 -02:00
Lucas De Marchi 6068aaaea8 Check if struct stat has mtim member
Not all libc's have a mtim member in struct stat (dietlibc doesn't).
Change ts_usec() to receive a struct stat as parameter and implement it
accordingly for both cases.
2012-01-17 12:22:55 -02:00
Lucas De Marchi b53b7e3282 kmod 4 2012-01-16 16:53:04 -02:00
Lucas De Marchi 904b57d022 build-sys: build man pages 2012-01-12 14:21:22 -02:00
Lucas De Marchi 4fb900c09e build-sys: allow building without having gtk-doc installed 2012-01-10 15:31:58 -02:00
Lucas De Marchi 63dc83291c build-sys: do not run configure in autogen.sh 2012-01-09 13:00:28 -02:00
Lucas De Marchi 646b83b841 doc: add gtk-doc to generate documentation
Current limitation is horrible no support to sections: we have to to
have separate header files or to maintain the libkmod-sections.txt file.
We are doing the latter.
2012-01-09 05:28:57 -02:00
Lucas De Marchi b30a71b8e8 kmod 3 2012-01-05 08:16:28 -02:00
Jan Engelhardt b182f8fb5e Support for loading Xz-compressed modules 2011-12-24 20:26:22 +01:00
Jan Engelhardt 5a51a357a8 build: use AC_ARG_WITH for zlib
Since it selects an external dependency for inclusion, AC_ARG_WITH
is preferred (autoconf.info 15.2 "Working with external software").
2011-12-24 20:25:54 +01:00
Jan Engelhardt 7b3a74fc67 build: use pkgconfig to detect zlib
build: explicitly call PKG_PROG_PKG_CONFIG

Per the manual page, PKG_PROG_PKG_CONFIG needs to be invoked
explicitly if PKG_CHECK_MODULES might not happen (it is indeed stowed
in an AS_IF in kmod). Without this, funny failures can occur.
(As it did.)
2011-12-24 20:25:21 +01:00
Lucas De Marchi cfb908bf66 build-sys: use AS_IF 2011-12-23 12:03:19 -02:00
Lucas De Marchi 769becb5db tools: kmod: Add handling of compat modinfo 2011-12-23 03:09:05 -02:00
Kay Sievers e79bf83b06 introduce --with-rootlibdir=DIR
Support the installation of the shared library in the rootfs --rootlibdir=,
while the development symlink stays in --libdir=.
2011-12-22 19:08:04 -02:00
Lucas De Marchi c72f79b465 Remove useless warning causing trouble in sparc64
-Wcast-align is not that useful and just generates lots of warnings in
architectures like sparc64.
2011-12-21 20:10:43 -02:00
Kay Sievers 9faa7b376c do not (mis-)use the config file generator for non-autobuild stuff
"Similarly, you should not rely on AC_CONFIG_FILES to replace bindir
and friends in your shell scripts and other files; instead, let make
manage their replacement."

http://www.gnu.org/software/autoconf/manual/autoconf.html#Makefile-Substitutions
2011-12-21 11:50:04 -02:00
Lucas De Marchi acc18b1451 kmod 2 2011-12-20 23:48:46 -02:00
Lucas De Marchi 7ea6eddda2 build-sys: do not use some compile flags by default 2011-12-20 19:45:59 -02:00
Lucas De Marchi 0c5fad937a build-sys: default to "" as rootprefix 2011-12-20 16:52:21 -02:00
Gustavo Sverzut Barbieri 1e482783ad configure: disable static zlib build.
It was not being done correctly, disable until we find a way for
libtool to cooperate.
2011-12-20 16:33:26 -02:00
Kay Sievers a308abec37 introduce --with-rootprefix=DIR
Configure the location of the rootfs directories and use it
to find (/usr)/lib/modules and (/usr)/lib/modprobe.d.
2011-12-20 16:22:07 -02:00
Jan Engelhardt a597c8bbf5 build: use dist-xz
It's 2011 already.
2011-12-20 13:48:44 -02:00
Gustavo Sverzut Barbieri 708624a4eb ELF: initial support for modinfo and strip of modversions and vermagic.
Needs testing, but should work.
2011-12-19 15:06:49 -02:00
Gustavo Sverzut Barbieri 3d8226edfe implement zlib module loading. 2011-12-17 19:43:11 -02:00
Lucas De Marchi e17cc3afcc Add address of mailing list 2011-12-16 04:11:25 -02:00
Luis Felipe Strano Moraes fe8bf3b009 Do not depend on AM_SILENT_RULES if it is not available. 2011-12-14 16:19:03 -02:00
Lucas De Marchi cb48c9b2e6 Rename project from libkmod to kmod 2011-12-12 16:54:18 -02:00
Lucas De Marchi 7c41c2dd8c build-sys: replace spaces with tabs 2011-12-12 13:39:07 -02:00
Lucas De Marchi 1dcac9112f build-sys: move remaining warning flags to configure 2011-12-12 13:37:13 -02:00
Gustavo Sverzut Barbieri 72c51a9e4d add lsmod, insmod and rmmod tools.
these tools are compatible with module-init-tools (except insmod does
not take data from stdin).
2011-12-11 20:58:22 -02:00
Gustavo Sverzut Barbieri 822ce2344d beef compile flags.
Beef the compile flags by using the same set recommended by systemd,
it uses attribute.m4 from the xine project to check supported flags.
2011-12-11 20:58:22 -02:00
Lucas De Marchi 648a842bfd Add some good practices to autofoo 2011-11-22 17:47:52 -02:00
Lucas De Marchi 586fc304d8 Rename libabc to libkmod 2011-11-21 14:35:35 -02:00
Lucas De Marchi ecd40ee499 Import skeleton from libabc 2011-11-21 12:35:15 -02:00