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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
gcc versions 4.6 and earlier used to complain when a local variable
shadows a global function, 4.7 and above only complain if a local
variable shadows a global variable.
Fix this by checking whether gcc 4.7+ behavior is in place before
deciding to use -Werror=shadow in $(CFLAGS), by using a custom test
program source that shadows a global function with a local variable and
confirming that -Werror=shadow does not make the compile to break.
Tested:
- On gcc 4.7 and 4.8, confirmed nothing changed (other than the order of
the -Werror=shadow argument, going to the end of CFLAGS.)
- On gcc 4.6, confirmed by looking at the config.log output that the
check for -Werror=shadow failed and it was not included in CFLAGS.
- Ran `make V=1` to confirm -Werror=shadow was still in use, introduced
a bogus shadowing issue and confirmed it was caught when building with
a recent gcc.
The variables should be quoted inside [...] to avoid double macro
expansion. This is currently not an issue, since the values (-W...) are
not really macros, but we might as well just fix that issue now.
Tested by re-running autogen.sh and comparing the value of OUR_CFLAGS in
the generated Makefile. Ran a full build from a clean tree to confirm
no other issues were introduced.
gcc does not support testing for negated warnings. See here for details:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63499
This patch changes CC_CHECK_FLAG_APPEND to always test for the non-negated
warnings.
All tests for compiler support were failing with:
/usr/bin/ld: /tmp/ccwnVc2A.o: relocation R_ARM_MOVW_ABS_NC against `a' can not be used when making a shared object; recompile with -fPIC
Use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE to test for flags that
might succeed during compilation but not during linking. An example is gcc
compiled with libssp support but gnu-ld without it. In this case
-fstack-protector works fine during compilation but fails during linking
as several internal helpers are missing.
The affected files in this patch had inconsistent use of tabs vs. spaces
for indentation, and this patch eliminates the stray tabs.
Also, the opening brace of sigchld_hdl() in activate.c was moved so the
opening braces are consistent throughout the file.
Clang don't treat unknown warnings flags as an error, but rather as a
warning. The result is that the detection for whic CFLAGS are supported
by this compiler will not work, since the compilation will succeed.
With this patch we now successfully detect clang doesn't support
-Wlogical-op, as opposed to previous behavior:
checking if clang supports flag -Wlogical-op in envvar CFLAGS... no
We use this macro only for LDFLAGS and CFLAGS, so it's safe to stash
-Werror there.
This removes some warnings when bootstrapping. The warnings were introduced
in autoconf 2.68. Reference:
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html
The following code
AC_COMPILE_IFELSE([
<MY C CODE HERE>
], ...)
is changed to
AC_COMPILE_IFELSE(
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
<MY C CODE HERE>
])], ...)