summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpho <pho@pkgsrc.org>2015-02-06 01:24:48 +0000
committerpho <pho@pkgsrc.org>2015-02-06 01:24:48 +0000
commit9eed7c9caa0712431c721b2a0931457e631e6ad5 (patch)
treee1f362bdc290f2ff8d7f2655a80b0213600417c4
parented1622b48fb887cc1f78125f1e825030fe59efdd (diff)
downloadpkgsrc-9eed7c9caa0712431c721b2a0931457e631e6ad5.tar.gz
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.
-rw-r--r--lang/ghc7/distinfo4
-rw-r--r--lang/ghc7/patches/patch-rts_ghc.mk27
2 files changed, 6 insertions, 25 deletions
diff --git a/lang/ghc7/distinfo b/lang/ghc7/distinfo
index 82eaa89dbe5..926e93cc3ad 100644
--- a/lang/ghc7/distinfo
+++ b/lang/ghc7/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2015/02/05 17:45:20 pho Exp $
+$NetBSD: distinfo,v 1.8 2015/02/06 01:24:48 pho Exp $
SHA1 (ghc-7.6.3-src.tar.bz2) = 8938e1ef08b37a4caa071fa169e79a3001d065ff
RMD160 (ghc-7.6.3-src.tar.bz2) = 82a673ed38b7cf9a59afeb01057625fc761a822b
@@ -13,4 +13,4 @@ SHA1 (patch-libraries_unix_System_Posix_Files.hsc) = f2e0892f9ebb9d82ddaf71b014d
SHA1 (patch-mk_config.mk.in) = 90a156f6c455d4b2c5d10fdf65b3a170dcfc4892
SHA1 (patch-rts_Linker.c) = 39d1ca7a856a3ec25e493e97832ef255562c0719
SHA1 (patch-rts_StgCRun.c) = 5d4010dc250af25db0b5b2717c510752f4813e73
-SHA1 (patch-rts_ghc.mk) = 8e9c3a6a2585f0c753f37c00c8991f2fd8524570
+SHA1 (patch-rts_ghc.mk) = 3ef8635ad954df9149aa90046de3a73de186c280
diff --git a/lang/ghc7/patches/patch-rts_ghc.mk b/lang/ghc7/patches/patch-rts_ghc.mk
index f1d884bbf03..9bd39258e04 100644
--- a/lang/ghc7/patches/patch-rts_ghc.mk
+++ b/lang/ghc7/patches/patch-rts_ghc.mk
@@ -1,16 +1,6 @@
-$NetBSD: patch-rts_ghc.mk,v 1.4 2015/02/05 17:45:20 pho Exp $
+$NetBSD: patch-rts_ghc.mk,v 1.5 2015/02/06 01:24:48 pho Exp $
-Hunk #2:
-
-This is pkgsrc specific: dtrace(1) gets confused when we have gcc
-wrappers in the PATH so we have to hide them:
-
- gcc: installation problem, cannot exec '/usr/pkgsrc/wip/ghc/work/.gcc/bin/p
- owerpc-apple-darwin9-gcc-4.0.1': No such file or directory
- dtrace: failed to compile script rts/RtsProbes.d: Preprocessor failed to pr
- ocess input program
-
-Hunk #1, #3:
+This is pkgsrc specific:
Install libffi.{a,la} too, so that the plist framework can deal with
.so name being different between platforms. Note that
@@ -27,8 +17,8 @@ libraries. They should always be installed by running
can't be achieved without a major refactoring of the GHC build system.
And for that matter, GHC shouldn't install a local copy of libffi in
the first place. In fact GHC 7.8 seems to have a configure option
-"--with-system-libffi" so we can hopefully remove these unpleasant
-hunks in the future.
+"--with-system-libffi" so we can hopefully remove this rather
+unpleasant patch in the future.
--- rts/ghc.mk.orig 2013-04-18 21:22:47.000000000 +0000
+++ rts/ghc.mk
@@ -42,15 +32,6 @@ hunks in the future.
rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL)
cp $< $@
-@@ -484,7 +485,7 @@ endif
-
- DTRACEPROBES_SRC = rts/RtsProbes.d
- $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/.
-- "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $<
-+ env PATH="/usr/bin" "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $<
- endif
-
- # -----------------------------------------------------------------------------
@@ -509,7 +510,8 @@ endif
# installing