You have compiled a local version of gcc for your system and installed it outside/bypassing the package management system.
I wouldn't do it that way. gcc-14.2.0-2 is already in
Debian (Sid), so you could just install that one. After removing the
/usr/local/gcc-14.2.0 tree, of course. Ubuntu, Mint, et cetera are all derivatives of Debian (and use many Debian packages directly), so using Debian packages is perfectly okay.
The other option is to create your own gcc variant package per
Guide for Debian Maintainers, and install that package.
Basically, it involves renaming the sources to
packagename_version.orig.tar.{xz,gz,bz2}, extracting them to a directory named
packagename-version/, changing to that directory, running
dh_make --s to initially create the Debian tooling under
debian/ for a single package, editing the files under
debian/ with
debian/rules (a Makefile used by the Debian tooling) something like
#!/usr/bin/make -f
CONFIGURE_FLAGS := --prefix=/usr
%:
dh $@
where the last line indent is a single TAB and not spaces (run
sed -e 's|^ *|\t|' -i debian/rules), with
CONFIGURE_FLAGS being the Make variable passed to
configure; you might wish to use
CONFIGURE_FLAGS += additional option(s) instead, perhaps repeatedly, to just
add to the defaults, instead of replacing them with the single prefix one as above. Ensure the top entry in
debian/changelog refers to an
UNRELEASED distribution, if you don't want to sign the packages.
The binary package is created by running
dpkg-debuild -i -us -uc b in the
packagename-version/ directory.
For many packages you can find the
debian/ tooling as a
packagename_version.debian.tar.xz at
packages.debian.org. Unfortunately,
gcc-14 builds a
lot of stuff and is one of the most complex ones. As a typical example,
coreutils (that provides most of the core command-line utilities like
cat and
chmod we expect to have available under
/bin and
/usr/bin), has just a 67-line
debian/rules, and would be a much better starting point for someone to look at practical Debian tooling files.
I warmly recommend taking a day or so to find out how to package Debian .deb packages and experiment with it, until you feel comfortable. It is worth it. Do bookmark or record on paper the URLs for the tutorials/guides, because you will forget it (temporarily) soon, but quickly re-reading the relevant guides/manuals will refresh your memory. There is a set of details in
debian/ tooling to work out and remember, especially the
debian/changelog and how it affects package versioning, but none of them are very complicated. You'll see.
For anyone else to reproduce the build (to as exactly as is typically necessary), you only need to provide (the original source tarball and) a tarball containing the proper
debian/ tooling,
even for different Linux hardware architectures. Note that the base directory is always
debian/ for the tooling archive; never
packagename-version/debian/. In most cases the same tooling works for a new source version, so you only need to add a changelog entry and bump up the version numbers.