5 ms·
What definition of ”dependency” are you using to estimate that GCC has tens of thousands?
by nemetroid 5y ago
What definition of ”dependency” are you using to estimate that GCC has tens of thousands?
- jcelerier 5y agoI guess any individual function defined outside of main() can be considered a dependency, the question is just whether it's you or someone else who's in charge of maintaining it
- z3t4 5y agoYou are correct that in Node.JS a module is just a function that can be re-used in more than one app. But as making a module is the only way to separate your code into several files and folders in Node.JS - Node.js developers also make "modules" that can not be re-used in other apps - so while one app depends on them, other apps can't depend on them and they are not published on the NPM registry... One cool thing about Node.JS modules is that you can import/require them inside main! So whether or not a function is in main or not only says how the developer likes to structure/place the functions. It's rare, but the best programmers I know likes to have all "dependencies" inside the same file - so basically they do not use any dependencies ...
- orwin 5y ago> I guess any individual function defined outside of main() can be considered a dependency No its not. I don't think even people naming their object list "DEPS" in their makefile don't think object files are dependencies.
- onion2k 5y agogcc alone doesn't. xCode, Visual Studio, and gcc probably do. Although I don't really know that for sure.
- nemetroid 5y agoOkay, but still thousands for gcc then?
- orwin 5y agoCertainly not. I barely remember my LFS school project, but I don't think i installed more than a dozen libs for the second Gcc compilation (the one w/o the host system). And half of those libs were used for "make test".
- bregma 5y agoI bundle and distribute GCC for an OS distribution and I can count 5 dependencies for building GCC from source (not including a host toolchain), two of which are also runtime dependencies. That means if you're installing GCC, you also need to install binutils and a C library. GCC itself, of course, bundles a number of dependencies like the gcc toolchain driver, the cc1 and cc1plus compilers, the collect2 linker front-ender, plus a number of runtime libraries both for the toolchain and for bundling into the executable. If you're targeting C++ that adds a couple more runtime dependencies which can optionally be bundled with GCC. Of course, everything also depends on the host runtime. Some OS distributions split GCC into multiple packages with interdependencies, putting for exaple the C preprocessor into a separate package from the compiler proper (which is odd, considering it's the same executable, but there are historic reasons). So, an exact number of dependencies for GCC, depending on how it gets packaged for your development host, can range from 3 to 14 or 15.