-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mistakes in autotools code (configure.ac) #5067
Comments
For (1), yes that seems correct. For (2), that seems insufficient. On my machine:
Checking older gcc versions it seems configure is okay:
|
BTW, why is (2) a problem in your case? The number logic makes 1.2.3 into "102" but that's intended. It should work fine for gcc < 7. |
No problem for me anymore, thanks. (2) - If it intended - ok. Translation of version 1.2.3 -> 102 confused me a little . |
The CURL_CHECK_COMPILER_GNU_C function sets the number to MAJOR*100 + MINOR and ignores the patch version, and since gcc version 7 it only sets it to MAJOR*100. Reported-by: Stepan Efremov Ref: #5067
For (2) it's not really a mistake either since nothing depends on the minor version to be in the number, so I made sure to better document how the number is created in #5069 |
👍 |
operating system
CentOS 6 with gcc 4.9.2.
curl/libcurl version
upstream (commit 94ced8e)
I did this
Add this line between 64-65 and 275-276 in configure.ac:
echo "Compiler info: $compiler_id, $compiler_num\n"
./buildconf && ./configure --enable-werror
I expected the following
Some compiler id and version number (492) in output
I got
Empty $compiler_id, $compiler_num at first echo
And wierd $compiler_num (= 409) at second
Problems and possible solutions:
if test "$compiler_num" -ge "500"; then
is always false, because compiler_num and compiler_id will defined only after CURL_CHECK_COMPILER macro.
As solution: put code about CURL_CFLAG_EXTRAS after CURL_CHECK_COMPILER.
The text was updated successfully, but these errors were encountered: