aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-06 04:44:05 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-11 18:31:00 +0800
commitb79f25753346a577c9ba0a3dca69bd9d9d72a020 (patch)
treeb126cf018240a668e5bb8b742029fd9632745c15 /INSTALL
parent4d9a4c02f9327338bb8dc890d26fbbeef956ba1b (diff)
downloadglibc-b79f25753346a577c9ba0a3dca69bd9d9d72a020.zip
glibc-b79f25753346a577c9ba0a3dca69bd9d9d72a020.tar.gz
glibc-b79f25753346a577c9ba0a3dca69bd9d9d72a020.tar.bz2
Add TEST_CC and TEST_CXX support
Support testing glibc build with a different C compiler or a different C++ compiler with $ ../glibc-VERSION/configure TEST_CC="gcc-6.4.1" TEST_CXX="g++-6.4.1" 1. Add LIBC_TRY_CC_AND_TEST_CC_OPTION, LIBC_TRY_CC_AND_TEST_CC_COMMAND and LIBC_TRY_CC_AND_TEST_LINK to test both CC and TEST_CC. 2. Add check and xcheck targets to Makefile.in and override build compiler options with ones from TEST_CC and TEST_CXX. Tested on Fedora 41/x86-64: 1. Building with GCC 14.2.1 and testing with GCC 6.4.1 and GCC 11.2.1. 2. Building with GCC 15 and testing with GCC 6.4.1. Support for GCC versions older than GCC 6.2 may need to change the test sources. Other targets may need to update configure.ac under sysdeps and modify Makefile.in to override target build compiler options. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL6
1 files changed, 6 insertions, 0 deletions
diff --git a/INSTALL b/INSTALL
index 24e3c8d..85c8e4c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -49,6 +49,12 @@ if 'CFLAGS' is specified it must enable optimization. For example:
$ ../glibc-VERSION/configure CC="gcc -m32" CFLAGS="-O3"
+ To test the GNU C Library with a different C compiler or a different
+C++ compiler, 'TEST_CC=COMPILER' and 'TEST_CXX=COMPILER' arguments can
+be passed to 'configure'. For example:
+
+ $ ../glibc-VERSION/configure TEST_CC="gcc-6.4.1" TEST_CXX="g++-6.4.1"
+
The following list describes all of the available options for
'configure':