[crosstool-ng/crosstool-ng] 70a158: Fix variables passing to gdb configure scripts

Alexey Neyman <[email protected]>
Newsgroups gmane.comp.gcc.cross-compiling
Message-ID <5a36c8908dbdd_39102ad72f5b3c144169d@hookshot-fe-8867ff3.cp1-iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/crosstool-ng/crosstool-ng
  Commit: 70a1584e151832a347472cb557a72204777c95eb
      https://github.com/crosstool-ng/crosstool-ng/commit/70a1584e151832a347472cb557a72204777c95eb
  Author: Sergey Korolev <[email protected]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M scripts/build/debug/300-gdb.sh

  Log Message:
  -----------
  Fix variables passing to gdb configure scripts

These changes mainly fix static linking errors when building static
native gdb and gdbserver (tested with gcc 7.2.0 + uClibc-ng 1.0.27 +
binutils 2.29.1 for MIPS):

[ALL  ]    .../lib/libstdc++.a(eh_throw.o): In function `__cxa_throw':
[ALL  ]    (.text.__cxa_throw+0x64): undefined reference to `_Unwind_RaiseException'
[ALL  ]    (.text.__cxa_throw+0x6c): undefined reference to `_Unwind_RaiseException'
[ALL  ]    .../lib/libstdc++.a(eh_throw.o): In function `__cxa_rethrow':
[ALL  ]    (.text.__cxa_rethrow+0x78): undefined reference to `_Unwind_Resume_or_Rethrow'
[ALL  ]    (.text.__cxa_rethrow+0x80): undefined reference to `_Unwind_Resume_or_Rethrow'
...

The problem is in mixing of CPP, CC, CXX, and LD with CPPFLAGS, CFLAGS,
CXXFLAGS, and LDFLAGS before passing to configure scripts.
gcc is sensitive to argument order and the scripts are normally responsible
to combine the variables in a proper way.

Signed-off-by: Sergey Korolev <[email protected]>


  Commit: 37caa3d4d7986e95e71fcfd102d3a02b08f8a6b8
      https://github.com/crosstool-ng/crosstool-ng/commit/37caa3d4d7986e95e71fcfd102d3a02b08f8a6b8
  Author: Alexey Neyman <[email protected]>
  Date:   2017-12-17 (Sun, 17 Dec 2017)

  Changed paths:
    M scripts/build/debug/300-gdb.sh

  Log Message:
  -----------
  Merge pull request #882 from ksergeyv/gdb-link

Fix variables passing to gdb configure scripts


Compare: https://github.com/crosstool-ng/crosstool-ng/compare/f2db6bff7cd9...37caa3d4d798
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.