diff options
author | Alexey Neyman <stilor@att.net> | 2016-03-15 18:51:56 (GMT) |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2016-04-02 01:15:39 (GMT) |
commit | 62d357d3c0756ec0f220e9cf3a874e591548a65c (patch) | |
tree | e175a1b85cd22bb78595df84cd453fe7e9015b5c /scripts/crosstool-NG.sh.in | |
parent | 2c7f7cf84784dd86ce03665a7e65de927e03c23e (diff) |
Unbreak static cross-gdb.
GDB's configure mishandles the libexpat.{so,a} libraries when it is
given -static in CFLAGS AND --with-libexpat-prefix in configure's args:
it checks for <prefix>/lib/libexpat.so and finding that, attempts to
link it as `gcc -static .. conftest.c <prefix>/lib/libexpat.so`; this
obviously fails (.so cannot be statically linked), so configure assumes
libexpat is unusable. Thus, --with-libexpat-prefix is dangerous and
should be avoided; instead, configure should find the libraries via the
supplied CC/LD definitions.
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r-- | scripts/crosstool-NG.sh.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 9297e3b..3c193c3 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -509,6 +509,8 @@ if [ -z "${CT_RESTART}" ]; then CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_CFLAGS_FOR_HOST}" CT_LDFLAGS_FOR_HOST= CT_LDFLAGS_FOR_HOST+=" ${CT_EXTRA_LDFLAGS_FOR_HOST}" + CT_CFLAGS_FOR_HOST+=" -I${CT_HOST_COMPLIBS_DIR}/include" + CT_LDFLAGS_FOR_HOST+=" -L${CT_HOST_COMPLIBS_DIR}/lib" CT_DoLog DEBUG "CFLAGS for host compiler: '${CT_CFLAGS_FOR_HOST}'" CT_DoLog DEBUG "LDFLAGS for host compiler: '${CT_LDFLAGS_FOR_HOST}'" |