1 Disable imake autodetection for:
2 - LinuxDistribution to avoid injection of /usr paths
3 - gcc to avoid use uf /usr/bin/gcc
5 https://github.com/NixOS/nixpkgs/issues/135337
8 @@ -1065,6 +1065,7 @@ get_distrib(FILE *inFile)
9 fprintf (inFile, "%s\n", "#define LinuxWare 11");
10 fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12");
12 +#if 0 /* disable system autodetection. Fall through to LinuxUnknown. */
15 fprintf (inFile, "%s\n",
16 @@ -1090,6 +1091,7 @@ get_distrib(FILE *inFile)
17 * at the content of /etc/debian_version */
21 /* what's the definitive way to tell what any particular distribution is? */
23 fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown");
24 @@ -1337,6 +1339,7 @@ get_gcc_version(FILE *inFile, char *name)
28 +#if 0 /* disable gcc autodetection. Fall through to explicitly set. */
30 static const char* gcc_path[] = {
31 #if defined(linux) || \
32 @@ -1385,6 +1388,9 @@ get_gcc(char *cmd)
37 + strcpy (cmd, IMAKE_COMPILETIME_CPP);