pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/ghc7



Module Name:    pkgsrc
Committed By:   pho
Date:           Fri Feb  6 01:24:48 UTC 2015

Modified Files:
        pkgsrc/lang/ghc7: distinfo
        pkgsrc/lang/ghc7/patches: patch-rts_ghc.mk

Log Message:
patches/patch-rts_ghc.mk: dtrace hack is no longer needed

The problem only occurs when $(WhatGccIsCalled) is an absolute path to
the "real" gcc (e.g. "/usr/bin/gcc"), which happens if we run
${WRKSRC}/configure with an option something like
"--with-gcc=/usr/bin/gcc". As long as we use "--with-gcc" with a
command name (i.e. ${CC}, not ${CCPATH}), everything works fine
without any problems.

This is because dtrace(1) executes cpp in a rather weird way: it calls
execvp("/usr/bin/gcc", argv) with argv set to {"gcc", "-E", "-xc",
...}, not {"/usr/bin/gcc", "-E", "-xc", ...}.

When GCC is called that way, it needs to find platform-specific
subprograms by walking through ${PATH}. And if it sees an executable
named "gcc" which in fact isn't actually gcc, it gets confused and
dies with an error:

  % cat dtrace-emu.c
  #include <unistd.h>
  #include <stdio.h>
  int main() {
      char *argv[] = {"gcc", "-E", NULL};
      execvp("/usr/bin/gcc", argv);
      return 0;
  }
  % gcc dtrace-emu.c -o /tmp/gcc
  % /tmp/gcc
  powerpc-apple-darwin9-gcc-4.0.1: no input files
  % PATH=/tmp/gcc /tmp/gcc
  gcc: installation problem, cannot exec '/tmp/powerpc-apple-darwin9-gcc-4.0.1':
  No such file or directory

And even if the problem should really be addressed, it should be done
in the wrapper framework because dtrace(1) is actually a part of
compiler toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/ghc7/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ghc7/patches/patch-rts_ghc.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index