aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/debug
Commit message (Collapse)AuthorAgeFilesLines
* gdb/gdbserver: use -static --static for static buildMichał Zagórski2024-12-161-1/+3
| | | | | | | With gdb15.2 gdb uses libtool for linking, but gdbserver is not. Should not break #2230 or #2053 Signed-off-by: Michał Zagórski <zagura6+github@gmail.com>
* gdb: build native gdb with static libexpatMichał Zagórski2024-12-161-1/+7
| | | | | | | Use --with-libexpat-type=static to search for static libexpat in gdb native. This should fix #2230. Signed-off-by: Michał Zagórski <zagura6+github@gmail.com>
* gdb: fix GDB_CC_LD_LIBTOOL referencedemin.han2024-10-161-1/+1
| | | | | | | GDB_CC_LD_LIBTOOL doesn't exist and so else branch always taken. We should use CT_GDB_CC_LD_LIBTOOL. Signed-off-by: demin.han <demin.han@starfivetech.com>
* gdb: Use correct libexpat for native buildChris Packham2024-03-131-10/+1
| | | | | | | | | | The native gdb needs the version of libexpat built for the target. On some systems gdb's configure will find the one from the build machine. Use --with-expat= to point at the correct one for the target. Fixes: 2092 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* gdb: Fix extra config variable name for cross GDBChris Packham2024-03-011-2/+2
| | | | | | | | | Similar to commit 65e5960a ("gdb: Fix extra config variable name for native GDB") we need to use cross_extra_config for the options we're passing to the gdb build when cross compiling. Fixes: 5463ab4b ("gdb: Add gdb-10.2") Signed-off-by: Chris Packham <judge.packham@gmail.com>
* gdb: Explicitly point to target's libgmp for native buildAlexey Brodkin2024-01-301-0/+8
| | | | | | | | | | | | | | | Starting from GDB 11.x, gmp is needed as a dependency to build full gdb. And by default build system of native GDB will try to link with libgmp of the build host. And to make sure that doesn't happen we need to specify location of the target's sysroot so that library search starts from there. Which we do in that change. Fixes [1] & [1]. [1] https://github.com/crosstool-ng/crosstool-ng/issues/2084 [2] https://github.com/crosstool-ng/crosstool-ng/issues/1656 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* gdb: Use correct arguments for static linkingChris Packham2023-11-021-1/+5
| | | | | | | | | | | | As of version 13.x GDB uses libtool for linking instead of g++ these take different arguments for static linking. Commit 6146b5a6 ("use -all-static when building a static gdb") attempted to deal with this but had the effect of causing older GDB versions to fail to build statically. Add a new internal flag GDB_CC_LD_LIBTOOL and use this to decide whether to pass `-static` or `-all-static`. Fixes #2053 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* use -all-static when building a static gdbChris Copeland2023-09-241-2/+8
| | | | | | | | | | | gdb is linked with libtool, which has a different meaning for -static, and -all-static must be used to get a static executable. The binutils build script already uses this option for static builds. Also remove unnecessary -static from cflags for the gdb build. Signed-off-by: Chris Copeland <chris@chrisnc.net>
* gdb: fix build with recent ncursesKirill K. Smirnov2023-08-151-1/+8
| | | | | | For mingw host a special macro NCURSES_STATIC must be defined. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
* gdb: Static cross GDB is linked statically with std c++ libraryMaksim Morozov2023-05-311-1/+2
| | | | | | | | | | If static cross GDB configuration is selected, cross GDB will be linked statically with std c++ library, because there is no separate option for static std c++ library for cross GDB. The use of not existing variable CT_GDB_NATIVE_STATIC_LIBSTDC has been replaced with CT_GDB_NATIVE_STATIC_LIBSTDCXX. Signed-off-by: Maksim Morozov <maxim.morozov.a@gmail.com>
* gdb: Use a relative includedir for native gdb and gdbserverYuriy Kolerov2023-05-281-2/+13
| | | | | | | | | | Use a relative path for include directory if gdb or gdbserver is being built and installed for a target. Otherwise headers are installed in ${destdir}${CT_HEADERS_DIR} - a concatenation of ${destdir} and an absolute path to sysroot's include directory. As a result debug-root may contain wrong paths for includes. Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
* gdb: Fix extra config variable name for native GDBYuriy Kolerov2023-05-191-2/+2
| | | | | | | Variable native_extra_config must be used for configuration options instead for extra_config for native GDB. Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
* gdb: Add gdb 13.1Chris Packham2023-02-251-0/+6
| | | | | | | https://sourceware.org/pipermail/gdb-announce/2023/000134.html https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-13.1-release Signed-off-by: Chris Packham <judge.packham@gmail.com>
* duma: Add version 2.5.21Chris Packham2022-05-151-0/+1
| | | | | | | | | | | | Add duma 2.5.21 and mark 2.5.15 as obsolete. While we're at it use the versions hosted on github which requres new checksums for the 2.5.15 version because the generated tarballs are different. It appears we don't need any of the patches we've been carrying for the older version but we do need to pass CC_FOR_BUILD in addition to HOSTCC. When 2.5.15 is removed we can drop HOSTCC (and DUMA_CPP, DUMA_SO). Signed-off-by: Chris Packham <judge.packham@gmail.com>
* gdb: drop obsolete versionsChris Packham2022-05-101-20/+0
| | | | | | | Drop gdb 7.11.1, 7.12.1, 8.0.1, 8.1.1 and 8.2.1. Cleanup milestones related to these older versions. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Retire obsoleted milestonesAlexey Neyman2022-02-111-26/+6
| | | | | | | | | | | | ... and the code dependent on them, after the latest wave of obsolete package removals. This concludes the glorious history of the original uClibc (non-NG) with lots of kludges removed. There was a choice here, whether to call the resulting libc "uClibc" or "uClibc-ng". I opted in favor of giving uClibc-ng the recognition it deserves, although it had some ripple effect in the ct-ng code. Signed-off-by: Alexey Neyman <stilor@att.net>
* gdb: Remove old milestonesChris Packham2021-09-211-21/+17
| | | | | | | Now that the oldest supported version of gdb is 7.11.1 we can make some parts of the build unconditional and remove the associated config vars. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Merge branch 'gdb-enable-tui' of ↵Chris Packham2021-09-191-4/+2
|\ | | | | | | | | | | https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng Signed-off-by: Chris Packham <judge.packham@gmail.com>
| * gdb: Enable TUI for full target/native GDBAlexey Brodkin2021-09-161-4/+2
| | | | | | | | | | | | | | | | | | Since we have curses built for target anyway now, why don't allow users to use very convenient pseudo-GUI operating mode? And while at it, there's no use of TUI in naturally headless gdbserver. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* | gdb: Realy decouple building of native/target GDB & gdbserverAlexey Brodkin2021-09-191-0/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | Back in the day gdbserver was treated as a subproject of GDB and even was located in "gdb/gdbserver" and so to build gdbserver we had to go into "gdb/gdbserver" and there run configure. That way full GDB was out of the picture. Now starting from GDB 10.1 where gdbserver was promoted to the top-level we're supposed to run top-level's configure script for all the tools provided by the unified binutils-gdb tree. That said if we only want to build gdbserver (and that's what we want since we build one tool at a build step) we have to be explicit: ----------------->8---------------- --enable-gdbserver --disable--gdb ----------------->8---------------- Ah, and so far we used to build full native GDB when only wanted gdbserver if it was GDB v10.x ;) Ironically full native/target GDB also enabled gdbserver by default so we need to also disable it explicitly with "--disable-gdbserver". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* gdb: Add gdb-10.2Alexey Brodkin2021-08-251-30/+91
| | | | | | | | | | | | | | | | | In GDB 10.x gdbserver was promoted to the top-level folder, see https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=919adfe8409211c726c1d05b47ca59890ee648f1 Which means it is no longer a subfolder in "gdb" and so we have to build gdbserver now exactly in the same way as normal native GDB. One interesting detail is gdbserver doesn't need to deal with target description in .xml so it doesn't depend on libexpat on target, thus we need to move libexpat explicit selection from do_gdb_backend() to its callers when building native [full] gdb as well as cross-gdb for the host. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> [cp: support old/new layout, regenerate patches] Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Disable source-highlighting for static buildQBos072021-07-181-0/+6
| | | | Fixes #1487
* gdb: Don't mess with gdbserver config permissionsAlexey Brodkin2021-04-151-5/+0
| | | | | | | | | | | | | | | | | | | | | Some really old GDB releases did have gdbserver's configure script w/o execution permissions, so there was a need in the fix. As per Yann most likely it could have been true for GDB versions in between v5.3 & 6.6. Moreover it could have been fixed on re-release of GDB tarballs done in 2011, see [1]. And given we no longer support such old GDB versions in CT-NG (as of today we have 6.8 - 9.2, moreover it's not clear which of 6.8-7.x versions are still being actively used) we'll revert that old hack for now in a hope that it won't hurt anybody. Though if somebody sees that problem again we'll be able to revert this again ;) [1] https://sourceware.org/legacy-ml/gdb/2011-09/msg00002.html Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* build: debug: strace: Add -D__USE_MISC to target CFLAGSChris Packham2021-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Similar to commit ca45a8f9 ("Add -D__GLIBC__ to target CFLAGS") newer versions of strace bundle the kernel headers which cause build errors such as: [ALL ] In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/in6.h:26, [ALL ] from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/if_bridge.h:19, [ALL ] from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:16: [ERROR] /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/libc-compat.h:109: error: "__UAPI_DEF_IN6_ADDR_ALT" redefined [-Werror] [ALL ] 109 | #define __UAPI_DEF_IN6_ADDR_ALT 1 [ALL ] | [ALL ] In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:15: [ALL ] /home/x-tool/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr/include/netinet/in.h:401: note: this is the location of the previous definition [ALL ] 401 | #define __UAPI_DEF_IN6_ADDR_ALT 0 [ALL ] | [ALL ] cc1: all warnings being treated as errors By defining __USE_MISC we get __UAPI_DEF_IN6_ADDR_ALT defined in a compatible manner. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Enable static libgcc when CT_GDB_NATIVE_STATIC_LIBSTDCXX is setStephanos Ioannidis2020-05-261-0/+1
| | | | | | | | | | | | | | This commit updates the GDB build script to specify `-static-libgcc` when `CT_GDB_NATIVE_STATIC_LIBSTDCXX` is enabled. Both libgcc and libstdc++ are considered to be part of the "standard libraries," and should be specified by the same flag (the configuration symbol could potentially use a better name and/or further indirection). This also semantically aligns the `CT_GDB_NATIVE_STATIC_LIBSTDCXX` with the equivalent GCC configuration `CT_CC_GCC_STATIC_LIBSTDCXX`, which also enables static linking of both libgcc and libstdc++. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
* Fix CT_GDB_NATIVE_STATIC_LIBSTDCXX referenceStephanos Ioannidis2020-05-261-2/+2
| | | | | | | This commit fixes an incorrect reference to the configuration `CT_GDB_NATIVE_STATIC_LIBSTDCXX` in the GDB build script. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
* Rename JOBSFLAGS -> CT_JOBSFLAGSAlexey Neyman2019-04-041-2/+2
| | | | | | ... so that it is saved/restored when restarting the build. Signed-off-by: Alexey Neyman <stilor@att.net>
* An artifact of merging native/gdbserver backendsAlexey Neyman2019-04-041-5/+5
| | | | | | | ... resulted in an attempt to build libinproctrace.so whenever any of the {gdbserver, native gdb} was enabled. Signed-off-by: Alexey Neyman <stilor@att.net>
* Make the proc_service.h workaround apply to gdbserverAlexey Neyman2019-03-121-6/+15
| | | | | | | | | ... when it is compiled without the native GDB. Also, fix the gdbserver to be installed without a program prefix in this case, as it was before the unification of the GDB backend. Signed-off-by: Alexey Neyman <stilor@att.net>
* Allow older GDB to build against newer glibcAlexey Neyman2019-03-111-1/+17
| | | | | | | Also, fix the subdir used when only gdbserver is built (without native GDB). Signed-off-by: Alexey Neyman <stilor@att.net>
* Move GDB build into a common backend functionAlexey Neyman2019-03-091-267/+155
| | | | | | | ... needed to create a common runtime test for an incompatible change in glibc API. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix build of glibc 2.29 on systems with obsolete host programsAlexey Neyman2019-03-021-9/+6
| | | | | | | | | | | | - Force building make as a companion tool if host make is older than 4.0 (CentOS 7 currently has 3.82) - Disable 2.29 as a choice if host python is older than 3.4 (CentOS 7 has 2.6 unless python from EPEL is installed) - Python2 emits its version information to STDERR. Ugh. While there, also use the detected host Python for GDB configuration. Signed-off-by: Alexey Neyman <stilor@att.net>
* Use CFLAGS for both CFLAGS/CXXFLAGS in GDBAlexey Neyman2019-02-131-22/+6
| | | | | | These config variables are documented as such anyway. Signed-off-by: Alexey Neyman <stilor@att.net>
* decouple darwin/clang here as per #712Roy Storey2019-02-131-12/+11
| | | https://github.com/crosstool-ng/crosstool-ng/issues/712#issuecomment-300891861
* Use 'chmod a-x' instead of 'chmod -x'Alexey Neyman2018-09-261-1/+1
| | | | | | | | | | | | | There is a subtle difference when executable bit is a part of the umask. And at least some versions (Debian/stretch) fail if the resulting mode would've been different if not for the umask setting. Fixes #998. Although, with such chmods/umasks it is likely that some package installation will break anyway. But I'll leave it until somebody complains. Signed-off-by: Alexey Neyman <stilor@att.net>
* Avoid adding arch/cpu/tune flags for target to GCC buildAlexey Neyman2018-06-054-24/+15
| | | | | | ... as it may need to override them for building runtime-selectable code. Signed-off-by: Alexey Neyman <stilor@att.net>
* Restore a missing GDB optionAlexey Neyman2018-05-061-2/+6
| | | | | | (whether GDB has --disable-build-with-cxx) and use it. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix strace 4.21+ on aarch64Alexey Neyman2018-04-291-1/+2
| | | | | | | ... which now defaults to --enable-mpers=yes, which attempts to invoke aarch64-*-gcc with -m32 and fails. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix gdb build flags formingSergey Korolev2017-12-181-10/+12
| | | | | | Build flags are scalar variables. Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
* Merge pull request #882 from ksergeyv/gdb-linkAlexey Neyman2017-12-171-80/+106
|\ | | | | Fix variables passing to gdb configure scripts
| * Fix variables passing to gdb configure scriptsSergey Korolev2017-12-141-80/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <s.korolev@ndmsystems.com>
* | Do not build a native gdbserver automaticallySergey Korolev2017-12-141-0/+4
|/ | | | Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
* Add -D__GLIBC__ to target CFLAGSAlexey Neyman2017-09-303-17/+41
| | | | | | | | ... when using musl to compile strace. Also, honor CT_TARGET_CFLAGS in scripts compiling target libs/binaries. Signed-off-by: Alexey Neyman <stilor@att.net>
* config: Add package versioning flexibilityNathan Chancellor2017-09-011-1/+1
| | | | | | | | | | | | | | Some users (like myself) may want to omit the crosstool-NG version from the binaries' versioning output, as it can be incredibly long and not too helpful. Add a config option to disable it. The possible combinations are as follows: - crosstool-NG version (default) - crosstool-NG version - custom toolchain ID - Custom toolchain ID - No crosstool-NG version OR custom toolchain ID Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* Resolve a few more TBDsAlexey Neyman2017-07-091-1/+0
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Separate the notions of package name/labelAlexey Neyman2017-07-081-1/+0
| | | | | | Also, remove resolved TBDs. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix the references to old config variablesAlexey Neyman2017-07-084-64/+18
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Add option to build gdbserver for target that does not require libstdc++.soNye Liu2017-06-161-0/+4
|
* Honor CFLAGS_FOR_BUILDAlexey Neyman2017-06-151-3/+6
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Add GDB 8.0 ...Alexey Neyman2017-06-041-2/+7
| | | | | | ... which now requires C++. Signed-off-by: Alexey Neyman <stilor@att.net>