IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Commit dc427d50d9 enabled a number of extra
warning flags through configure.ac. The configure script will determine
dynamically if CC supports these flags before adding them to WARN_CFLAGS.
ioctlsort is compiled with CC_FOR_BUILD, rather than CC. Nevertheless,
the flags passed to this compilation also include WARN_CFLAGS (through
AM_CFLAGS). This is incorrect: in a cross-compilation use case, CC
and CC_FOR_BUILD are not the same. The former is the cross-compiler,
the latter is the host compiler. Both may be of different versions
and support different warning flags.
In particular, this posed a problem when cross-compiling with a host
compiler gcc 4.1, which does not support all the new flags:
/usr/bin/gcc -DHAVE_CONFIG_H -I./linux/arm -I./linux/arm -I./linux
-I./linux -I. -I. -I/host-sysroot/usr/include -Wall -Wempty-body
-Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op
-Wmissing-parameter-type -Wnested-externs -Wold-style-declaration
-Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings -O2
-I/host-sysroot/usr/include -DIOCTLSORT_INC=\"ioctls_all0.h\" -c -o
ioctlsort0.o ./ioctlsort.c
cc1: error: unrecognized command line option "-Wempty-body"
cc1: error: unrecognized command line option "-Wignored-qualifiers"
cc1: error: unrecognized command line option "-Wlogical-op"
cc1: error: unrecognized command line option "-Wmissing-parameter-type"
cc1: error: unrecognized command line option "-Wold-style-declaration"
cc1: error: unrecognized command line option "-Wtype-limits"
make[2]: *** [ioctlsort0.o] Error 1
* Makefile.am (AM_CFLAGS_FOR_BUILD, AM_CPPFLAGS_FOR_BUILD): New
variables.
(ioctlsort_CPPFLAGS): Use AM_CPPFLAGS_FOR_BUILD instead of AM_CPPFLAGS.
(ioctlsort_CFLAGS): Use AM_CFLAGS_FOR_BUILD instead of AM_CFLAGS.
(ioctlsort_LDFLAGS): Use AM_LDFLAGS_FOR_BUILD instead of AM_LDFLAGS.
* m4/ax_prog_cc_for_build.m4 (AX_PROG_CC_FOR_BUILD): Redirect
WARN_CFLAGS and gl_unknown_warnings_are_errors, call st_WARN_CFLAGS,
substitute WARN_CFLAGS_FOR_BUILD.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>