3 Aug 2012 17:22
Add --no-sysroot-suffix driver option
Joseph S. Myers <joseph <at> codesourcery.com>
2012-08-03 15:22:57 GMT
2012-08-03 15:22:57 GMT
Some GCC configurations use SYSROOT_SUFFIX_SPEC (generally generated by gcc/config/print-sysroot-suffix.sh or a variant on that script) to handle multilibs each of which uses its own sysroot to have its own variant of the C library. Usually such variants, built for different -mcpu= or similar options, can share the same headers; where they cannot (e.g. glibc and uClibc multilibs), SYSROOT_HEADERS_SUFFIX_SPEC can be used to select the sysroot used for headers. Although this sysroot suffix arrangement is convenient for building tools with multiple C library variants, it's less convenient for a user wishing to substitute their own sysroot using a --sysroot option. The --sysroot option refers to the toplevel sysroot directory, and suffixes are added to it. This is appropriate when building GCC itself (a single --sysroot= option can be used when building runtime libraries, and for each multilib it will end up using the right subdirectory of the build-time toplevel sysroot automatically). But a user is more likely to have copied just the subdirectory relevant to their system, and then maybe added extra libraries to it, so in that case the automatic addition of the suffix is inconvenient. This patch adds a --no-sysroot-suffix option for use in the case where a user has a single self-contained sysroot for a compiler configured with sysroot suffixes. Bootstrapped with no regressions on x86_64-unknown-linux-gnu (as a sanity check, since that doesn't use sysroots) and tested with a cross to sh-linux-gnu that the option does have the desired effect of disabling suffixes and so allowing single-sysroot copies to be used with --sysroot. OK to commit? 2012-08-03 Joseph Myers <joseph <at> codesourcery.com>(Continue reading)
RSS Feed