summaryrefslogtreecommitdiffstats
path: root/lang/ruby18
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2003-07-19 16:11:15 +0000
committerknu <knu@FreeBSD.org>2003-07-19 16:11:15 +0000
commit40410dd825b9a2a9eb1424bb8906edd589092022 (patch)
tree429bd489a618b257a5b64afe7fb99f60111ec31a /lang/ruby18
parentc0222d03b2a7ce0503ca0d549952072c09406fbc (diff)
downloadFreeBSD-ports-40410dd825b9a2a9eb1424bb8906edd589092022.zip
FreeBSD-ports-40410dd825b9a2a9eb1424bb8906edd589092022.tar.gz
The dl module seems to cause coredump on Pentium4 boxen when compiled
with gcc 3.3 with a -mcpu or -march flag (even -mcpu=pentiumpro, which is the default CPU cflag that bsd.cpu.mk sets, leads ruby to coredump). Although currently I'm not sure if gcc 3.3's optimization has a bug or it is that it just exposed the dl module's hidden bug, disable those flags to work around the problem for the moment.
Diffstat (limited to 'lang/ruby18')
-rw-r--r--lang/ruby18/Makefile1
-rw-r--r--lang/ruby18/files/patch-ext+dl+extconf.rb19
2 files changed, 20 insertions, 0 deletions
diff --git a/lang/ruby18/Makefile b/lang/ruby18/Makefile
index 80d9658..0c5f3af 100644
--- a/lang/ruby18/Makefile
+++ b/lang/ruby18/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ruby${RUBY_R}
PORTVERSION= ${RUBY_PORTVERSION}
+PORTREVISION= 1
CATEGORIES= lang ruby ipv6
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= ${MASTER_SITE_SUBDIR_RUBY}
diff --git a/lang/ruby18/files/patch-ext+dl+extconf.rb b/lang/ruby18/files/patch-ext+dl+extconf.rb
new file mode 100644
index 0000000..359d1ee
--- /dev/null
+++ b/lang/ruby18/files/patch-ext+dl+extconf.rb
@@ -0,0 +1,19 @@
+--- ext/dl/extconf.rb.orig Mon Oct 21 23:52:24 2002
++++ ext/dl/extconf.rb Sun Jul 20 00:55:25 2003
+@@ -183,6 +183,16 @@
+ ]
+
+ create_makefile('dl')
++
++if (Config::CONFIG['CC'] =~ /gcc/) && (Config::CONFIG['arch'] =~ /i.86/)
++ open('Makefile', 'r+') {|f|
++ s = f.read
++ f.rewind
++ f.print s.gsub(/^(CFLAGS\s*=.*\s)-m(cpu|arch)=\S+/, "\\1")
++ f.truncate f.tell
++ }
++end
++
+ rescue SystemExit
+ # do nothing
+ end
OpenPOWER on IntegriCloud