On Mon, Nov 28, 2005 at 09:47:33AM -0000, Martin J. Evans wrote:
> As with Jonathan and Darren I get a number of:
> 
> Perl.c:86: warning: unused parameter `cv' during make.

They're harmless. The cv is from the PERLXS macro. To avoid it I'd need
to add something like cv=cv; to each XS function. I could do that but I'm
just going to dodge the issue and use the -Wno-unused-parameter option :)

> I also get:
> 
> cc -c   -W -Wall -Wpointer-arith -Wmissing-noreturn -Wbad-function-cast
> -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wdisabled-optimization -O2  
> -DVERSION=\"1.49\" -DXS_VERSION=\"1.49\" -fpic
> "-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE"  -DDBI_NO_THREADS Perl.c
> cc1: Invalid option `-Wmissing-noreturn'
> cc1: Invalid option `-Wdisabled-optimization'

> The -W issue seems to relate to the new section below in the Makefile.PL:
> [...]
>   $opts{CCFLAGS} .= ' -Wdisabled-optimization' if $gccversion ge "3.0";
> [...]

> egcs-2.91.66

Umm, the -Wdisabled-optimization flag should only be added for gcc >=3.
What does perl -V:gccversion say? Perhaps it has some prefix like 'egcs'.

I'll strip $gccversion down to digits and dots and move -Wmissing-noreturn
into that condition.

Thanks guys.

I've attached the current diffs from the release candidate. More
testing would be great, but unless I hear anything bad by the end of
today I'll probably release tomorrow morning.

Tim.
Index: META.yml
===================================================================
--- META.yml    (revision 2281)
+++ META.yml    (working copy)
@@ -1,10 +1,11 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         DBI
-version:      1.48
+version:      1.49
 version_from: DBI.pm
 installdirs:  site
 requires:
+    Storable:                      1
     Test::Simple:                  0.4
 
 distribution_type: module
Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 2281)
+++ Makefile.PL (working copy)
@@ -141,13 +141,15 @@
 
 if (my $gccversion = $Config{gccversion}) {    # ask gcc to be more pedantic
     warn "WARNING: Your GNU C $gccversion compiler is very old. Please upgrade 
it and rebuild perl.\n"
-       if $gccversion =~ m/^(1|2\.[1-8])/;
-    $opts{CCFLAGS} .= ' -W -Wall -Wpointer-arith -Wmissing-noreturn 
-Wbad-function-cast';
+       if $gccversion =~ m/^\D*(1|2\.[1-8])/;
+    $gccversion =~ s/[^\d\.]//g; # just a number please
+    $opts{CCFLAGS} .= ' -W -Wall -Wpointer-arith -Wbad-function-cast';
     $opts{CCFLAGS} .= ' -Wno-comment -Wno-sign-compare -Wno-cast-qual';
-    $opts{CCFLAGS} .= ' -Wdisabled-optimization' if $gccversion ge "3.0";
-    if (0 && $is_developer && $::opt_g) {
+    $opts{CCFLAGS} .= ' -Wdisabled-optimization -Wmissing-noreturn 
-Wno-unused-parameter'
+        if $gccversion ge "3.0";
+    if ($is_developer && $::opt_g) {
         $opts{CCFLAGS} .= ' -DPERL_GCC_PEDANTIC -ansi -pedantic' if 
$gccversion ge "3.0";
-        $opts{CCFLAGS} .= ' -Wmissing-prototypes'; # noisy due to XS_* funcs
+        $opts{CCFLAGS} .= ' -Wmissing-prototypes';
     }
 }
 
@@ -296,13 +298,13 @@
        $(NOECHO) $(NOOP)
 
 $(changes_pm): Changes
-       $(NOECHO) $(MKPATH) $(inst_libdbi)
-       $(NOECHO) $(RM_F) $(changes_pm)
+       $(MKPATH) $(inst_libdbi)
+       $(RM_F) $(changes_pm)
        $(CP) Changes $(changes_pm)
 
 $(roadmap_pm): Roadmap.pod
-       $(NOECHO) $(MKPATH) $(inst_libdbi)
-       $(NOECHO) $(RM_F) $(roadmap_pm)
+       $(MKPATH) $(inst_libdbi)
+       $(RM_F) $(roadmap_pm)
        $(CP) Roadmap.pod $(roadmap_pm)
 ';
 
Index: MANIFEST
===================================================================
--- MANIFEST    (revision 2281)
+++ MANIFEST    (working copy)
@@ -59,6 +59,7 @@
 t/40profile.t
 t/41prof_dump.t
 t/42prof_data.t
+t/43profenv.t
 t/50dbm.t
 t/60preparse.t
 t/70callbacks.t

Reply via email to