Commit Graph

69 Commits

Author SHA1 Message Date
Lucas De Marchi
db62153ea0 build-sys: try harder to shut up compiler wrt strict-aliasing
With -Wstrict-aliasing=2 we get the following warning:

	libkmod/libkmod-signature.c:124:20: note: in expansion of macro 'get_unaligned'
	  sig_len = be32toh(get_unaligned(&modsig->sig_len));

However there's nothing wrong with it. modsig->sig_len is uint32_t and
get_unaligned in this case returns uint32_t. There's notstrict aliasing
violation.
2014-03-24 23:50:24 -03:00
Lucas De Marchi
aa72284f83 build-sys: Remove bogus line causing warning
./configure: line 14316: xyes: command not found

We are not using have_manpages, so remove it.
2014-03-24 14:53:56 -03:00
Lucas De Marchi
bccb4b2545 build-sys: Do not require xsltproc for installation of man pages
Same reason as found in this commit to systemd:

	commit 4ca39b280fce3c60d2fdecbd478fd9bf7f9d3e64
	Author: Mike Gilbert <floppym@gentoo.org>
	Date:   Sun Feb 23 11:21:13 2014 -0500

	    configure: Do not require xsltproc for installation of man pages

	    The release tarballs ship with pre-generated man pages, so we do not
	    need xsltproc for a typical end-user build.

	    Developers will probably have xsltproc anyway, but if not they will now
	    encounter a build-time failure instead of an error in configure.
2014-03-06 02:07:20 -03:00
Lucas De Marchi
36c4bb928a kmod 16 2013-12-22 19:45:19 -02:00
Anders Olofsson
f5cc26c77d build: Allow disabling maintainer mode
This allows make rules for generated build files (i.e.  configure,
Makefile.in, ... ) to be skipped.  This is useful when
the source is stored without timestamps (for example in CVS or GIT).

When the build rules trigger to regenerate the build files, it tries to
use the same autotools version (currently 1.14) as was originally used
for the release.  Since many of our build machines run Debian Squeeze,
they only have autotools 1.11 available and the build fails.

Currently, we have to work around this by touching all the generated
files before building to avoid triggering the make rule. With this
patch, we would be able to just run configure with
--disable-maintainer-mode instead.  The patch sets the default to enable
to not change the default behavior.
2013-11-10 23:41:32 -02:00
Lucas De Marchi
b3e0a07566 build-sys: enable colored diagnostics if available 2013-10-26 02:54:21 -02:00
Lucas De Marchi
4c2dc16a2e build: remove check for typeof
It's used in so many places without checking, that's really pointless to
check for it in macro.h.

Also remove AC_C_TYPEOF from configure.ac since we don't use -ansi.
2013-09-06 11:31:35 -03:00
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