build: move -Wno-long-long check to configure time

xlc reportedly doesn't support the `-Wno-long-long` flag. Detect that
at configure time instead of trying to fix it up at build time.

This enables the flag for both the library and the test suite instead
of just the test suite but that seems fine to me.

PR-URL: https://github.com/libuv/libuv/pull/2512
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
Ben Noordhuis 2019-10-14 15:14:30 +02:00 committed by cjihrig
parent e668e10acb
commit f9c35197e6
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
2 changed files with 1 additions and 4 deletions

View File

@ -140,11 +140,7 @@ EXTRA_DIST = test/fixtures/empty_file \
TESTS = test/run-tests TESTS = test/run-tests
check_PROGRAMS = test/run-tests check_PROGRAMS = test/run-tests
if OS390
test_run_tests_CFLAGS = test_run_tests_CFLAGS =
else
test_run_tests_CFLAGS = -Wno-long-long
endif
if SUNOS if SUNOS
# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers # Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers

View File

@ -32,6 +32,7 @@ CC_CHECK_CFLAGS_APPEND([-g])
CC_CHECK_CFLAGS_APPEND([-std=gnu89]) CC_CHECK_CFLAGS_APPEND([-std=gnu89])
CC_CHECK_CFLAGS_APPEND([-Wall]) CC_CHECK_CFLAGS_APPEND([-Wall])
CC_CHECK_CFLAGS_APPEND([-Wextra]) CC_CHECK_CFLAGS_APPEND([-Wextra])
CC_CHECK_CFLAGS_APPEND([-Wno-long-long])
CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter]) CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter])
CC_CHECK_CFLAGS_APPEND([-Wstrict-prototypes]) CC_CHECK_CFLAGS_APPEND([-Wstrict-prototypes])
# AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12. # AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12.