summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-11-01 19:23:12 -0500
committerZack Weinberg <zackw@panix.com>2020-11-01 19:51:47 -0500
commit33c3a47c04ab70a4dd54963fe433a171bc03747f (patch)
tree906b142092f4fcaeacf0d4ae05d0c9fe31809b85 /NEWS
parentbf19f95cf4766c8a22583dfdbbbbc67a97c4b6b0 (diff)
downloadautoconf-33c3a47c04ab70a4dd54963fe433a171bc03747f.tar.gz
Don’t search for X11 when cross compiling (#110345)
This is undesirable because X11 development headers and libraries found by searching /usr are much more likely to belong to the build operating system than the host operating system (being cross-compiled for). A particularly problematic case, from the original bug report, is “using a sysroot where the target is binary compatible with the host. In this case AC_PATH_X will happily look at /usr and say that yes, X is available, even if the sysroot doesn't have X.” To cross-compile X client applications, the recommended procedure is to put X11 headers and libraries for the host system in the cross compiler’s default search path; alternatively, --x-includes and --x-libraries can be used. Fixes bug #110345. Problem reported by Ross Burton. * lib/autoconf/libs.m4 (_AC_PATH_X): Before doing anything else, see whether a test compilation with no special options (just -lX11) will work. If it doesn’t, only invoke _AC_PATH_X_XMKMF and _AC_PATH_X_DIRECT when not cross compiling.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS11
1 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 42095344..4e2d5a10 100644
--- a/NEWS
+++ b/NEWS
@@ -329,6 +329,17 @@ GNU Autoconf NEWS - User visible changes.
*** AC_CHECK_DECL and AC_CHECK_DECLS will now detect missing declarations for
library functions that are also Clang compiler builtins.
+*** AC_PATH_X and AC_PATH_XTRA don’t search for X11 when cross-compiling.
+
+ Libraries and headers found by running xmkmf or searching /usr/X11,
+ /usr/X11R7, etc. are likely to belong to a native X11 installation
+ for the build machine and to be inappropriate for cross compilation.
+
+ To cross-compile programs that require X11, we recommend putting the
+ headers and libraries for the host system in your cross-compiler’s
+ default search paths. Alternatively, use configure’s --x-includes
+ and --x-libraries command line options to tell it where they are.
+
*** AC_PROG_CC is now defined via AC_DEFUN_ONCE.
This means configure scripts will no longer check repeatedly for the