bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison 2.0 test suite on Mac OS X.3.8


From: Paul Eggert
Subject: Re: Bison 2.0 test suite on Mac OS X.3.8
Date: Sun, 20 Mar 2005 23:02:56 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Hans Aberg <address@hidden> writes:

> 5. input.at:130: testing ...
> input.at:136: bison input.y
> input.at:266: bison -d -v -o input.c input.y
> input.at:267: $CC $CFLAGS $CPPFLAGS -c input.c -o input.o
> stderr:
> gcc: cannot specify -o with -c or -S and multiple compilations

What are CC, CFLAGS, and CPPFLAGS set to on your host?  That
might explain the problem.

Can you reproduce the problem with a simple command that you can
run separately?  E.g.:

gcc -c input.c -o input.o

In looking at the test cases I do see a POSIX conformance problem.
POSIX says that the c99 command can't accept "-o input.o" at the end.
So I installed the following patch -- not that I think it will fix
your problem.

2005-03-20  Paul Eggert  <address@hidden>

        * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
        after operands; POSIX says this isn't portable for the c99 command.

--- local.at.~1.7.~     2004-05-29 17:56:56 -0700
+++ local.at    2005-03-20 22:55:22 -0800
@@ -170,7 +170,7 @@ $2])
 # Compile SOURCES into OUTPUT.  If OUTPUT does not contain '.',
 # assume that we are linking too; this is a hack.
 m4_define([AT_COMPILE],
-[AT_CHECK([$CC $CFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS 
])m4_default([$2], [$1.c]) m4_bmatch([$1], [[.]], [], [$LIBS ])-o $1],
+[AT_CHECK([$CC $CFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])-o $1 
m4_default([$2], [$1.c])[]m4_bmatch([$1], [[.]], [], [ $LIBS])],
           0, [ignore], [ignore])])
 
 # AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.cc])
@@ -179,7 +179,7 @@ m4_define([AT_COMPILE],
 m4_define([AT_COMPILE_CXX],
 [AT_KEYWORDS(c++)
 AT_CHECK([$BISON_CXX_WORKS], 0, ignore, ignore)
-AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_default([$2], [$1.cc]) -o $1],
+AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS -o $1 m4_default([$2], [$1.cc])],
          0, [ignore], [ignore])])
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]