lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [8/14] git commit: refs/heads/master - Go through charmonizer to disable threads/atomics.
Date Wed, 02 Jan 2013 20:38:07 GMT
Go through charmonizer to disable threads/atomics.

Pass an argument to charmonizer to disable threads/atomics in Clownfish
instead of managing compiler flags within the Perl host build.

Furthermore, disable threads more often: whenever Perl was built without
threads, instead of only on OpenBSD and built with GCC.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/a267c204
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/a267c204
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/a267c204

Branch: refs/heads/master
Commit: a267c204ba3ff7220191fea4245d042ca0e49f96
Parents: 7aedb75
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Wed Dec 12 17:15:36 2012 -0800
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Wed Jan 2 12:10:12 2013 -0800

----------------------------------------------------------------------
 .../perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm |    8 ++++++--
 clownfish/runtime/perl/buildlib/Clownfish/Build.pm |    8 --------
 perl/buildlib/Lucy/Build.pm                        |    8 --------
 3 files changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/a267c204/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
index edbd1d9..d35b1e6 100644
--- a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
+++ b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
@@ -75,10 +75,14 @@ sub ACTION_charmony {
         '--cc=' . _quotify( $self->config('cc') ),
         '--enable-c',
         '--enable-perl',
+    );
+    if ( !$self->config('usethreads') ) {
+        push @command, '--disable-threads';
+    }
+    push @command,
         '--',
         $self->config('ccflags'),
-        map { _quotify($_) } @{ $self->extra_compiler_flags },
-    );
+        map { _quotify($_) } @{ $self->extra_compiler_flags };
     if ( $ENV{CHARM_VALGRIND} ) {
         unshift @command, "valgrind", "--leak-check=yes";
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/a267c204/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/buildlib/Clownfish/Build.pm b/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
index c5c58f8..610828b 100644
--- a/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
+++ b/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
@@ -58,14 +58,6 @@ sub new {
         $self->config( optimize => $optimize );
     }
 
-    my $extra_ccflags = $self->extra_compiler_flags;
-    if ( $self->config('gccversion') ) {
-        if ( $Config{osname} =~ /openbsd/i && !$Config{usethreads} ) {
-            push @$extra_ccflags, '-DLUCY_NOTHREADS';
-        }
-    }
-    $self->extra_compiler_flags(@$extra_ccflags);
-
     $self->charmonizer_params( charmonizer_c => $CHARMONIZER_C );
 
     $self->clownfish_params( autogen_header => $self->autogen_header );

http://git-wip-us.apache.org/repos/asf/lucy/blob/a267c204/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 550a27e..9de0f2f 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -63,14 +63,6 @@ sub new {
         $self->config( optimize => $optimize );
     }
 
-    my $extra_ccflags = $self->extra_compiler_flags;
-    if ( $self->config('gccversion') ) {
-        if ( $Config{osname} =~ /openbsd/i && !$Config{usethreads} ) {
-            push @$extra_ccflags, '-DLUCY_NOTHREADS';
-        }
-    }
-    $self->extra_compiler_flags(@$extra_ccflags);
-
     $self->charmonizer_params( charmonizer_c => $CHARMONIZER_C );
 
     $self->clownfish_params( autogen_header => $self->autogen_header );


Mime
View raw message