Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes our formula match these other cross-built GDBs in homebrew-core:
Changes from our previous formula:
GDB now requires GMP (as of 11.1, commit) and MPFR (as of 14, commit)
remove
--prefix=#{prefix}
+--disable-debug
+--disable-dependency-tracking
. These have been added to a reusablestd_configure_args
(as documented here in the Formula Cookbook).remove
--disable-install-libbfd
. In the bfd configure script, this looks to be disabled ifhost != target
(which is true for us).remove
--disable-install-libiberty
. In the libiberty configure script, this looks to already be disabled by default.I think we're also avoiding installing libiberty and libbfd by using
make install-gdb
instead ofmake install
.--disable-nls
+--disable-libssp
. I think these flags got copied over from our GCC formulae, but they don't actaully apply to GDB (docs for GCC configure options versus GDB configure options). Same goes for ouravr-binutils
formula dependency.Addresses #343, since the newer GDB version has addressed the Clang errors outlined in the issue.
Side note about installation directories
I wanted to know if we actually needed to customize all those installation directories in the configure script flags, so I installed to a custom
DESTDIR
and checked out the files. Here's what I found (the GNU Makefile Conventions docs were helpful here):GDB installs executables into
bindir
, headers intoincludedir
(e.g. for GDB's JIT interface), data files intodatadir
(Python helper functions, the syscall name database), manpages inmandir
, Info files ininfodir
, and locale files inlocaledir
.Some installed files have a disambiguating prefix of the target architecture (e.g.
avr-gdb
), but most files don't, so they would overwrite files from an existing installation of GDB. Therefore, we specify a disambiguating subdirectory for all the installation directories, except:bindir
(the executables already have the appropriate prefix) andlibdir
(install-gdb
doesn't install anything here).mandir
needs to be modified, not because the installed manpage files don't have the appropriate prefix (they do), or because they get installed to#{prefix}/man
instead of#{prefix}/share/man
(like the Formula Cookbook cautions against), but because we're customizingdatarootdir
, which causesmake
to install the files to#{prefix}/share/#{target}/man
instead of#{prefix}/share/man
like they should go. So we need to "undo" the change we made todatarootdir
here (as an alternative, I think we could have leftdatarootdir
andmandir
alone, and instead customizeddatadir
/includedir
/localedir
/infodir
).