On Mon, Dec 31, 2001 at 10:02:19AM -0500, Josh Wilmes wrote: > At 13:36 on 12/31/2001 GMT, Simon Cozens <[EMAIL PROTECTED]> wrote: > > > You are, of course, correct. gcc is a lot laxer than many other compilers, > > so we want to get away with as little as possible. -Wall should be default > > for gcc. (And please remember that not every compiler supports -Wall, so > > make it gcc specific!) > > I already submitted a patch for this, and it has been applied. I also > added a "pedantic" option to Configure.pl. That kicks it up anohter > notch. (bam.)
The problem is that Configure.pl is deciding that it's gcc based on $Config{ccname} eq "gcc". $Config{ccname} doesn't exist in perl5.005_03 (or presumably earlier). That's the undefined warning on line 183 below/ So, there's two or three chances to miss getting gcc. With Configure.pl of 5 minutes ago, on this BSD I get: nick@thinking-cap [parrot]$ ./Configure.pl Parrot Version 0.0.3 Configure Copyright (C) 2001-2002 Yet Another Society Since you're running this script, you obviously have Perl 5--I'll be pulling some defaults from its configuration. Checking the MANIFEST to make sure you have a complete Parrot kit... Okay, we found everything. Next you'll need to answer a few questions about your system. Rules are the same as Perl 5's Configure--defaults are in square brackets, and you can hit enter to accept them. Use of uninitialized value at ./Configure.pl line 183. What C compiler do you want to use? [cc] gcc How about your linker? [cc] gcc What flags would you like passed to your C compiler? [] Which libraries would you like your C compiler to include? [-lm -lc -lcrypt] How big would you like integers to be? [long] And your floats? [double] What is your native opcode type? [long] Probing Perl 5's configuration to determine which headers you have (this could take a while on slow machines)... Determining C data type sizes by compiling and running a small C program (this could take a while): Building ./test.c from test_c.in... Figuring out the formats to pass to pack() for the various Parrot internal types... Building a preliminary version of include/parrot/config.h, your Makefiles, and other files: Building include/parrot/config.h from config_h.in... Building ./Makefile from Makefile.in... Building ./classes/Makefile from classes/Makefile.in... Building ./languages/Makefile from languages/Makefile.in... Building ./languages/jako/Makefile from languages/jako/Makefile.in... Building ./languages/miniperl/Makefile from languages/miniperl/Makefile.in... Building ./languages/scheme/Makefile from languages/scheme/Makefile.in... Building Parrot/Types.pm from Types_pm.in... Building Parrot/Config.pm from Config_pm.in... Checking some things by compiling and running another small C program (this could take a while): Building ./testparrotsizes.c from testparrotsizes_c.in... Updating include/parrot/config.h: Building include/parrot/config.h from config_h.in... Okay, we're done! You can now use `make' (or your platform's equivalent to `make') to build your Parrot. After that, you can use `make test' to run the test suite. Happy Hacking, The Parrot Team nick@thinking-cap [parrot]$ make /usr/bin/perl vtable_h.pl /usr/bin/perl make_vtable_ops.pl > vtable.ops /usr/bin/perl ops2c.pl C core.ops vtable.ops /usr/bin/perl ops2c.pl CPrederef core.ops vtable.ops /usr/bin/perl ops2pm.pl core.ops vtable.ops /usr/bin/perl -MFile::Copy=cp -e 'cp q|Parrot/Jit/i386-bsd.pm|, q|Parrot/Jit.pm|' /usr/bin/perl jit2h.pl i386 > include/parrot/jit_struct.h gcc -I./include -DHAS_JIT -o test_main.o -c test_main.c gcc -I./include -DHAS_JIT -o global_setup.o -c global_setup.c ^C nick@thinking-cap [130]$ gcc --version 2.95.2 Note that I've even told Configure that I'm using gcc, not cc, and it still doesn't do the GCC stuff. Shall I submit a patch that makes Configure.pl check the the C compiler works and if it's gcc (by compiling a test program that looks for gcc's version macros, rather than trying to pass the output of ${cc} --version) And the if it's gcc in the tin (whatever the label says) do Dan's $c{cc_warn} = " -Wall -ansi -pedantic -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Winline -Wredundant-decls -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Winline"; [hmm it seems that -ansi enables -trigraphs, and -Wall enables -Wtrigraphs, so that's good (in that I feel we want to know about them if anyone uses them)] For information, here's what /cc/ stuff I have in %Config: nick@thinking-cap [parrot]$ /usr/bin/perl -MConfig -lwe 'foreach (keys %Config){print if /cc/}' cc ccflags Mcc byacc cccdlflags ccdlflags ccsymbols cppccsymbols d_access d_locconv gccversion nick@thinking-cap [parrot]$ /usr/bin/perl -v This is perl, version 5.005_03 built for i386-freebsd Copyright 1987-1999, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. nick@thinking-cap [parrot]$ Nicholas Clark